SA-MP Forums Archive
[HELP] Car Lock - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Car Lock (/showthread.php?tid=203720)



[HELP] Car Lock - Nexotronix - 27.12.2010

what i'm doin' wrong, am i need to create some players variable?

pawn Код:
CMD:lock(playerid,params[])
{
    new vid = GetPlayerVehicleID(playerid);
    if(vid != INVALID_VEHICLE_ID)
    if(CarInfo[vid][cLocked] == 0)
    {
        CarInfo[vid][cLocked] = 1;
        SendClientMessage(playerid, 0xFFFFFFAA, "Car locked!");
        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
    }
    else if(CarInfo[vid][cLocked] == 1)
    {
        CarInfo[vid][cLocked] = 0;
        SendClientMessage(playerid, 0xFFFFFFAA, "Car unlocked!");
        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
        SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
    }
    return 1;
}



Re: [HELP] Car Lock - Jochemd - 27.12.2010

SetVehicleParamsForPlayer