Vehice lock.
#2

Well, this is mine
pawn Код:
CMD:lock(playerid, params[]) {
    if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You must be in a vehicle to use this command!");
    if (GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return SendClientMessage(playerid, COLOR_RED, "ERROR: You must be the driver of a vehicle to use this command");
    new vID = GetPlayerVehicleID(playerid);
    new PlayerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
    loop(i, MAX_PLAYERS) {
        if (IsPlayerConnected(i) && i != playerid) {
            SetVehicleParamsForPlayer(vID, i, 0, 1);
        }
    }
    SetVehicleParamsForPlayer(vID, playerid, 0, 0);
    SendClientMessage(playerid, COLOR_GREEN, "* Your vehicle is now locked.");
    return 1;
}
Reply


Messages In This Thread
Vehice lock. - by viddo - 07.03.2012, 20:42
Re: Vehice lock. - by SnG.Scot_MisCuDI - 07.03.2012, 20:55
Re: Vehice lock. - by Mike_Peterson - 07.03.2012, 22:25

Forum Jump:


Users browsing this thread: 1 Guest(s)