16.08.2009, 20:19
I have a code:
but i dont know how to define giveplayer&getplayer in those lines:
so how to define it?
please help!!!!
pawn Код:
if(strcmp(cmd, "/setskin", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 6) return DenyMessage(playerid, 6);
new otherplayerid = strval(tmp)
tmp2 = strtok(cmdtext, idx);
new skinid = strval(tmp2)
tmp = strtok(cmdtext, idx);
if (strlen(tmp))
SendClientMessage(playerid,COLOR_RED,"USAGE: /setskin [playerid] [skin ID]")
SendClientMessage(playerid,COLOR_RED,"This command is setting player's skin to which skin you choose")
SendClientMessage(playerid,COLOR_RED,"The skin will save forever unless you delete it/saved another skin")
SendClientMessage(playerid,COLOR_RED,"Warning!: Dont EVER use skins number: 3-6,8,42,65,74,86,119,149,208,273,289")
SendClientMessage(playerid,COLOR_RED,"They will crash your game!!!!!")
return 1;
}
if (strlen(tmp2))
SendClientMessage(playerid,COLOR_RED,"USAGE: /setskin [playerid] [skin ID]")
SendClientMessage(playerid,COLOR_RED,"This command is setting player's skin to which skin you choose")
SendClientMessage(playerid,COLOR_RED,"The skin will save forever unless you delete it/saved another skin")
SendClientMessage(playerid,COLOR_RED,"Warning!: Dont EVER use skins number: 3-6,8,42,65,74,86,119,149,208,273,289")
SendClientMessage(playerid,COLOR_RED,"They will crash your game!!!!!")
return 1;
}
if (!IsPlayerConnected(otherplayerid)) return SendClientMessage(playerid,COLOR_RED,"Warning!: Wrong ID/Player is not connected")
if (skinid > 0 || skinid > 299) return SendClientMessage(playerid,COLOR_RED,"Warning!: Skin ID must be between 0 and 299!")
new playername = GetPlayerName(otherplayerid,getplayer,sizeof(getplayer));
new adminname = GetPlayerName(playerid,giveplayer,sizeof(giveplayer));
SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have been set %s(ID:%d) Skin to %d",playername,otherplayerid,skinid);
SendClientMessage(otherplayerid,COLOR_LIGHTBLUE, "Admin %s(ID:%d) has been set your skin to %d",playerid,adminname,skinid);
SetPlayerSkin(otherplayerid,skinid)
return 1;
}
but i dont know how to define giveplayer&getplayer in those lines:
pawn Код:
new playername = GetPlayerName(otherplayerid,getplayer,sizeof(getplayer));
new adminname = GetPlayerName(playerid,giveplayer,sizeof(giveplayer));
please help!!!!