10.12.2012, 17:21
pawn Код:
if(!strcmp("/slap",cmdtext,true)) {
new id, slapitavanimi[MAX_PLAYER_NAME], slapijanimi[MAX_PLAYER_NAME], string[128], Float:slx, Float:sly, Float:slz;
if(!IsPlayerAdmin(playerid)) return 0;
if(sscanf(cmdtext,"i", id)) return SendClientMessage(playerid, COLOR_GRAD1,"USEAGE: /slap [playerid]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GRAD2, "Wrong player ID!");
GetRPName(id, slapitavanimi, sizeof(slapitavanimi));
GetRPName(playerid, slapijanimi, sizeof(slapijanimi));
GetPlayerPos(slapitav, slx, sly, slz);
SetPlayerPos(slapitav, slx, sly, slz+5);
format(string, 256, "%s got slapped by admin %s.", slapitavanimi, slapijanimi);
SendClientMessageToAll(-1,string);
print(string);
return 1;
}