[POMOC] Admin komande

Započeo MarQueZ, Septembar 09, 2013, 03:34:06 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: OD 0
Detaljan opis problema: Znaci sve mi je dobro podeseno i  namjesteno mi je >= za koji admin lvl treba biti i itd. Uglavnom kada nemam admina mogu koristiti admin komande a, kada ga imam onda ne mogu :S
Dio skripte: Primjer jedne adm cmd:

CMD:clearchat(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1 || IsPlayerAdmin(playerid)) return SendClientMessage(playerid, CRVENA, "Niste autorizirani za koristenje komande ili nemate dovoljan Adm Level !");
{
    new string[256], sendername[MAX_PLAYER_NAME];
    for(new chat = 0; chat <= 100; chat++)
    SendClientMessageToAll(BIJELA, " ");
    GetPlayerName(playerid, sendername, 20);
    format(string, 256, "{FF0000}Admin {FFFFFF}%s {00FFFF}je ocistio chat", sendername);
    SendClientMessageToAll(BIJELA, string);
    SendClientMessageToAll(PLAVA, "www.Forum.com {FFFFFF}| {00FFFF}Chat ociscen");
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): Slika
Poslednja Izmena: Septembar 09, 2013, 03:39:24 PRE PODNE od MarQueZ
Mike Marquez | House of Rave is Trippy Place ! |

Probaj ovako:

CMD:clearchat(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1 return SendClientMessage(playerid, CRVENA, "Niste autorizirani za koristenje komande ili nemate dovoljan Adm Level !");
{
    new string[256], sendername[MAX_PLAYER_NAME];
    for(new chat = 0; chat <= 100; chat++)
    SendClientMessageToAll(BIJELA, " ");
    GetPlayerName(playerid, sendername, 20);
    format(string, 256, "{FF0000}Admin {FFFFFF}%s {00FFFF}je ocistio chat", sendername);
    SendClientMessageToAll(BIJELA, string);
    SendClientMessageToAll(PLAVA, "www.Forum.com {FFFFFF}| {00FFFF}Chat ociscen");
}
return 1;
}
Poslednja Izmena: Septembar 09, 2013, 12:32:18 POSLE PODNE od ZC_Bob

Ovo mi izjavljuje: C:\Users\MarQueZ\Desktop\CSRP0MOD\gamemodes\CSRPV01.pwn(1414) : warning 211: possibly unintended assignment
C:\Users\MarQueZ\Desktop\MOD\gamemodes\MOD.pwn(1414) : error 029: invalid expression, assumed zero
C:\Users\MarQueZ\Desktop\MOD\gamemodes\MOD.pwn(1414) : warning 215: expression has no effect
C:\Users\MarQueZ\Desktop\MOD\gamemodes\MOD.pwn(1414) : error 001: expected token: ";", but found ")"
C:\Users\MarQueZ\Desktop\MOD\gamemodes\MOD.pwn(1414) : error 029: invalid expression, assumed zero
C:\Users\MarQueZ\Desktop\MOD\gamemodes\MOD.pwn(1414) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Mike Marquez | House of Rave is Trippy Place ! |


Ajd probaj ovako:

CMD:clearchat(playerid, params[])
{
if(!PlayerInfo[playerid][pAdmin]  && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, CRVENA, "Niste autorizirani za koristenje komande ili nemate dovoljan Adm Level !");
{
    new string[256], sendername[MAX_PLAYER_NAME];
    for(new chat = 0; chat <= 100; chat++)
    SendClientMessageToAll(BIJELA, " ");
    GetPlayerName(playerid, sendername, 20);
    format(string, 256, "{FF0000}Admin {FFFFFF}%s {00FFFF}je ocistio chat", sendername);
    SendClientMessageToAll(BIJELA, string);
    SendClientMessageToAll(PLAVA, "www.Forum.com {FFFFFF}| {00FFFF}Chat ociscen");
}
return 1;
}


Znaci ide ti ovako:
if(!PlayerInfo[playerid][pAdmin]  && !IsPlayerAdmin(playerid)) >> Ako igrač nije admin i ako igrač nije rcon admin Å¡alje mu se poruka

Ti si stavio da ako je igrač admin ili rcon admin da mu se šalje da nemože koristiti tu admin komandu :)
Poslednja Izmena: Septembar 09, 2013, 13:42:07 POSLE PODNE od BalkaNation

Citat: ZC_Bob poslato Septembar 09, 2013, 12:37:25 POSLE PODNE
Editovao sam post, probaj sad

Sada radi hvala ti ;)
Mike Marquez | House of Rave is Trippy Place ! |