[HELP] Car Lock
#1

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;
}
Reply
#2

SetVehicleParamsForPlayer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)