[FilterScript] [FS]Vehicle Names v1.1.1
#4

Quote:
Originally Posted by Joe Staff
You should use
pawn Code:
if((newstate==PLAYER_STATE_DRIVER)||(newstate==PLAYER_STATE_PASSENGER))
  {
    GameTextForPlayer(playerid,VehicleNames[GetVehicleModel(GetPlayerVehicleID(playerid))-400],6000,1);
    return 1;
  }
instead of
pawn Code:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
  {
    new vehicleid = GetPlayerVehicleID(playerid);
    new model = (GetVehicleModel(vehicleid))-400;
    new string[32];
    format(string,sizeof(string),"%s",VehicleNames[model]);
    GameTextForPlayer(playerid,string,6000,1);
    return 1;
  }
So it runs faster and more efficiently.
Thanks! I'll fix that, and I just thought of a few things to add too. Though, I question the amount of CPU this will take. It's a very small piece of code.

Gonna wait a bit then release new version. Hopefully I'll get the changing vehicles bug sorted by then.
Reply


Messages In This Thread
[FS]Vehicle Names v1.1.1 - by biltong - 12.03.2010, 15:09
Re: [FS]Vehicle Names - by JPs_ - 12.03.2010, 15:42
Re: [FS]Vehicle Names - by Joe Staff - 12.03.2010, 16:24
Re: [FS]Vehicle Names - by biltong - 12.03.2010, 18:24
Re: [FS]Vehicle Names - by Lejo - 12.03.2010, 18:35
Re: [FS]Vehicle Names v1.1 RELEASED - by biltong - 14.03.2010, 15:26
Re: [FS]Vehicle Names v1.1 RELEASED - by XRVX - 14.03.2010, 15:28
Re: [FS]Vehicle Names v1.1 RELEASED - by Las Venturas CNR - 16.03.2010, 12:43
Re: [FS]Vehicle Names v1.1 RELEASED - by Rzzr - 16.03.2010, 15:07
Re: [FS]Vehicle Names v1.1 RELEASED - by biltong - 16.03.2010, 15:23
Re: [FS]Vehicle Names v1.1 RELEASED - by ALASAD - 16.03.2010, 18:22
Re: [FS]Vehicle Names v1.1 RELEASED - by Las Venturas CNR - 16.03.2010, 20:48
Re: [FS]Vehicle Names v1.1 RELEASED - by biltong - 17.03.2010, 13:09
Re: [FS]Vehicle Names v1.1 RELEASED - by ALASAD - 17.03.2010, 17:39
Re: [FS]Vehicle Names v1.1.1 - by biltong - 26.03.2010, 16:41
Re: [FS]Vehicle Names v1.1.1 - by johnathon956 - 19.05.2010, 17:39
Re: [FS]Vehicle Names v1.1.1 - by ViruZZzZ_ChiLLL - 19.05.2010, 17:57
Re: [FS]Vehicle Names v1.1.1 - by [MWR]Blood - 19.05.2010, 18:00
Re: [FS]Vehicle Names v1.1.1 - by TheRob - 02.12.2010, 18:11
Re: [FS]Vehicle Names v1.1.1 - by jordy.kiesebrink - 08.02.2011, 13:27

Forum Jump:


Users browsing this thread: 1 Guest(s)