01.03.2008, 09:21
it is only when trying to open passenger seat...
but the way alexiis showed is quite.... hmm... uncomfortable.. what about something like this?
I think it is better, because player won't enter the vehicle and it is easier, more comfortable and there is less of code 
you can edit it easily.. if you want those SWAT cars only locked for Batman, it is this:
but the way alexiis showed is quite.... hmm... uncomfortable.. what about something like this?
Код:
#define COLOR_RED 0xAA3333AA new vehicle; public OnGameModeInit() { vehicle=CreateVehicle(520,3761.0186,-1944.1924,4.7032,261.9687,0,0,240); } public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { new Data[24]; GetPlayerName(playerid, Data, 24); // Thx 2 eldiablo.. I forget it again :/ if(strcmp(Data, "batman", true) == 0)// Thx 2 eldiablo.. I forget it again :/ { SetVehicleParamsForPlayer(vehicle, playerid,0,0); } else { SetVehicleParamsForPlayer(vehicle, playerid,0,1); SendClientMessage(playerid, COLOR_RED, "You're not Batman!"); } }

you can edit it easily.. if you want those SWAT cars only locked for Batman, it is this:
Код:
#define COLOR_RED 0xAA3333AA public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(IsPlayerConnected(playerid)) { if(GetVehicleModel(vehicleid) == 427 || GetVehicleModel(vehicleid) == 601) { new Data[24]; GetPlayerName(playerid, Data, 24); // Thx 2 eldiablo.. I forget it again :/ if(strcmp(Data, "batman", true) == 0)// Thx 2 eldiablo.. I forget it again :/ { SetVehicleParamsForPlayer(vehicle, playerid,0,0); } else { SetVehicleParamsForPlayer(vehicle, playerid,0,1); SendClientMessage(playerid, COLOR_RED, "You're not Batman!"); } } } }