View Single Post
Old 31/05/2012, 08:32 AM   #3
badnum23
Little Clucker
 
badnum23's Avatar
 
Join Date: May 2012
Posts: 15
Reputation: 1
Default Re: [HELP]Gang Zone Capture

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");
}
badnum23 is offline   Reply With Quote