05.02.2010, 12:15
Quote:
Originally Posted by Chuck_Taylor
First of all add this function:
Код:
stock IsValidSkin(skinid) { #define MAX_BAD_SKINS 57 new badSkins[MAX_BAD_SKINS] = { 143, 110 // This is example.Put your skins that players cant use without permission. }; if (skinid < 0 || skinid > 299) return false; for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == badSkins[i]) return false; } #undef MAX_BAD_SKINS return 1; } Код:
if(strcmp(cmd, "/changeskin", true) == 0) { if(IsPlayerConnected(playerid)) { new skin; tmp = strtok(cmdtext, idx); skin = strval(tmp); SetPlayerSkin(playerid, skin); } return 1; } |
