18.02.2012, 16:56
Hello there,
I have this code for moving barriers, however they're opening and closing very fast, in fact quite instantly in a matter of a second or less. I don't know where I am going wrong with this, the speed is set to 0.0001 and I've read somewhere that any values below 10 should make it move smooth. Anyway, I'd appreciate any tips on where I could have gone wrong, cheers.
I have this code for moving barriers, however they're opening and closing very fast, in fact quite instantly in a matter of a second or less. I don't know where I am going wrong with this, the speed is set to 0.0001 and I've read somewhere that any values below 10 should make it move smooth. Anyway, I'd appreciate any tips on where I could have gone wrong, cheers.
Код:
if(dialogid == 3206){ if(response == 0){ SendClientMessage(playerid,COLOR_ADMIN, "*** Please clear the way for the next vehicle!"); SetTimerEx("gate6", 5000, false, "i", playerid); } if(response == 1){ pmoney = GetPlayerMoney(playerid); if(pmoney >= 20) { MoveObject(barriergate6, 1556.021362, -439.513275+0.0001, 34.171135, 0.0001); SetObjectRot(barriergate6, 1.178097, 0.000000, 0.000000); SendClientMessage(playerid,COLOR_YELLOW, "*** You have paid for the M1 Toll Motorway. Enjoy the drive."); SendClientMessage(playerid,COLOR_LIGHTGREEN, "*** Please drive through the toll within 5 seconds!"); SetTimerEx("gate6", 4000, false, "i", playerid); return 3; }else{ SendClientMessage(playerid,COLOR_ADMIN, "*** You donґt have enough money. Please clear the way for other vehicles."); SetTimerEx("gate6", 4000, false, "i", playerid); } } } return 0; }