SA-MP Forums Archive
[Ajuda] Limpar Ficha PPC_Trucking - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Limpar Ficha PPC_Trucking (/showthread.php?tid=504711)



Limpar Ficha PPC_Trucking - comanfiss - 05.04.2014

alguem pode me ajuda a criar um comando /190 pra limpar ficha quando nao tem policia online igual o /assistencia vai ai uma base no comando /assistencia so q й pra limpar a ficha......

pawn Код:
This command allows the player to call for assistance
COMMAND:assistencia(playerid, params[])
{
// Setup local variables
new bool:AssistOnline = false, Msg[128], Name[24];

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

// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Get the player's name
GetPlayerName(playerid, Name, sizeof(Name));
// Preset the message that needs to be sent to assistance players
format(Msg, 128, "{00FF00}O jogador {FFFF00}%s{00FF00} precisa de assistкncia mecвnica.", Name);

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

// Check if there is at least one assistance player online
if (AssistOnline == true)
{
// Set yourself as "AssistanceNeeded"
APlayerData[playerid][AssistanceNeeded] = true;
// Let the player know he called for assistance
SendClientMessage(playerid, 0xFFFFFFFF, "{00FF00}[BTM] Vocк ja pediu ajuda.");
}
else // No assistance is online
{
// Check if the player is the driver of a vehicle
if (GetPlayerVehicleSeat(playerid) == 0)
{
// Fully repair the vehicle (damage value and bodywork)
RepairVehicle(GetPlayerVehicleID(playerid));
// Also re-fuel the vehicle
AVehicleData[GetPlayerVehicleID(playerid)][Fuel] = MaxFuel;
// Let the player pay for the repairs and refuel (default $2000)
RewardPlayer(playerid, -2000, 0);
// Let the player know he spent $2000 for auto-repair because there were no assistance players online
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[BTM] Seu veнculo foi reparado e abastecido por R$2000.");
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[BTM] Nгo hа mecвnico online.");
}
}
}
else
return 0;

// Let the server know that this was a valid command
return 1;
}



Re: Limpar Ficha PPC_Trucking - GWMPT - 05.04.2014

nгo li NADA...

Que tal usares as tags:
[pawn ] [ /pawn]
(sem espaзo)


Re: Limpar Ficha PPC_Trucking - comanfiss - 05.04.2014

me ajuda nao sei fazer isso so novo aki no forum me explica ai melhor o


Re: Limpar Ficha PPC_Trucking - lHesoyaml - 05.04.2014

Й cara use [ pawn] cуdigo [ /pawn] no final


Re: Limpar Ficha PPC_Trucking - comanfiss - 05.04.2014

pronto ja fiz isso agora alguem pode me ajuda.......


Re: Limpar Ficha PPC_Trucking - Locky_ - 05.04.2014

Coisa fбcil dessa '-'
Teria que pegar quantos policiais on ou ver se tem policiais ons. Pra isso, sу realizar um loop chegando a profissгo de Policial..
Se nгo houver policiais, zeraria o procurado do jogador. o.O (SetPlayerWantedLevel) '-'


Re: Limpar Ficha PPC_Trucking - comanfiss - 05.04.2014

mais como eu faзo isso so novato ja sei muita coisa mais ta dificil oq eu tenho q fazer ou mudar nesse comando..


Re: Limpar Ficha PPC_Trucking - comanfiss - 06.04.2014

GENTE tem amor no seus coraзaoes me ajuda ai nesse COMANDo e tem outra agora q fudeu..de 5 PLAYER pra baixo й normal mais quando chegar 6 player em diante nao ganha SCORE nao vai nem um comando pra essa pessoa so o de 5 pessoa pra baixo ai й foda me ajuda tb ai galera