[Ajuda] Comando nao existe
#6

Quote:
Originally Posted by Nickvj7
Посмотреть сообщение
Este comando sу vai funcionar se o cara que usa-lo for policial e tiver mais que 3 leveis de procurado. '-'
e q um amigo q me passou , eu percebi , eu ja to ajeitando , fui preguiзoso e n li o codigo


@EDIT

Mudei olha

pawn Код:
COMMAND:190(playerid, params[])
{
// Setup local variables
new bool:CopOnline = false, Msg[128], Name[24], Fine;

// Send the command to all admins so they can see it
SendAdminText(playerid, "/190", params);

// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{

if (GetPlayerWantedLevel(playerid) >= 1)
{
// Get the player's name
GetPlayerName(playerid, Name, sizeof(Name));
// Preset the message that needs to be sent to cops
format(Msg, 128, "{0000FF}Jogador {FFFFFF}%s{0000FF} estб precisando de algum policial!", Name);

// Check if there is at least one cop online
for (new i; i < MAX_PLAYERS; i++)
{
// Check if this player is connected
if (IsPlayerConnected(i))
{
// Check if this player is cops
if (APlayerData[i][PlayerClass] == ClassPolice)
{
// Set the flag to indicate that at least one cop is online
CopOnline = true;
// Send the cop a message to inform him who needs fine
SendClientMessage(i, 0xFFFFFFFF, Msg);
}
}
}

// Check if there is at least one cop online
if (CopOnline == true)
{
// Let the player know that atleast one cop is online who can fine him
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Existe policiais online, aguarde...");
}
else // No cop is online
{

// Calculate the fine
Fine = GetPlayerWantedLevel(playerid) * DefaultFinePerStar;
// Let the wanted player pay the fine
RewardPlayer(playerid, -Fine, 0);

// Remove wanted level
SetPlayerWantedLevel(playerid, 0);

// Let the player know that he has been auto-fined
format(Msg, sizeof(Msg), "{0000FF}Sua ficha foi limpa no valor de {00FF00}R${FFFFFF}%i {0000FF}pelo motivo de nгo existir policial online", Fine);
SendClientMessage(playerid, 0xFFFFFFFF, Msg);
}
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar /190 quando nгo estб sendo procurado!");
}

else
return 0;

// Let the server know that this was a valid command
return 1;
}
ta certo ?
Reply


Messages In This Thread
Comando nao existe - by Luucass - 15.04.2014, 21:39
Re: Comando nao existe - by Krisky_ - 15.04.2014, 21:46
Re: Comando nao existe - by Luucass - 15.04.2014, 23:11
Re: Comando nao existe - by Luucass - 16.04.2014, 12:13
Re: Comando nao existe - by Locky_ - 16.04.2014, 13:12
Re: Comando nao existe - by Luucass - 16.04.2014, 13:13
Re: Comando nao existe - by Locky_ - 16.04.2014, 13:46
Re: Comando nao existe - by Luucass - 16.04.2014, 13:49

Forum Jump:


Users browsing this thread: 1 Guest(s)