15.01.2012, 21:29
Hello, Me again. Im using /giveskin to set players skin, Now I wanted to save it for if a player goes on duty or something,
But ingame it gives me unknown command.
Code:
But ingame it gives me unknown command.
Code:
PHP код:
CMD:giveskin(playerid, params[])
{
new name[MAX_PLAYER_NAME];
new id;
new skin;
if(IsPlayerConnected(id))
{
if(PlayerInfo[playerid][AdminLevel] >= 2)
{
if(!sscanf(params, "ui", id, skin))
{
if((skin >= 1 && skin <= 300))
{
GetPlayerName(playerid,name);
format(file,sizeof(file),"realityrp/users/%s.ini",name);
new string[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s", skin);
SetPlayerSkin(id, skin);
format(string2, sizeof(string), "%s", skin);
dini_IntSet(file, "Skin",PlayerInfo[playerid][Skin] = skin);
return 1;
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Skin ID must be >1 300<");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "USAGE: /giveskin [PlayerId/PartOfName] [Skin ID]");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not allowed to use this command");
}
else return SendClientMessage(playerid, 0xD8D8D8FF, "Player Is Not Connected");
}