04.09.2013, 14:24
Omg I'm an idiot...
Anyways it works, however I have another question related to this one aswell so here's the code:
So to to clean things up I changed it into a pickup.
Anyways what I wanted to ask was, how do I stop the loop? so that when the loop found the right checkpoint it stops looping, because now when I am in the checkpoint I get spammed with the clientmessage ("test")...
Anyways it works, however I have another question related to this one aswell so here's the code:
pawn Код:
public HalfSecondTimer(playerid)
{
for(new i = 0; i < MAX_RACES; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, RInfo[i][CPX][0], RInfo[i][CPY][0], RInfo[i][CPZ][0]))
{
new Float:PX, Float:PY, Float:PZ;
new raceid;
raceid = i;
PX = RInfo[raceid][CPX][0];
PY = RInfo[raceid][CPY][0];
PZ = RInfo[raceid][CPZ][0];
JoinPickup = CreatePickup(1317, 1, PX,PY,PZ, -1);
SendClientMessage(playerid,COLOR_YELLOW ,"Test");
}
else
{
DestroyPickup(JoinPickup);
}
}
return 1;
}
Anyways what I wanted to ask was, how do I stop the loop? so that when the loop found the right checkpoint it stops looping, because now when I am in the checkpoint I get spammed with the clientmessage ("test")...