[HELP]Gang Zone Capture
#3

Create a function that will give money, score and new property to player.
For example:
Code:
forward gangZoneComplete(playerid);
public gangZoneComplete(playerid)
{
	GivePlayerMoney(playerid, 5000);
	//Up score
	//setup zone
       DisablePlayerCheckpoint(playerid);
}
Next
Code:
public OnPlayerEnterCheckpoint(playerid)
{
    new timerId = setTimerEx("gangZoneComplete", 1000 * 30, false, "i", playerid);
    SetPVarInt(playerid, "gangZoneTimer", timerId);
    SetPVarInt(playerid, "onGangZone", 1);
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    if (GetPVarInt(playerid, "onGangZone")
        KillTimer(GetPVarInt(playerid, "gangZoneTimer"));
    DelPVar(playerid, "onGangZone");
    DelPVar(playerid, "gangZoneTimer");
}
Reply


Messages In This Thread
[HELP]Gang Zone Capture - by the_zohan - 31.05.2012, 08:24
Re: [HELP]Gang Zone Capture - by the_zohan - 31.05.2012, 08:26
Re: [HELP]Gang Zone Capture - by badnum23 - 31.05.2012, 08:32
Re: [HELP]Gang Zone Capture - by the_zohan - 31.05.2012, 08:47
Re: [HELP]Gang Zone Capture - by the_zohan - 01.06.2012, 05:33
Re: [HELP]Gang Zone Capture - by FearLe$$ - 01.06.2012, 05:57
Re: [HELP]Gang Zone Capture - by the_zohan - 01.06.2012, 15:49
Re: [HELP]Gang Zone Capture - by the_zohan - 03.06.2012, 03:13
Re: [HELP]Gang Zone Capture - by FearLe$$ - 03.06.2012, 03:17
Re: [HELP]Gang Zone Capture - by the_zohan - 03.06.2012, 03:23

Forum Jump:


Users browsing this thread: 1 Guest(s)