forward motorinditas(playerid);forward lefulladtkocsi(playerid);new kocsimotor[MAX_VEHICLES];public OnPlayerStateChange(playerid, newstate, oldstate){ new kocsiid = GetPlayerVehicleID(playerid); if(newstate == PLAYER_STATE_DRIVER) { if(kocsimotor[kocsiid] == 0) { TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, CITROM, \"A motor nincs beinditva\"); SendClientMessage(playerid, NARANCS, \"Az inditáshoz nyomj /SHIFT/-et\"); } else if(kocsimotor[kocsiid] == 1) { TogglePlayerControllable(playerid, 1); SendClientMessage(playerid, CITROM, \"A motor bevan inditva\"); } } return 1;}public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){ new kocsiid = GetPlayerVehicleID(playerid); if(IsPlayerInAnyVehicle(playerid)) { if(kocsimotor[kocsiid] == 0) { if(newkeys == KEY_JUMP) { kocsimotor[kocsiid] = 2; SetTimerEx(\"motorinditas\", 3000, 0, \"i\", playerid); SendClientMessage(playerid, SIKER, \"A motor beindult\"); } } if(newkeys == KEY_SECONDARY_ATTACK) { RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); } } return 1;}public motorinditas(playerid){ new kocsiid = GetPlayerVehicleID(playerid); new Float:elet; new rand = random(2); GetVehicleHealth(kocsiid, elet); if(IsPlayerInAnyVehicle(playerid)) { if(kocsimotor[kocsiid] == 2) { if(elet > 300) { if(rand == 0) { kocsimotor[kocsiid] = 1; TogglePlayerControllable(playerid, 1); SetTimerEx(\"lefulladtkocsi\", 1000, 1, \"i\", playerid); SendClientMessage(playerid, SIKER, \"A motor beindult\"); } if(rand == 1) { kocsimotor[kocsiid] = 0; TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, HIBA, \"A motor nem indult be\"); } } else { kocsimotor[kocsiid] = 0; TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, HIBA, \"A jármû motorja elromlott\"); } } } return 1;}public lefulladtkocsi(playerid){ new kocsiid = GetPlayerVehicleID(playerid); new Float:elet; GetVehicleHealth(kocsiid, elet); if(IsPlayerInAnyVehicle(playerid)) { if(kocsimotor[kocsiid] == 1) { if(elet < 300) { kocsimotor[kocsiid] = 0; TogglePlayerControllable(playerid, 0); SendClientMessage(playerid, HIBA, \"A jármû motorja lefulladt\"); } } } return 1;}
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 510) printf(\"Ez egy bicikli, amelynek nem tudod beindítani a nem létezõ motorját.\");
forward biciklizar(playerid);public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger){if(IsPlayerInAnyVehicle(playerid)){if(GetVehicleModel(vehicleid) == 510){SendClientMessage(playerid, CITROM, \"Ird be /biciklizar\");TogglePlayerControllable(playerid,0);}}return 1;}CMD:biciklizar(playerid, params[]){SetTimerEx(\"biciklizar\", 3000, 1, \"i\", playerid);SendClientMessage(playerid, CITROM, \"Kinyitod a postásbicikli zárját\");cmd_me(playerid, \"zörög a postásbicikli zárával\");}public biciklizar(playerid){TogglePlayerControllable(playerid, 1);return 1;}
forward biciklizar(playerid);public OnPlayerUpdate(playerid){if(IsPlayerInAnyVehicle(playerid)){new vehid;vehid = GetPlayerVehicleID(playerid);if(GetVehicleModel(vehid) == 510){ SendClientMessage(playerid, CITROM, \"Ird be /biciklizar\"); TogglePlayerControllable(playerid,0);}}return 1;}CMD:biciklizar(playerid){if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, CITROM, \"Nem ülsz biciklin!\");new vehid;vehid = GetPlayerVehicleID(playerid);if(GetVehicleModel(vehid) != 510) return SendClientMessage(playerid, CITROM, \"Nem ülsz biciklin!\");SetTimerEx(\"biciklizar\", 3000, 0, \"i\", playerid);SendClientMessage(playerid, CITROM, \"Kinyitod a postásbicikli zárját\");cmd_me(playerid, \"zörög a postásbicikli zárával\");return 1;}public biciklizar(playerid){TogglePlayerControllable(playerid, 1);return 1;}