engine CMD
#6

There is something that most people tend to forget and that is if a vehicle that does not exist given, it will basically try to get the name from index -400 which will cause run time error 4. To simple avoid it:
pawn Код:
GetVehicleName(vehicleid)
{
    new v_name[17], modelid = GetVehicleModel(vehicleid);
    if (modelid) strcat(v_name, VehicleNames[modelid - 400]);
    return v_name;
}
---

Your code:
Код:
"%s  attempts to start the engine of %s")GetName(playerid)
There should be a comma instead of parentheses before GetName function.
Reply


Messages In This Thread
engine CMD - by xXtremeXx - 28.06.2016, 12:01
Re: engine CMD - by FuNkYTheGreat - 28.06.2016, 12:11
Re: engine CMD - by AlonzoTorres - 28.06.2016, 12:13
Re: engine CMD - by xXtremeXx - 28.06.2016, 12:35
Re: engine CMD - by F1N4L - 28.06.2016, 12:38
Re: engine CMD - by Konstantinos - 28.06.2016, 12:38
Re: engine CMD - by xXtremeXx - 28.06.2016, 12:39
Re: engine CMD - by AlonzoTorres - 28.06.2016, 12:42
Re: engine CMD - by F1N4L - 28.06.2016, 12:42
Re: engine CMD - by xXtremeXx - 28.06.2016, 14:18

Forum Jump:


Users browsing this thread: 1 Guest(s)