Correзгo de Dois Comandos PPC_Trucking. -
GHLEMES - 12.05.2014
Galera to com duvida em dois comandos o primeiro й o /setlevel
Meu /setlevel й assim:
/setlevel [id] [level]
queria assim
/setlevel [id] [level] [dias]
Exemplo se eu colocar 3 dias o level dele volta ao 0 (zero)
Comando:
CLIQUE AQUI
O outro й o /abastecer, queria alem do /abastecer o
/abastecertodos.
Meu /abastecer
CLIQUE AQUI
Base do GM:
PPC_Trucking
Obs. Coloquei no PasteBin para nгo ficar muito grande.
Obrigado
Re: Correзгo de Dois Comandos PPC_Trucking. -
Bruno Alves - 12.05.2014
Tipo й sу usar um loop ... e se quer sу admin use bota uma if para verificar se й admin... n sei se ta certo fiz rapidinho aq e o outro comando to vendo aq tipo esse negocio de dias sу vendo as configuraзхes do seu gamemode pra poder fazer...
pawn Код:
COMMAND:abastecertodos(playerid, params[])
{
// Setup local variables
new vID;
SendAdminText(playerid, "/abastecer", params);
// Check if the player has logged in
for(new i=0; i<MAX_PLAYERS; i++)
{
if (APlayerData[i][LoggedIn] == true)
{
// Check if the player's admin-level is at least 1
if (APlayerData[i][PlayerLevel] >= 1)
{
// Check if the player is inside a vehicle
if (IsPlayerInAnyVehicle(i))
{
// Get the vehicleid
vID = GetPlayerVehicleID(i);
// Refuel the vehicle
AVehicleData[vID][Fuel] = MaxFuel;
// Let the player know about it
SendClientMessage(i, 0x00FF00FF, "Todos os veiculos foram abastecidos.");
}
}
else
SendClientMessage(i, 0x00FF00FF, "");
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
Re: Correзгo de Dois Comandos PPC_Trucking. -
GHLEMES - 12.05.2014
Quote:
Originally Posted by Bruno Alves
Tipo й sу usar um loop ... e se quer sу admin use bota uma if para verificar se й admin... n sei se ta certo fiz rapidinho aq e o outro comando to vendo aq tipo esse negocio de dias sу vendo as configuraзхes do seu gamemode pra poder fazer...
pawn Код:
COMMAND:abastecertodos(playerid, params[]) { // Setup local variables new vID; SendAdminText(playerid, "/abastecer", params); // Check if the player has logged in for(new i=0; i<MAX_PLAYERS; i++) { if (APlayerData[i][LoggedIn] == true) { // Check if the player's admin-level is at least 1 if (APlayerData[i][PlayerLevel] >= 1) { // Check if the player is inside a vehicle if (IsPlayerInAnyVehicle(i)) { // Get the vehicleid vID = GetPlayerVehicleID(i); // Refuel the vehicle AVehicleData[vID][Fuel] = MaxFuel; // Let the player know about it SendClientMessage(i, 0x00FF00FF, "Todos os veiculos foram abastecidos."); } } else SendClientMessage(i, 0x00FF00FF, ""); } else return 0; } else return 0; // Let the server know that this was a valid command return 1; }
|
Vou testar Amanha, esse comando e comento aqui, o que mais vc precisaria para por o negocio de dias?
Re: Correзгo de Dois Comandos PPC_Trucking. -
Bruno Alves - 12.05.2014
sу do gm '-' mais sl to resolvendo uns problemas no meu ... mas vamos ver
Re: Correзгo de Dois Comandos PPC_Trucking. -
GHLEMES - 12.05.2014
Quote:
Originally Posted by Bruno Alves
sу do gm '-' mais sl to resolvendo uns problemas no meu ... mas vamos ver
|
Vish cara o GM? nгo seria algumas funзхes sу?
Re: Correзгo de Dois Comandos PPC_Trucking. -
Don_Speed - 12.05.2014
Tentar fazer pra vocк nгo existe nй !
Se vocк quizer tentar aprender procure como fazer um sistema vip por dias e igual.
Re: Correзгo de Dois Comandos PPC_Trucking. -
GHLEMES - 12.05.2014
Don poderia me passar um sistema de vip bom pra mim tentar fazer o q quero, ou c n um bom tuto?