20.01.2012, 23:23
pawn Код:
if(strcmp(cmd, "/spawn", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COR_BRANCO, "[x] Digite: /spawn [id]");
return 1;
}
plid = strval(tmp);
if(IsPlayerConnected(plid)) {
SpawnPlayer(plid);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{FBFF00}[INFO] O admin {FF0000}%s (%d) {FBFF00}deu spawn em %s (%d)!", aname,playerid,pname,plid);
SendMessageToAdmins(-1, string);
return 1;
}
else {
SendClientMessage(playerid, -1, "ID invбlido");
return 1;
}
}