23.09.2012, 12:49
Код:
if(newstate == PLAYER_STATE_DRIVER) { if(GetPlayerVehicleID(playerid) == kradi[1] || GetPlayerVehicleID(playerid) == kradi[2] || GetPlayerVehicleID(playerid) == kradi[3] || GetPlayerVehicleID(playerid) == kradi[4] || GetPlayerVehicleID(playerid) == kradi[5] || GetPlayerVehicleID(playerid) == kradi[6] || GetPlayerVehicleID(playerid) == kradi[7] || GetPlayerVehicleID(playerid) == kradi[8] || GetPlayerVehicleID(playerid) == kradi[9] || GetPlayerVehicleID(playerid) == kradi[4]) { SendClientMessage(playerid, COLOR_RED, "To hotwire this vehicle use /hotwire"); } } if(newstate == PLAYER_STATE_DRIVER) { if(GetPlayerVehicleID(playerid) == kradi[10]) { SendClientMessage(playerid, COLOR_RED, "To hotwire this vehicle use /hotwire"); } }
Now... This is my code when ppl enter in vehicle. ( The engine can be start with /engine )
Код:
if(newstate == PLAYER_STATE_DRIVER && oldstate != PLAYER_STATE_DRIVER) { new vehicleid = GetPlayerVehicleID(playerid); new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); if(!engine) SendClientMessage(playerid, COLOR_WHITE, "Можете да запалите/изгасите двигателя на колата с {FF6347}/engine{FFFFFF}."); if(!PlayerInfo[playerid][pCarLic]) SendClientMessage(playerid, COLOR_LIGHTRED, "Нямаш книжка . Спазвай закона и се пази от полицията !"); if(IsATowTruck(vehicleid)) SendClientMessage(playerid, COLOR_WHITE, "За да закачите кола използвайте {FF6347}/tow{FFFFFF}."); }