09.02.2013, 11:20
i am having problems with the do-while loop i am using
the coding is:
the do-while ends up in an infinite loop and which causes a game crash because of too many messages to the player
please help me
the coding is:
Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 456) { new Float:rot,rep = -1; SendClientMessage(playerid,COLOR_YELLOW,"your truck will now start loading"); TogglePlayerControllable(playerid,0); GetVehicleZAngle(GetPlayerVehicleID(playerid),rot); do { if(rot < 233.0822 && rot > 223.0822) { SetTimer("truckloading",7000,0); rep=0; } else { SendClientMessage(playerid,COLOR_GREY,"set you truck facing towards garage in order to loadtruck"); rep=1; } }while(rep == 1); } else SendClientMessage(playerid,COLOR_GREY,"you are not in a yankee");
please help me