vehicle lock - 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)
+--- Thread: vehicle lock (
/showthread.php?tid=357513)
vehicle lock -
kepa333 - 07.07.2012
so... i got vehicle lock system.. i want to make it to be like in Singleplayer... its play anim car locked.
Код:
if(IsAnOwnableCar(newcar))
{
if(PlayerInfo[playerid][pPcarkey] == newcar) { CanTurnEngine[playerid] = newcar; }
else if(PlayerInfo[playerid][pPcarkey2] == newcar) { CanTurnEngine[playerid] = newcar; }
else if(PlayerInfo[playerid][pPcarkey3] == newcar) { CanTurnEngine[playerid] = newcar; }
else if(PlayerInfo[playerid][pPcarkey4] == newcar) { CanTurnEngine[playerid] = newcar; }
else if(PlayerInfo[playerid][pPcarkey5] == newcar) { CanTurnEngine[playerid] = newcar; }
else
{
if(PlayerInfo[playerid][pAdmin] >= 5 && PlayerInfo[playerid][pAdminDuty] == 1)
{
SendClientMessage(playerid, COLOR_GREY, " You can drive this car because you are admin on duty !");
}
else
{
if(CarInfo[newcar][cLock] == 1)
{
ApplyAnimation(playerid,"PED","CAR_doorlocked_LHS",4.1,1,1,1,1,1,1);
}
else
{
SendClientMessage(playerid, COLOR_GREY,"* Car is not locked so you can start the engine!");
CanTurnEngine[playerid] = newcar;
}
}
}
if(cDebug == 1) SendClientMessageToAll(COLOR_LIGHT_BLUE,"[DEBUG]: Ownable Car");
}
Re: vehicle lock -
shayan122 - 07.07.2012
so? whats wrong with it?!
Re: vehicle lock -
kepa333 - 07.07.2012
idk its just not works
EDIT: when u enter vehicle wich 1 is locked u can drive it..
Re: vehicle lock -
kepa333 - 08.07.2012
BUMP:
Re: vehicle lock -
jaami - 08.07.2012
Cant find any mistake in there..
Maybe check the /lock command