Jump to content
  • 0

Comanda /v lock , lock2 nu functioneaza


MAXYMUSS

Question

Problema intalnita: Nu merge /v lock , v lock2 , etc , se blocheaza temporar , de ex daca ma departez de masina sau dau lock de la departare nu se blocheaza , sau cand intru pe server , folosesc gm raven's , multumesc !
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul:

	        else if(strcmp(x_nr,"lock2",true) == 0)
	        {
                new keycar = PlayerInfo[playerid][pPcarkey2]
				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(9,keycar);
							new engine,lights,alarm,doors,bonnet,boot,objective;
							GetVehicleParamsEx(keycar,engine,lights,alarm,doors,bonnet,boot,objective);
							SetVehicleParamsEx(keycar,engine,lights,alarm,0,bonnet,boot,objective);
							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(9,keycar);
							new engine,lights,alarm,doors,bonnet,boot,objective;
							GetVehicleParamsEx(keycar,engine,lights,alarm,doors,bonnet,boot,objective);
							SetVehicleParamsEx(keycar,engine,lights,alarm,1,bonnet,boot,objective);
							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 2");
                    return 1;
                }
			}

Imagini / Video (optional):-
Ati incercat sa rezolvati singur?: Da

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.