15.09.2012, 16:55
everytime i set the skin to other ID's it changes mine ... please help
pawn Код:
CMD:setskin(playerid, params[])
{
new targetid, skin, sendername[MAX_PLAYER_NAME], receivername[MAX_PLAYER_NAME], string[128];
if(sscanf(params,"ui", targetid, skin)) return SendClientMessage(playerid, 0xFFFFFFF,"Syntax error.Correct usage: /setskin [PlayerID] [Skinmodel]");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFFFFFFF,"This command is only for RCON Admins.");
if(skin > 299 || skin < 1) return SendClientMessage(playerid, 0xFFFFFFF,"Wrong Skin ID! Available ID's: 1-299");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"That player is not connected to your server");
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(targetid, receivername,sizeof(receivername));
format(string, sizeof(string),"Your skin have been set to model %d by admin %s", skin, sendername);
SendClientMessage(targetid, 0xFFFFFF, string);
format(string, sizeof(string),"You have set %s skin to model %d", receivername, skin);
SendClientMessage(playerid, 0xFFFFFF, string);
SetPlayerSkin(targetid, skin); // This will set the target the skin ID the sender want to
return 1;
}