SA-MP Forums Archive
Help please - 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 please (/showthread.php?tid=135616)



Help please - bartje01 - 21.03.2010

Hey guys, How can I check if someone is in a turf zone?
Like:
IsPlayerInTurf(playerid,GSFZONE);

??


Re: Help please - Kyosaur - 21.03.2010

How did you create the turf zone lol ?


Re: Help please - bartje01 - 21.03.2010

Alright:

@onfilterscriptexit
new LspZone;
@ ongamemodeinit

LspZone = GangZoneCreate(1326.343, -1887.144, 1702.824, -1575.273);

@onplayerconnect
GangZoneShowForAll( LspZone, 0x800080AA);






Re: Help please - Kyosaur - 21.03.2010

Quote:
Originally Posted by bartje01
Alright:

@onfilterscriptexit
new LspZone;
@ ongamemodeinit

LspZone = GangZoneCreate(1326.343, -1887.144, 1702.824, -1575.273);

@onplayerconnect
GangZoneShowForAll( LspZone, 0x800080AA);



Ohhhh, yeah i dont think you can for that (gangzones arent meant for that, they're just meant to display the actually zone).

Read this: https://sampwiki.blast.hk/wiki/Areacheck.




Re: Help please - bartje01 - 21.03.2010

No text in it xD


Re: Help please - bartje01 - 21.03.2010

Alright. I have this.
Код:
if (strcmp("/challenge", cmdtext, true, 10) == 0)
	
 {
  new Float:X,Float:Y;


  if (X <= 2235 && X >= -1729 && Y <= 2501 && Y >= -1642)
  GangZoneFlashForAll(LspZone,0xFF0000FF);
  
  }else{
  SendClientMessage(playerid,red,"You aren't in a gang zone");

	return 1;
	}
But I just can use /challenge everywhere and the gangzone still flashes?


Re: Help please - Kyosaur - 21.03.2010

Quote:
Originally Posted by bartje01
Alright. I have this.
Код:
if (strcmp("/challenge", cmdtext, true, 10) == 0)
	
 {
  new Float:X,Float:Y;


  if (X <= 2235 && X >= -1729 && Y <= 2501 && Y >= -1642)
  GangZoneFlashForAll(LspZone,0xFF0000FF);
  
  }else{
  SendClientMessage(playerid,red,"You aren't in a gang zone");

	return 1;
	}
But I just can use /challenge everywhere and the gangzone still flashes?
Hmmm that wiki page SHOULD work (works for me just fine... maybe search AreaCheck like is did ... or IsPlayerInArea).


as for the new problem, use GangZoneFlashForPlayer instead of for all.




Re: Help please - bartje01 - 21.03.2010

Well. It has to show for everyone. Because a gangwar starts at that moment. can you fix the script for me pleasE?


Re: Help please - Kyosaur - 21.03.2010

Quote:
Originally Posted by bartje01
Well. It has to show for everyone. Because a gangwar starts at that moment. can you fix the script for me pleasE?
If it starts for everyone, your WAAAAY off. Dont know why your even adding the area checks if its for everyone lol.

Hmmm, and as for your question: I need more information on what the script is suppose to do (as much detail as possible), and also more info on your problem.


Re: Help please - bartje01 - 21.03.2010

Well You have to be in the gang turf to start it. I just need that to cotinue