06.12.2013, 12:29
Queria Saber Como Faz Para Somente Os Players Dessem Esse Comando Depois
Que Escolhessem Uma Profissгo
Comando :
Que Escolhessem Uma Profissгo
Comando :
Код:
// Lets the player choose where he wants to respawn (costs $200) 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\nOcean docks", "Spawn", "Cancelar"); case ClassBusDriver: // Ask where the busdriver wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "T5(LS)\r\nT4(SF)\r\nT1(LV)", "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\n Aeroporto 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:", "DP(LS)\r\nDP(SF)\r\nDP(LV)", "Spawn", "Cancelar"); case ClassCourier: // Ask where the courier player wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "Los Santos\r\nSan Fierro\r\nLas Venturas", "Spawn", "Cancelar"); case ClassLixeiro: // Ask where the courier player wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "DL de LS\r\nDL de SF\r\nDL de LV", "Spawn", "Cancelar"); case ClassPizza: // Ask where the courier player wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "Pizza de LS", "Spawn", "Cancelar"); case ClassMendigo: // Ask where the courier player wants to respawn ShowPlayerDialog(playerid, DialogRescue, DIALOG_STYLE_LIST, "Escolha o Local do Resgate:", "Las Venturas", "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, "{808080}Voce nao Pode usar /resgate quando Esta sendo Procurado"); } else return 0; // Let the server know that this was a valid command return 1; }