SA-MP Forums Archive
Lock | Unlock - 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)
+--- Thread: Lock | Unlock (/showthread.php?tid=346123)



Lock | Unlock - 3RoR - 27.05.2012

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;
}



Re: Lock | Unlock - Verbal - 27.05.2012

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