29.04.2009, 16:10
Hey I made a textdraw for renting a bike:
It works great but how can I make it disapear when you exit the vehicle, not just /exit because you can also exit the vehicle with ''F''. Please help! I already got it working when you type: /rentbike (I just put TextDrawHideForPlayer in the command) but when you exit normally without renting it's there (DUH) so I need help!
Код:
if(newcar >= 112 && newcar <= 130) { if (HireCar[playerid] != newcar) { TextDrawShowForPlayer(playerid,RentABikeLogo) TextDrawShowForPlayer(playerid,RentABikeInfo) format(string, sizeof(string), "~n~Vehicle: ~b~Bike ~n~~w~Price: ~g~$%d ~n~To rent type: ~g~/rentbike~w~. ~r~/exit ~w~to exit vehicle.", SBizzInfo[1][sbEntranceCost]); TextDrawSetString(RentABikeInfo, string); TogglePlayerControllable(playerid, 0); } }