Need help with /slap
#1

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;
    }
Reply


Messages In This Thread
Need help with /slap - by narutogeek11 - 07.08.2009, 20:12
Re: Need help with /slap - by Antonio [G-RP] - 07.08.2009, 20:23
Re: Need help with /slap - by MadeMan - 07.08.2009, 20:32
Re: Need help with /slap - by Antonio [G-RP] - 07.08.2009, 20:38
Re: Need help with /slap - by narutogeek11 - 07.08.2009, 20:51

Forum Jump:


Users browsing this thread: 1 Guest(s)