07.07.2011, 11:54
I'm working on a DM zone, and I want players to only have weapons when inside that zone.
This code doesnt give me any errors when compiled in my GM, but it doesn't seem to work in the server.
public isPlayerInArea()
{
new Float:X, Float:Y, Float:Z;
for(new i=0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(i, X, Y, Z);
if (X <= 2806.4766 && X >= 2566.6860 && Y <= -2332.2461 && Y >= -2562.3301) // area 1
{
}
else
{
ResetPlayerWeapons(i);
}
}
}
This code doesnt give me any errors when compiled in my GM, but it doesn't seem to work in the server.
public isPlayerInArea()
{
new Float:X, Float:Y, Float:Z;
for(new i=0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(i, X, Y, Z);
if (X <= 2806.4766 && X >= 2566.6860 && Y <= -2332.2461 && Y >= -2562.3301) // area 1
{
}
else
{
ResetPlayerWeapons(i);
}
}
}