Can't fix a warning need some help
#1

When I compile I get a warning on line 1140 that I can't fix please need some help.

pawn Код:
CMD:rentveh(playerid, params[])
{
    if(!PLAYER_STATE_DRIVER) return SCM(playerid, COLOR_WHITE, "You need to be in a renting vehicle to rent a car.");
    else if(PlayerInfo[playerid][pRentingVeh] == 1) return SCM(playerid, COLOR_WHITE, "You are already renting a vehicle.");
    else
    {
        TogglePlayerControllable(playerid, 1);
        SCM(playerid, COLOR_ORANGE, "To unrent the vehicle type /unrentveh");
        PlayerInfo[playerid][pRentingVeh] = 1;
    }
    return 1;
}

Line 1140 is
pawn Код:
if(!PLAYER_STATE_DRIVER) return SCM(playerid, COLOR_WHITE, "You need to be in a renting vehicle to rent a car.");
Reply
#2

change

pawn Код:
if(!PLAYER_STATE_DRIVER) return SCM(playerid, COLOR_WHITE, "You need to be in a renting vehicle to rent a car.");
to

pawn Код:
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SCM(playerid, COLOR_WHITE, "You need to be in a renting vehicle to rent a car.");
Reply
#3

Thanks it worked.
Reply


Forum Jump:


Users browsing this thread: