Lock bug..
#1

Код:
	        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)
	                    {
	                    	new vID = GetPlayerVehicleID(playerid);
							format(string, sizeof(string), "~w~Vehicle~n~~g~Unlocked");
							GameTextForPlayer(playerid, string, 4000, 3);
							CarInfo[keycar][cLock] = 0;
							SetVehicleParamsForPlayer(vID, playerid, 0, 0);
							OnPropUpdate(4,keycar);
							return 1;
						}
						else if(CarInfo[keycar][cLock] == 0)
						{
						 	new vID = GetPlayerVehicleID(playerid);
							format(string, sizeof(string), "~w~Vehicle~n~~r~Locked");
							GameTextForPlayer(playerid, string, 4000, 3);
							CarInfo[keycar][cLock] = 1;
							SetVehicleParamsForPlayer(vID, playerid, 0, 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;
                }
	        }
When the owner /v lock his vehicle the doors + the engine locks and no players can open the door, But when the owner unlocks his door he cant enter either...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)