Lock problem
#1

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);
Reply
#2

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
Reply
#3

Quote:
Originally Posted by boelie
Посмотреть сообщение
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
Well, its not what im looking for.
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)