SA-MP Forums Archive
Zones - 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: Zones (/showthread.php?tid=483974)



Zones - aboa - 28.12.2013

How to show a player massege when he change the zone with the new zone name
Like Jefferson etc...


Re: Zones - aboa - 28.12.2013

anyhelp


Re: Zones - xVIP3Rx - 28.12.2013

Here yo go.. You'll need this include, MediaFire link
pawn Код:
#include <a_zones>

new CurrentZone[MAX_PLAYERS][MAX_ZONE_NAME];

public OnGameModeInit()
{
    SetTimer("OneSecTimer", 1000, true);
    return 1;
}

public OnPlayerConnect(playerid)
{
    CurrentZone[playerid] = "San andreas";
    return 1;
}

forward OneSecTimer();
public OneSecTimer()
{
    for(new i; i<MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i)) continue;
       
        if(GetPlayerInterior(i) == 0 && !IsPlayerInZone(i, CurrentZone[i]))
        {
            GetPlayer2DZone(i, CurrentZone[i], MAX_ZONE_NAME);
            GameTextForPlayer(i, CurrentZone[i], 500, 1);
        }
    }
}