02.09.2013, 05:26
Eai Galera, Bom vim pedir um favor para voзкs!
Estou com um GM e tem um Comando, que eu queria bloquear esse comando...
Para ele sу funcionar depois do jogador clikar "Spawn"
Antes que me pessam... estб aqui com comando!
Quero Bloquear esse comando para o jogador nгo conseguir usar ele antes do Spawn, Por favor me Ajudem!!!
Estou com um GM e tem um Comando, que eu queria bloquear esse comando...
Para ele sу funcionar depois do jogador clikar "Spawn"
Antes que me pessam... estб aqui com comando!
Код:
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) < 2)
{
// 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 Depot\r\nLil Probe Depot\r\nLVA Freight Depot\r\nFoster Valley Depot\r\nEl Corona Depot\r\nLas Payasadas Depot\r\nDoherty Depot\r\nWhetstone Depot\r\nBony Country Depot\r\nRed Country Depot\r\nQuarry Top Depot", "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 Los Santos\r\nAeroporto San Fierro\r\nAeroporto Las Venturas\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:", "Los Santos\r\nSan Fierro\r\nLas Venturas\r\nFort 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:", "PicklePine(LV)\r\nLas Venturas", "Spawn", "Cancelar");
}
}
else
SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo pode dar /resgate em um veiculo!"); // "/rescue" doesn't work inside a vehicle
}
else
SendClientMessage(playerid, 0xFF0000FF, "Antes de resgatar-se cancele o seu trabalho!"); // "/rescue" doesn't work during a job
}
else
SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo use /resgate preso!");
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк estб procurado, portanto nгo pode usar este comando!");
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}

