Hali.Ezt hogyan tudom úgy meg csinálni hogy az összes jármûvet feltöltse üzemanyaggal ? Nézegettem ott de nem jöttem rá hogy is kell!!!!
COMMAND:fuel(playerid, params[])
{
// Setup local variables
new vID;
// Send the command to all admins so they can see it
SendAdminText(playerid, \"/fuel\", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player\'s admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
{
// Check if the player is inside a vehicle
if (IsPlayerInAnyVehicle(playerid))
{
for (new i; i < 1000; i++)
// Get the vehicleid
vID = GetPlayerVehicleID(playerid);
// Refuel the vehicle
AVehicleData[vID][Fuel] = MaxFuel;
// Let the player know about it
SendClientMessage(playerid, 0x00FF00FF, \"{ff9900}Megtankoltad\");
}
else
SendClientMessage(playerid, 0x00FF00FF, \"Nem ülsz kocsiba\");
}
else
return 0;
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}