07.03.2012, 20:55
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;
}