05.06.2013, 22:45
Queria que os players sу pudessem usar esse comando depois de escolher a profissгo e tal..
Quote:
COMMAND:resgate(playerid, params[]) { // Send the command to all admins so they can see it SendAdminText(playerid, "/resgate", params); // Check if the player has logged in if (APlayerData[playerid][LoggedIn] == true) { // Check if the player has a wanted level of less than 3 if (GetPlayerWantedLevel(playerid) < 3) { // Check if the player isn't in jail if (APlayerData[playerid][PlayerJailed] == 0) { if (APlayerData[playerid][JobStarted] == false) { // Make sure you can't use "/rescue" when you're inside a vehicle (doesn't respawn you at the requested coords // and puts a random item (bottle, sigarette, ...) in the player's hands if (GetPlayerVehicleID(playerid) == 0) { // Create a dialog based on the player's class switch (APlayerData[playerid][PlayerClass]) { case ClassTruckDriver: // Ask where the trucker player wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "Fallen Tree\r\nDeserto\r\nLVA Freight\r\nFoster Valley\r\nEl Corona\r\nLas Payasdas\r\nDoherty\r\nShady Creek\r\nPosto BR\r\nConference\r\nRed County\r\nAmtrak Rail\r\nQuarry Top\r\nBaySide\r\nHill Missionary", "Spawn", "Cancelar"); case ClassBusDriver: // Ask where the busdriver wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "Stop Taxi LS\r\nStop Taxi SF\r\nBase of Cabbie\r\nPoint of Cabbie SF\r\nPoint of Cabbie LV\r\nPoint of Cabbie LS", "Spawn", "Cancelar"); case ClassPilot: // Ask where the pilot wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "Aeroporto Eduardo Gomes(LS)\r\nAeroporto Galeao(SF)\r\nAeroporto Santos Dumont(LV)\r\nAeroporto Abandonado\r\nAeroporto de Easter Bay", "Spawn", "Cancelar"); case ClassPolice: // Ask where the police player wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "Delegacia de Los Santos\r\nDelegacia de San Fierro\r\nDelegacia de Las Venturas\r\nDelegacia de Fort Carson", "Spawn", "Cancelar"); case ClassCourier: // Ask where the courier player wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "Deposito de Los Santos\r\nDeposito de San Fierro\r\nDeposito Las Venturas\r\nDeposito de Trash", "Spawn", "Cancelar"); case ClassMafia: // Ask where the courier player wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "Yakuza\r\nAl Qaeda", "Spawn", "Cancelar"); } } else SendClientMessage(playerid, 0xFF0000FF, "Voce nao Pode usar /resgate dentro de um Veiculo"); // "/rescue" doesn't work inside a vehicle } else SendClientMessage(playerid, 0xFF0000FF, "Voce nao pode usar /resgate, voce Esta Realizando um Trabalho"); // "/rescue" doesn't work during a job } else SendClientMessage(playerid, 0xFF0000FF, "Voce nao Pode usar /resgate Preso"); } else SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Voce nao Pode usar /resgate quando Esta sendo Procurado"); } else return 0; // Let the server know that this was a valid command return 1; } |