Am nevoie de o comanda care sa alimenteze toate masinile dar nush cum sa o fac am luat ceva exemple si am modificat ce am putut dar nu mi-a reusit uite un exemplu dar acest exemplu alimenteaza doar masina in care esti si as vrea sa alimentez toate masinile:
// Refuel the player's vehicle
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))
{
// Get the vehicleid
vID = GetPlayerVehicleID(playerid);
// Refuel the vehicle
AVehicleData[vID][Fuel] = MaxFuel;
// Let the player know about it
SendClientMessage(playerid, 0x00FF00FF, "Your vehicle is refuelled");
}
else
SendClientMessage(playerid, 0x00FF00FF, "You're not driving a vehicle");
}
else
return 0;
}
else
return 0;
Cum as putea modifica sa alimentez toate masinile???
Question
Pinki95
Am nevoie de o comanda care sa alimenteze toate masinile dar nush cum sa o fac am luat ceva exemple si am modificat ce am putut dar nu mi-a reusit uite un exemplu dar acest exemplu alimenteaza doar masina in care esti si as vrea sa alimentez toate masinile:
// Refuel the player's vehicle
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))
{
// Get the vehicleid
vID = GetPlayerVehicleID(playerid);
// Refuel the vehicle
AVehicleData[vID][Fuel] = MaxFuel;
// Let the player know about it
SendClientMessage(playerid, 0x00FF00FF, "Your vehicle is refuelled");
}
else
SendClientMessage(playerid, 0x00FF00FF, "You're not driving a vehicle");
}
else
return 0;
}
else
return 0;
Cum as putea modifica sa alimentez toate masinile???
0 answers to this question
Recommended Posts