So I made a Pay n Spray system and when you /enter, it sets a timer for 10 seconds.
This is the code:
This part does not work:
How can I make it so it sets the value to 0 for the Pay n Spray the player was in?
This is the code:
PHP Code:
public PNSExit()
{
foreach (new i : Player)
{
if(Player[i][InPaynSpray])
{
Player[i][InPaynSpray] = 0;
SendClientMessage(i, DARKGREEN, "Auto-Voice: Enjoy your repair.");
new tmpcar = GetPlayerVehicleID(i);
SetVehiclePos(tmpcar, Player[i][ExitX], Player[i][ExitY], Player[i][ExitZ]);
Player[i][ExitX] = 0;
Player[i][ExitY] = 0;
Player[i][ExitZ] = 0;
for(new i2 = 0; i < sizeof(PaynSpray); i++)
{
PaynSpray[i2][IsOccupied] = 0;
}
}
}
return 1;
}
PHP Code:
for(new i2 = 0; i < sizeof(PaynSpray); i++)
{
PaynSpray[i2][IsOccupied] = 0;
}