18.10.2013, 06:39
hello this is my skin cmd which saves player skin id
so onPlayerSpawn when you just join the server and spawn he will get which he save skin ?
its y_ini saving system
Lock this topic
coz problem is fixed
so onPlayerSpawn when you just join the server and spawn he will get which he save skin ?
pawn Код:
CMD:skin(playerid, params[]) // Creating the /skin command.
{
new skinid,string[256];
// If you want make this command only available for Rcon Admins, then remove // characters below this.
//if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "You aren't allowed to use this command.");
if(sscanf(params, "d", skinid)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /skin (skinid)"); // Player has used the command without params, then we send him a message.
// Now the variable 'skinid' contains the value that player has gave as params.
// Example /skin 294 and the variable contains now the value '294'
if(skinid > 299 || skinid < 0) return SendClientMessage(playerid, 0xFF0000FF, "Invalid Skin ID!");
// Now everything seems okay and we change his skin!
SetPlayerSkin(playerid, skinid); // As you know the 'skinid' contains the value of player's given params.
format(string,sizeof(string),"** You changed your skin to %d",skinid);
SendClientMessage(playerid,-1,string);
pInfo[playerid][Skin] = skinid;
SavePlayerData(playerid);
return 1; // Of course we need return a value.
}
Lock this topic
coz problem is fixed