06.10.2012, 20:44
Hello.I made before 1 mounth system which is working on keys.When Player have keys from Bobcat then he will can enter in vehicle.But When he don`t have keys then he can`t enter.(Car will be locked).But I got problem.I have keys but I can`t enter to the vehicle any can helps me?
code;
code;
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetPlayerTeam(playerid) == 1)
{
if(UserStats[playerid][KeysBob] == 0)
{
for(new i=0; i < 3; i++)
{
SetVehicleParamsForPlayer(bob[i], playerid, 0, 1);
}
}
else
{
for(new i=0; i < 3; i++)
{
SetVehicleParamsForPlayer(bob[i], playerid, 0, 0);
}
}
if(UserStats[playerid][KeysYosi] == 0)
{
for(new i=0; i < 3; i++)
{
SetVehicleParamsForPlayer(yosicar, playerid, 0, 1);
}
}
else
{
for(new i=0; i < 3; i++)
{
SetVehicleParamsForPlayer(yosicar, playerid, 0, 0);
}
}
}
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,engine,lights,alarm,1,bonnet,boot,objective);
return 1;
}