SA-MP Forums Archive
skin cmd problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: skin cmd problem (/showthread.php?tid=623289)



skin cmd problem - GabiXx - 30.11.2016

I have this
PHP код:
CMD:setskin(playeridparams[])
{
    new 
pIDskinid;
    if(!
PlayerInfo[playerid][pAdmin] >= 1) return SendClientMessage(playerid, -1"{FF0000}EROARE: {FFFFFF}Nu ai acces la aceasta comanda.");
    else if(
sscanf(params"ui"pIDskinid)) return SendClientMessage(playeridCOL_GOLD"Foloseste: /setskin [id] [skin]");
    else if(
pID == INVALID_PLAYER_ID) return SendClientMessage(playeridCOL_TOM"Jucatorul nu este conectat.");
    else if(
skinid || skinid 311) return SendClientMessage(playeridCOL_GOLD"Skinuri valabile: 0-311.");
    else
    {
        new 
string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
        
GetPlayerName(playeridpNamesizeof(pName));
        
GetPlayerName(pIDtargetsizeof(target));
        
format(stringsizeof(string), "I-ai setat lui %s skin-ul %i."targetskinid);
        
SendClientMessage(playeridCOL_GYELLOWstring);
        
format(stringsizeof(string), "Skinul tau este acum %i datorita lui %s."skinidpName);
        
SendClientMessage(pIDCOL_GYELLOWstring1);
        
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."); 



Re: skin cmd problem - Dayrion - 30.11.2016

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.


Re: skin cmd problem - Banditul18 - 30.11.2016

Код:
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