24.02.2011, 23:27
pawn Код:
CMD:skin ( playerid , params[] )
{
if(PlayerInfo[playerid][VIP] == 1){
new skin[256];
new cmdtext[256];
skin = KcmD(1, cmdtext);
if(!strlen(skin)) return SendClientMessage(playerid,COLOR_RED,"USE: /skin [id da skin]");
SetPlayerSkin(playerid,strval(skin));
}else{
SendClientMessage(playerid,COLOR_RED,"Vocк nгo й VIP!");
return 1;
}
return true;
}
pawn Код:
stock KcmD(param, cmdtext[])
{
new string[128], pos, var;
format(string, sizeof(string), "%s ", cmdtext);
while((pos = strfind(string, " ", true)) != -1)
{
if(var == param) return string;
var++;
strdel(string, 0, pos + 1);
if(strcmp(string, " ", true, pos) == 0) goto end;
}
end:
string[0] = '\0';
return string;
}
Tб foda, ajuda aн.