/refuelcars
#1

It says Unknow Command
This is my command

pawn Код:
cmd:refuelcars(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] == 1)
    {
        VehicleInfo[i][pvFuel] = 100.0;
        SendClientMessageToAll(COLOR_BLUE,"SERVER: All cars have been refilled!");
        SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"You have reffiled all cars!");
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    }
    return 1;
}
Reply
#2

Out of curiosity, you have more then one admin rank correct?

If so, you only have it set to accept the command if the admins level is 1, try this?

Код:
cmd:refuelcars(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        VehicleInfo[i][pvFuel] = 100.0;
        SendClientMessageToAll(COLOR_BLUE,"SERVER: All cars have been refilled!");
        SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"You have refilled all cars!");
    }
    else return SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    return 1;
}
Reply
#3

whatis [I] a loop ?

pawn Код:
cmd:refuelcars(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] == 1)
    {//
      for(new i=0; i< sizeof(VehicleInfo);i++){
        VehicleInfo[i][pvFuel] = 100.0;
       }//
        SendClientMessageToAll(COLOR_BLUE,"SERVER: All cars have been refilled!");
        SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"You have reffiled all cars!");
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)