Help /v lock
#1

Hi,I got an LA-RP edit and i don't know why my /v lock doesnt work anymore I type /v lock it says that : Vehicle Locked and nothing,anybody can still enter in my vehicle... maybe is something wrong with the code

Код:
	        else if(strcmp(x_nr,"lock",true) == 0)
	        {
                new keycar = PlayerInfo[playerid][pPcarkey];
                if(keycar != 9999)
                {
                    new Float:X,Float:Y,Float:Z;
                    GetVehiclePos(keycar,X,Y,Z);
					if(IsPlayerInRangeOfPoint(playerid, 25,X,Y,Z))
					{
	                    new locked[128];
	                    locked = strtok(cmdtext, idx);
	                    if(CarInfo[keycar][cLock] == 1)
	                    {
							format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked");
							GameTextForPlayer(playerid, string, 4000, 3);
							CarInfo[keycar][cLock] = 0;
							OnPropUpdate(4,keycar);
							return 1;
						}
						else if(CarInfo[keycar][cLock] == 0)
						{
							format(string, sizeof(string), "~w~Vehicle~n~~r~Locked");
							GameTextForPlayer(playerid, string, 4000, 3);
							CarInfo[keycar][cLock] = 1;
							OnPropUpdate(4,keycar);
							return 1;
						}
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY,"* You must be Near or in Your car to lock it!");
					    return 1;
					}
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "* You don't have a vehicle at slot 1");
                    return 1;
                }
	        }
Thanks,and please help
Reply
#2

Show us the Definition of CarInfo[keycar][cLock] And what it does.

And next time choos a better thread title.
Reply
#3

it has no definition
Reply
#4

So you're using an array that isn't defined? You do realise that's impossible? That's like saying I'm eating an apple but I don't have an apple.
Reply
#5

well till 0.3e it worked
Reply
#6

Before 2012 you also needed an apple before you could eat one.
Reply
#7

well,i will try and repair it myself it got no definition and it's still worked sometime so that means there is still hope
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)