Using zones at death.. - 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: Using zones at death.. (
/showthread.php?tid=417976)
Using zones at death.. -
Phil_Cutcliffe - 23.02.2013
Creating SF a zone, LS & also LV a zone.
If player DIES in zone SF spawn at SF hospital
If player DIES in zone LS spawn at RANDOM CG or AS
If player DIES in zone LV spawn at LV hospital
Could some one show either a basic example or some snippets of code I can search myself to help get me on my way? =]
Re : Using zones at death.. -
yusei - 23.02.2013
use Streamer function ''IsPlayerInDynamicArea''
Re: Using zones at death.. -
[MM]RoXoR[FS] - 23.02.2013
I will give you basic info how to get it.
- Download Gang Zone Creator : https://sampforum.blast.hk/showthread.php?tid=372
Using this get area code for all the 3 cities
- Download Streamer : https://sampforum.blast.hk/showthread.php?tid=102865
Using this
pawn Код:
new area[3];
//area[0] == LS
//and so on.
public OnGameModeInit()
{
area[0] = CreateDynamicRectangle((Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1);
//Similarly for area[1] and area[2]
}
public OnPlayerDeath(...)
{
if(IsPlayerInDynamicArea(playerid, area[0])
{
//spawn player at hospital of LS
}
}
Re: Using zones at death.. -
Phil_Cutcliffe - 23.02.2013
Quote:
Originally Posted by [MM]RoXoR[FS]
I will give you basic info how to get it.
- Download Gang Zone Creator : https://sampforum.blast.hk/showthread.php?tid=372
Using this get area code for all the 3 cities
- Download Streamer : https://sampforum.blast.hk/showthread.php?tid=102865
Using this
pawn Код:
new area[3]; //area[0] == LS //and so on. public OnGameModeInit() { area[0] = CreateDynamicRectangle((Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1); //Similarly for area[1] and area[2] }
public OnPlayerDeath(...) { if(IsPlayerInDynamicArea(playerid, area[0]) { //spawn player at hospital of LS } }
|
Thanks pal this looks interesting I'll have a play with this! =]