12.04.2008, 01:00
I love the script, but had to make some changes before I'd run it on my server. The way the script checks modelid is a little insane:
To make things easier on the server, I put this:
then changed the modelid check routine:
and changed ALL of the other GetVehicleModel(GetPlayerVehicleID(playerid)) to a simple pmodelid[playerid]. This made the response time visibly better (to me anyways).
I cleaned up SOME of the indentation and added supporting code for the changes made above, as well as tweaked some spelling/grammar. I also noticed the Slamvan doesn't register as a Locos Low vehicle, even though it should. That fix is up to you
Version with my edits: http://madoshi.net/samp/kaiser_tuningcar.pwn
I am not responsible for the forum raping the indentation posted...
Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 562 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 565 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 559 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 561 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 560 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 575 || etc so forth
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == PLAYER_STATE_DRIVER) { pvehicleid[playerid] = GetPlayerVehicleID(playerid); pmodelid[playerid] = GetVehicleModel(pvehicleid[playerid]); } else { pvehicleid[playerid] = 0; pmodelid[playerid] = 0; } return 1; }
Код:
switch(pmodelid[playerid]) { case 562,565,559,561,560,575,534,567,536,535,576,411,579,602,496,518,527,589,597,419,
I cleaned up SOME of the indentation and added supporting code for the changes made above, as well as tweaked some spelling/grammar. I also noticed the Slamvan doesn't register as a Locos Low vehicle, even though it should. That fix is up to you
Version with my edits: http://madoshi.net/samp/kaiser_tuningcar.pwn
I am not responsible for the forum raping the indentation posted...