Lock | Unlock
#1

y have this commands and how to create, when the player lockes the vehicle to have no entry in vehicle Civils for the mafia ID 6 only can enter how ?
pawn Код:
dcmd_vlock(playerid, params[])
{
    new
        engine,
        lights,
        alarm,
        doors,
        bonnet,
        boot,
        objective;
    if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"ERROR: You need to be in a vehicle to lock the doors");
    if (PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid,red,"ERROR: You need to be staff (or a higher level of staff) to use this command.");
    GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, 1, bonnet, boot, objective);
    SendClientMessage(playerid, blue, "You've locked your vehicle. Use /vunlock to unlock it.");
    return 1;
}

dcmd_vunlock(playerid, params[])
{
    new
        engine,
        lights,
        alarm,
        doors,
        bonnet,
        boot,
        objective;
    if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"ERROR: You need to be in a vehicle to lock the doors");
    if (PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid,red,"ERROR: You need to be staff (or a higher level of staff) to use this command.");
    GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, 0, bonnet, boot, objective);
    SendClientMessage(playerid, blue, "You've unlocked your vehicle. Use /vlock to unlock it.");
    return 1;
}
Reply
#2

Whhhhhat?
I really didn't understand a word from what you said.. please explain it better.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)