[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


Messages In This Thread
[HELP] Car Lock - by Nexotronix - 27.12.2010, 20:07
Re: [HELP] Car Lock - by Jochemd - 27.12.2010, 20:14

Forum Jump:


Users browsing this thread: 1 Guest(s)