Taking Away Weapons On Tele
#1

I have this:

pawn Код:
if (strcmp("/dm1", cmdtext, true, 10) == 0)
    {
      if (jatekos[playerid] == 1)
      {
        SetPlayerPos(playerid, 1290.5618,-2034.6489,58.2215);
        GivePlayerWeapon(playerid,31, 500);
        GivePlayerWeapon(playerid,28, 500);
        GivePlayerWeapon(playerid,4, 1);
            gyilkos[playerid]=1;
            jatekos[playerid]=0;
            new name[256];
            new string[256];
            GetPlayerName(playerid, name, sizeof(name));
            format(string, sizeof(string), "[INFO] %s connected to DM zone. [Exit: /leavedm]", name);
            SendClientMessageToAll(COLOR_ORANGE, string);
        }
        else
        {
          SendClientMessage(playerid, COLOR_WHITE, "[INFO] You are already in DM zone! (Use /leavedm)");
        }
        return 1;
    }
Which takes you to a DM zone and gives you weapons.
But as my server is race/stunt aswell I don't want guns out of DM zone.

Here is my exit script.

pawn Код:
if (strcmp("/leavedm", cmdtext, true, 10) == 0)
    {
      if (jatekos[playerid] == 0)
      {
    SetPlayerPos(playerid, 833.5051,-1981.1245,191.9546);
        gyilkos[playerid]=0;
        jatekos[playerid]=1;
        }
        else
        {
          SendClientMessage(playerid, COLOR_WHITE, "[INFO] You aren't in DM zone!");
        }
        return 1;
    }

    return 0;
}
Can someone edit the /leavedm so that it takes away the weapons?

Much appreciated, thanks.
Reply
#2

pawn Код:
if (strcmp("/leavedm", cmdtext, true, 10) == 0)
    {
      if (jatekos[playerid] == 0)
      {
    SetPlayerPos(playerid, 833.5051,-1981.1245,191.9546);
    ResetPlayerWeapons(playerid);
        gyilkos[playerid]=0;
        jatekos[playerid]=1;
        }
        else
        {
          SendClientMessage(playerid, COLOR_WHITE, "[INFO] You aren't in DM zone!");
        }
        return 1;
    }

    return 0;
}
Not that hard
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)