Lock problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Lock problem (
/showthread.php?tid=264364)
Lock problem -
MetalScript - 25.06.2011
Hello,
I need help with something, well i made a textdraw that shows if vehicle door is locked or unlocked.
Everything is working well, but how do i put the numbers to string, like 1=locked and 0=unlocked?
pawn Код:
GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
format(string,256,"Locked: %i",doors);
Re: Lock problem -
boelie - 25.06.2011
im a bit tired but saw this post hours earlyer so i give you something in the right direction en help you
out later if neccesary;
https://sampwiki.blast.hk/wiki/Printf
Re: Lock problem -
MetalScript - 25.06.2011
Quote:
Originally Posted by boelie
|
Well, its not what im looking for.
Re: Lock problem -
MetalScript - 25.06.2011
Anyways, i got it working with:
pawn Код:
new locktext[20];
if(doors == 1) { locktexttext = "On"; }
else if(doors != 1) { locktexttext = "Off"; }
Just for people who also want this kind of code.