Quote:
Originally Posted by NL-Sultan
Maybe this will work.
pawn Код:
new skin = GetPlayerSkin(playerid); // Put this on the TOP of the script.
// This under OnPlayerStateChange
if(skin == 294) // If the skin equals 294 { SetPlayerSkin(playerid, 270); // Sets the skin back to 270. SendClientMessage(playerid, YourColorID, "This skin is restricted."); return 1; } }
|
You cannot add skin as a global variable like that, because playerid is undefined variable. Furthermore, OnPlayerStateChange has nothing to do with the skins, I'd recommend to check in OnPlayerSpawn if the skin id 294 and then set it to 270 as you wish!