[HELP] /refilladm command
#6

Put this anywhere
pawn Код:
stock PlayerName(playerid) {
 GetPlayerName(playerid, name, 255);
 return name;
}
pawn Код:
if(strcmp(cmd, "/refilladm", true) == 0)
{
  if(dini_Get(PlayerName(playerid), "adminlevel") >= 1)
  {
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
      Fuel[GetPlayerVehicleID(playerid)] = 999; // Change the array name & value to the correct ones
      return SendMessage(playerid,WHITE,"[*] Vehicle refilled.");
    }
    else return SendMessage(playerid,WHITE,"[*] You're not driving a vehicle.");
  }
  else return SendMessage(playerid,WHITE,"[*] You're not an admin.");
}
Based of Finn's reply
Untested, might not work.
Also you should get the PlayerName thingy
Reply


Messages In This Thread
[HELP] /refilladm command - by breakpaper - 11.09.2009, 14:30
Re: [HELP] /refilladm command - by Finn - 11.09.2009, 19:55
Re: [HELP] /refilladm command - by breakpaper - 11.09.2009, 19:58
Re: [HELP] /refilladm command - by (.Aztec); - 12.09.2009, 01:12
Re: [HELP] /refilladm command - by breakpaper - 12.09.2009, 06:32
Re: [HELP] /refilladm command - by Blades - 12.09.2009, 06:45

Forum Jump:


Users browsing this thread: 1 Guest(s)