Using zones at death..
#1

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? =]
Reply
#2

use Streamer function ''IsPlayerInDynamicArea''
Reply
#3

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
        }
    }
Reply
#4

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! =]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)