- 0
ZCMD Command!
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Pinki950
Am aceasta comanda:
[pawn]// 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;
// Let the server know that this was a valid command
return 1;
}[/pawn]
si vreau sa o modific sa alimenteze toate masinile de pe server, cum procedez?
1 answer to this question
Recommended Posts