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.