SA-MP Forums Archive
Just wondering if it's possible, and if there's any ideas. - 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)
+--- Thread: Just wondering if it's possible, and if there's any ideas. (/showthread.php?tid=610383)



Just wondering if it's possible, and if there's any ideas. - AlterEGO - 23.06.2016

So, I thought about a system for my server which could solve the 'greenzone' problem. I honestly, never liked that rule and found it so.. limited. That's why I thought about something, and I think i've seen it before. The idea is like that: When someone creates a shootout in public places such as: Idle-gas, Pizza stack etc. The police will have knowledge of the location of the ongoing shootout. That way, I could create OOC fear in players before creating a shootout in a public place. So, if any of you guys have any ideas of how I should do it, I'll gladly hear it.


Re: Just wondering if it's possible, and if there's any ideas. - [KHK]Khalid - 23.06.2016

Specify what you actually want ideas on.

1. how to detect "when someone creates a shootout".
2. how to detect "when someone creates a shootout in public places".
3. how to let the police have knowledge of the location of the ongoing shootout.

1, 2 or 3?


Re: Just wondering if it's possible, and if there's any ideas. - Sew_Sumi - 23.06.2016

"OOC Fear"... Damn, I'd have thought it was IC fear due to it being in the game and all.


OnPlayerWeaponShot
if(IsAGangMember(playerid)&&!GreenActive[playerid])
GetPlayerPos
GreenZone[playerid] = CreateGangZone x+30 y+30 x-30 y-30
GreenActive[playerid] = 1;
foreach(i, player)
ShowGangZoneforPlayer(i)


If you use the streamer, that could make things a bit easier in some way. You can then use OnPlayerEnterArea and other good streamer functions to do good stuff.


Re: Just wondering if it's possible, and if there's any ideas. - AlterEGO - 28.06.2016

Quote:
Originally Posted by [KHK]Khalid
View Post
Specify what you actually want ideas on.

1. how to detect "when someone creates a shootout".
2. how to detect "when someone creates a shootout in public places".
3. how to let the police have knowledge of the location of the ongoing shootout.

1, 2 or 3?
That'd be option 2.


Re: Just wondering if it's possible, and if there's any ideas. - TakeiT - 28.06.2016

use AreaCheck, and OnPlayerWeaponShot. Make sure lagcomp is enabled. I would personally make it in game with a command.


Re: Just wondering if it's possible, and if there's any ideas. - [KHK]Khalid - 29.06.2016

Quote:
Originally Posted by AlterEGO
View Post
That'd be option 2.
IsPlayerInRangeOfPoint and OnPlayerWeaponShot.