Lock/unlock

Started by Cool, Oct 22, 2015, 09:00 PM

Previous topic - Next topic

Cool

how we can create a system with which owners can lock there's cars and unlock

SAzEe21

Quote from: Noob on Oct 22, 2015, 09:00 PMhow we I can create a system with which owners can lock there's cars and unlock

MatheuS

vehicle.IsLock = bool;  //true or false...
if( !sucess ) tryAgain();
Thanks to the VCMP community. It was the happiest period of my life.

Cool

Like this
else if (cmd == "lock")
{
if (!owner) messageplayer ("you are not the buyer" ,player)
else
{
vehicle.islock = true
messageplayer ("locked" ,player)
}
}

jayant

If you got a full vehicle system you can easily implement above cmd you mentioned.

EK.IceFlake

!owner
...
understand what you did wrong there

Cool

ya i fix it with that line
else if ( GetSQLColumnData( q, 2 ) != player.Name ) MessagePlayer( "you are not buyer..", player );

Cool

Quote from: Zeeshan.Bhatti on Oct 22, 2015, 09:02 PM
Quote from: Noob on Oct 22, 2015, 09:00 PMhow we I can create a system with which owners can lock there's cars and unlock
soory mis typed i post from mobile

Cool

can we save car locks on or off in db if yes then how

jayant

In your database you just need to make one more column,name it,for example,status. Make a simple command,in it query and SELECT your database and just toggle it on/off. [ You can see nogoto on command for an example ]. And yes do not forget this - vehicle.IsLock = true/false;

.

Quote from: Noob on Oct 23, 2015, 04:24 PMcan we save car locks on or off in db if yes then how

Must you ask that question? I supposed you want someone to give you some code and you just to copy and paste it. Then you to come here a couple more times because you can't even copy the code properly. And you know why? Coz you don't know sh!t.
.

Cool

no S.L.C I just ask how dont understand me wrong

KAKAN

And what did he tell?
That's the meaning of How :P
Btw, see @jayant 's post
oh no

Cool

ya i understand on @jayant post is very help full

KAKAN

Try to do it then.
If you find any error, you're free to post them, and we're ready to help you.
Good Luck!
oh no