skin cmd problem
#1

I have this
PHP код:
CMD:setskin(playerid, params[])
{
    new 
pID, skinid;
    if(!
PlayerInfo[playerid][pAdmin] >= 1) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu ai acces la aceasta comanda.");
    else if(
sscanf(params, "ui", pID, skinid)) return SendClientMessage(playerid, COL_GOLD, "Foloseste: /setskin [id] [skin]");
    else if(
pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, COL_TOM, "Jucatorul nu este conectat.");
    else if(
skinid < 0 || skinid > 311) return SendClientMessage(playerid, COL_GOLD, "Skinuri valabile: 0-311.");
    else
    {
        new 
string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
        
GetPlayerName(playerid, pName, sizeof(pName));
        
GetPlayerName(pID, target, sizeof(target));
        
format(string, sizeof(string), "I-ai setat lui %s skin-ul %i.", target, skinid);
        
SendClientMessage(playerid, COL_GYELLOW, string);
        
format(string, sizeof(string), "Skinul tau este acum %i datorita lui %s.", skinid, pName);
        
SendClientMessage(pID, COL_GYELLOW, string1);
        
PlayerInfo[pID][pSkin] = skinid;
    }
    return 
1;
} 
And i get warning: tag mistmatch here :
PHP код:
if(!PlayerInfo[playerid][pAdmin] >= 1) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu ai acces la aceasta comanda."); 
Reply
#2

PHP код:
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu ai acces la aceasta comanda."); 
You can't have ' ! ' & an operator.
Reply
#3

Код:
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nu ai acces la aceasta comanda.");
Its same thing but without erros or warnings because of operators
Reply


Forum Jump:


Users browsing this thread: