16.06.2010, 12:10
Quote:
Originally Posted by MadeMan
Did you try DJDhan code?
|
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" nos."); print("--------------------------------------\n"); new UnmodifiableVehicles[29] = { 581,523,462,521,463,522,461,448,468,586, 509,481,510,472,473,493,595,484,430,453, 452,446,454,590,569,537,538,570,449 }; forward IsPlayerInInvalidNosVehicle( playerid ); public IsPlayerInInvalidNosVehicle( playerid ) { new carid = GetPlayerVehicleID( playerid ); new carmodel = GetVehicleModel(carid); for (new i = 0; i < sizeof( UnmodifiableVehicles ); i++ ) { if( carmodel == UnmodifiableVehicles[i] ) return 1; } return 0; } if(strcmp("/nos", cmdtext, true) == 0) { if(IsPlayerInVehicle(playerid)) { if(IsPlayerInInvalidNosVehicle(playerid)) { SendClientMessage(playerid, COLOR_RED, "Sorry, you can't install NOS on this vehicle."); } else { AddVehicleComponent(vehicleid, 1010); } } else { SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle."); } return 1; } #endif