How to create a weapon only zone?
#2

pawn Код:
#include <a_samp>

new PlayerInRocketDM[MAX_PLAYERS];

public OnPlayerUpdate(playerid)
{
    if(PlayerInRocketDM[playerid])
    {
        if(GetPlayerWeapon(playerid) != WEAPON_ROCKETLAUNCHER)
        {
            ResetPlayerWeapons(playerid);
            GivePlayerWeapon(playerid, WEAPON_ROCKETLAUNCHER, 200);
        }
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
    PlayerInRocketDM[playerid] = 0;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    PlayerInRocketDM[playerid] = 0;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    PlayerInRocketDM[playerid] = 0;
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    PlayerInRocketDM[playerid] = 0;
    return 1;
}
Better change OnPlayerUpdate to SetTimer/Ex.
Reply


Messages In This Thread
How to create a weapon only zone? - by Gemini - 10.03.2011, 10:48
Re: How to create a weapon only zone? - by Riddick94 - 10.03.2011, 10:54
Re: How to create a weapon only zone? - by Gemini - 10.03.2011, 10:56
Re: How to create a weapon only zone? - by Riddick94 - 10.03.2011, 10:57
Re: How to create a weapon only zone? - by XFlawless - 10.03.2011, 11:00
Re: How to create a weapon only zone? - by Riddick94 - 10.03.2011, 11:02
Re: How to create a weapon only zone? - by XFlawless - 10.03.2011, 11:06
Re: How to create a weapon only zone? - by Mean - 10.03.2011, 11:47

Forum Jump:


Users browsing this thread: 1 Guest(s)