13.01.2011, 13:17
pawn Код:
dcmd_slap(playerid,params[])
{
if(!PLVL[playerid]) return 0;
new pid, moneys;
if(PlayerInfo[playerid][pAdminLevel] >=1)
{
if(sscanf(params, "ud", pid, moneys)) return SendClientMessage(playerid, Yellow, "Usage: /slap <playerid>");
if(IsPlayerConnected(pid))
{
new Float:Pos[3], string[128], adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], moneys = strval(params);
GetPlayerPos(pid,Pos[0],Pos[1],Pos[2]);
SetPlayerPos(pid,Pos[0],Pos[1],Pos[2]+moneys);
format(string, sizeof(string), "Admin %s has slapped %s for %d meters", adminname, paramname, moneys);
MessageToAdmins(AdminColor, string);
} else SendClientMessage(playerid, Red, "This player is not connected");
} else if(PlayerInfo[playerid][pAdminLevel] == 0) return 0;
return 1;
}