vehicle lock
#1

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

so? whats wrong with it?!
Reply
#3

idk its just not works
EDIT: when u enter vehicle wich 1 is locked u can drive it..
Reply
#4

BUMP:
Reply
#5

Cant find any mistake in there..
Maybe check the /lock command
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)