07.08.2009, 20:12
Any way to stop slapping myself?
pawn Код:
if(strcmp(cmd, "/slap", true) == 0)// Saurabh
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_PINK, "USAGE: /slap [playerid/PartOfName]");
return 1;
}
new playa;
new Float:i;
new Float:x, Float:y, Float:z;
if (PlayerInfo[playerid][pAdmin] >=1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerHealth(playa, i);
SetPlayerHealth(playa, i-10);
GetPlayerPos(playa, x, y, z);
SetPlayerPos(playa, x, y, z+10);
}
}
}
else
{
SendClientMessage(playerid, COLOR_PINK, " you are not authorized to use that command!");
}
}
return 1;
}

