10.09.2010, 13:12
pawn Код:
dcmd_slap(playerid, params[])
{
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /Slap <ID>");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY, "Player is not connected");
if(PlayerInfo[playerid][AdminLevel] > 1)
{
new Float:px, Float:py, Float:pz;
GetPlayerPosition(id, px, py, pz);
SetPlayerPosition(id, px, py, pz+15);
SendClientMessage(id,COLOR_GREY,"You just been slapped, bitch!");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
}
return 1;
}
change dmcd to dcmd, and on the kill command you dont need that variable in there btw this code is untested