Accessing element at negative index -400
#7

^ Or more simplify.. (the simpliest, GetVehicleName separated, probably you also used it somewhere else..)
pawn Код:
public automon(playerid)
{
    if(IsPlayerInAnyVehicle(playerid)) {
        SendClientMessage(playerid,COLOR_RED,GetVehicleName(GetVehicleModel(GetPlayerVehicleID(playerid))));
    }
    return 1;
}
pawn Код:
GetVehicleName(modelid)
{
    return ((400 <= modelid<= 611) ? (VehicleNames[modelid-400]) : ("On Foot"));
}
Reply


Messages In This Thread
Accessing element at negative index -400 - by liinor - 09.10.2014, 19:44
Re: Accessing element at negative index -400 - by Infinity - 09.10.2014, 21:35
Re: Accessing element at negative index -400 - by liinor - 10.10.2014, 12:31
Re: Accessing element at negative index -400 - by Emmet_ - 10.10.2014, 12:35
Re: Accessing element at negative index -400 - by DiDok - 10.10.2014, 13:11
Re: Accessing element at negative index -400 - by Vince - 10.10.2014, 13:15
Re: Accessing element at negative index -400 - by RoboN1X - 10.10.2014, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)