Jump to content
  • 0

Comanda /fuelall Trucking server


Question

Posted

salut sa-mp.ro am am cmd /fuel pe server si am decis sa fac cmd fuelall dar imi da 1 warning dar nu ma pricep va dau comanda /fuel si /fuelall pe care le am si lina in gm la care imi da warning :C:\Users\Àäìèíèñòðàòîð\Desktop\serverurs\gamemodes\PPC_Trucking.pwn(2565) : warning 203: symbol is never used: "fuelall"

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

1 Warning.

Comanda:/fuel

[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]

Comanda:/fuelall

[pawn]COMMAN:fuelall(playerid, params[])

{

  //Trimite comandata la toti adminii sunt online

  SendAdminText(playerid, "/fuelall", parms);

 

  //Daca playerul este logat

  if (APlayerData[playerid][LoggedIn]==true)

  {

  //Daca adminul are mai sus de levelu 4

  if (APlayerData[playerid][PlayerLevel] >=4)

  {

  // 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]

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

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.