SA-MP Forums Archive
Private skin. - 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: Private skin. (/showthread.php?tid=612446)



Private skin. - canip0000 - 17.07.2016

pawn Код:
if(GetPlayerSkin(playerid) == emmetskin)
   {
       new SkinName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, SkinName, sizeof(SkinName));
       if(!(strcmp(SkinName, "[BADBOY]", false) == 0))
       {
          GameTextForPlayer(playerid, "You can't take this skin!", 2500, 3);
          ForceClassSelection(playerid);
          SetPlayerHealth(playerid, 0.0);
       }
   }
Hello. How come this code not work at all? What am I doing wrong??


Re: Private skin. - UltraScripter - 18.07.2016

change this:
PHP код:

if(!(strcmp(SkinName"[BADBOY]"false) == 0)) //you checking if not strcmp equal to 0! And it should be if strcmp equal to zero 
To this:

PHP код:

if(!strcmp(SkinName"[BADBOY]"false))