SA-MP Forums Archive
[HELP] Ganzone car or kill help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Ganzone car or kill help (/showthread.php?tid=122165)



[HELP] Ganzone car or kill help - snabbo - 20.01.2010

Hello everyone,

I have a question how you can ensure that they can kill time in this pace area but 3 and that them then gekickt become or that they are possible no cars spawnen by means of my /cars command.
This is script which I have now:
Код:
//At The Top Of The Script:
new savezone;

//Under OnGameModeInit
savezone = GangZoneCreate(1815.991333, 1272.023803, 2071.991210, 1456.023803);

//Under OnPlayerConnect:
GangZoneShowForPlayer(playerid, savezone, 65477);
In advance super thanks!
Snabbo


Re: [HELP] Ganzone car or kill help - addysnow1 - 20.01.2010

Well I don't realy understand were you are talking about, But I think you mean, That if a player entered that zone something happend?
You can use this fuction:

Past this somewere in your script:

Код:
public IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
  new Float:x, Float:y, Float:z;
  GetPlayerPos(playerid, x, y, z);
  if (x > minx && x < maxx && y > miny && y < maxy) return 1;
  return 0;
}
Create a timer. And but this in your timer:

Код:
		
if(IsPlayerInArea(playerid,1815.991333, 2071.991210, 1272.023803, 1456.023803) == 1)
		{
// What happends when a player entered the zone
}