[HELP] zone and timers -
iJumbo - 06.07.2010
i make this code
public provazone(playerid)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X >= 1331.278 && X <= 2207.118 && Y >= -2755.979 && Y <= -2125.373)
{
SendClientMessage(playerid,COLOR_RED,"sei nella stunt zone");
print("stunt zone!");
}
return 1;
}
and this code show a SendClientMessage(playerid,COLOR_RED,"sei nella stunt zone"); when u are in stunt zone but it show every one second XD how to show this 1 times ? with the timer to 1 sec
Re: [HELP] zone and timers -
ToPhrESH - 06.07.2010
Finally someone who has the same problem as me! I need help with timers also
Re: [HELP] zone and timers -
iJumbo - 06.07.2010
no one

plz i need it
Re: [HELP] zone and timers -
Matthias_ - 06.07.2010
Make a variable. Set it to 1 if he's in the zone already, if he is in the zone already, don't send the message.
Re: [HELP] zone and timers -
iJumbo - 06.07.2010
this make some lag set 1000000 times to 1 ?
Re: [HELP] zone and timers -
CAR - 06.07.2010
Can you give the code when you use the provazone(playerid)
Re: [HELP] zone and timers -
iJumbo - 06.07.2010
i dont understand what u want
Re: [HELP] zone and timers -
Cameltoe - 06.07.2010
Код:
new IsInZone[MAX_PLAYERS];
forward provazone(playerid);
public provazone(playerid)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X >= 1331.278 && X <= 2207.118 && Y >= -2755.979 && Y <= -2125.373 && IsInZone[playerid] == 0)
{
IsInZone[playerid] = 1;
SendClientMessage(playerid,COLOR_RED,"Welcome to the stunt zone!");
}
return 1;
}
should work

also add a check to see if the player isnt in the zone sos you could set IsInZone to 0 again
Re: [HELP] zone and timers -
iJumbo - 06.07.2010
this set 100000000000 times to 1 and send 1000000000 times the message lol
Re: [HELP] zone and timers -
Cameltoe - 06.07.2010
Nope it dosn't cause it checks if player already is in zone, if he is the code sends a message. if message already sent it won't send.