28.12.2013, 16:48
How to show a player massege when he change the zone with the new zone name
Like Jefferson etc...
Like Jefferson etc...
#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);
}
}
}