12.09.2012, 12:13
So as the tittle says i got a problem at AVS ( Advanced Vehicle System by Mademan) .
The problem is with the /vlock command.
Let's say i lock the car , it appears " Doors Locked" , so the command works fine , but if i go a bit further .. and return to my car , the car is unlocked automaticaly , someone know how to fix this problem ?
2. And i got 1 more problem. Only the admins can change the color , and the color command is in a dialog /editv ( Someone know how to fix this problem)? . Help pleaze
Lock command :
The whole AVS :
http://pastebin.com/zt3v7DZt
Can someone help me pleaze ?:d
The problem is with the /vlock command.
Let's say i lock the car , it appears " Doors Locked" , so the command works fine , but if i go a bit further .. and return to my car , the car is unlocked automaticaly , someone know how to fix this problem ?
2. And i got 1 more problem. Only the admins can change the color , and the color command is in a dialog /editv ( Someone know how to fix this problem)? . Help pleaze
Lock command :
pawn Код:
CMD:vlock(playerid, params[])
{
new vehicleid;
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
vehicleid = GetPlayerVehicleID(playerid);
}
else
{
vehicleid = GetClosestVehicle(playerid);
if(!PlayerToVehicle(playerid, vehicleid, 5.0)) vehicleid = 0;
}
if(!vehicleid) return SendClientMessage(playerid, COLOR_RED, "You are not close to a vehicle!");
new id = GetVehicleID(vehicleid);
if(!IsValidVehicle(id)) return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
if(GetPlayerVehicleAccess(playerid, id) < 2)
return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
new engine, lights, alarm, doors, bonnet, boot, objective;
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(doors == 1)
{
doors = 0;
VehicleLock[id] = 0;
GameTextForPlayer(playerid, "~g~doors unlocked", 3000, 6 );
}
else
{
doors = 1;
VehicleLock[id] = 1;
GameTextForPlayer(playerid, "~r~doors locked", 3000, 6 );
}
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SaveVehicle(id);
return 1;
}
The whole AVS :
http://pastebin.com/zt3v7DZt
Can someone help me pleaze ?:d