18.09.2010, 08:38
With dcmd + scanff
Copyed this from my admin script.
Copyed this from my admin script.
pawn Код:
dcmd_slap(playerid, params[])
{
new slapid;
new string[128];
new reason[128];
if(sscanf(params, "uz", slapid, reason)) return SendClientMessage(playerid,red,"Error: /slap <playerid/name> Reason.");
if(!IsPlayerConnected(slapid) || slapid == INVALID_PLAYER_ID || slapid == playerid) return SendClientMessage(playerid,red,"Error: Player is not connected or it is yourself.");
format(string,sizeof(string),"Admin: %s(id: %d) has slapped %s(id: %d) Reason: %s.",UserUD[playerid][accname],playerid,UserUD[slapid][accname],slapid,reason);
SendClientMessageToAll(adminaction,string);
new Float:x,
Float:y,
Float:z;
GetPlayerPos(slapid, x,y,z);
SetPlayerPos(slapid, x, y, z+8);
PlayerPlaySound(slapid, 1190, 0,0,0);
}
return 1;
}