[help] lock command
#3

if(!strcmp(cmd, "/lock", true))
{
new vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
new Float:vehx, Float:vehy, Float:vehz;
GetVehiclePos(vehicleid, vehx, vehy, vehz);
if(IsPlayerInRangeOfPoint(playerid,1.0,vehx,vehy,v ehz))
{
//CarsInfo[vehicleid][lock]=-1
if(CarsInfo[vehicleid][lock]==-1 || CarsInfo[vehicleid][lock]==0)
CarsInfo[vehicleid][lock]=1;
else
CarsInfo[vehicleid][lock]=0;
SetVehicleParamsForPlayer(vehicleid,playerid,0,Car sInfo[vehicleid][lock]);
}
return 1;
}


It doesn't working.
I mean, I can lock/unlock the car but only if I'm in the car.
Reply


Messages In This Thread
[help] lock command - by InsaniManES - 15.03.2011, 12:40
Re: [help] lock command - by Ironboy - 15.03.2011, 12:42
Re: [help] lock command - by InsaniManES - 15.03.2011, 14:55

Forum Jump:


Users browsing this thread: 2 Guest(s)