-
Posts
88 -
Joined
-
Last visited
-
Days Won
2
Everything posted by LyN
-
hmm
-
[Gamemode] fTake Romania (Ultima versiune) Realizat de la 0 !
LyN replied to ZeCo.F's topic in Gamemode-uri
test -
hm
-
[Tutorial] Sistem vehicule factiuni cu comanda /fvs
LyN replied to 577777's topic in Tutoriale & ghiduri
? -
"ea"
-
task CheckGas[RunOutTime]() { new engine, lights, alarm, doors, bonnet, boot, objective; foreach(new i : Player) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(i), query[128]; new spe = Carspeed(GetPlayerVehicleID(i)); if(Gas[vehicle] >= 1) { if(vehEngine[vehicle] == 1 && !IsPlayerPaused(i)) { if(noFuelVehicles(vehicle) || IsABoat(vehicle) || ExamCar == vehicle || JobVehicle == vehicle) { Gas[vehicle]++; } if(!IsPlayerPaused(i)) Gas[vehicle]--; new carid = FindSpawnID(vehicle); if(CarInfo[carid][cID] != 0 && carid != 0) { if(spe > 5 && GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerVehicleID(i) == vehicle && !IsPlayerPaused(i)) { CarInfo[carid][KM] += (spe * 0.27) / 100; mysql_format(SQL, query, sizeof query, "UPDATE `cars` SET `KM` = '%f' WHERE `ID` = '%d'", CarInfo[carid][KM], CarInfo[carid][cID]); mysql_tquery(SQL, query, "", ""); } } } } else if(!IsAFLYCar(vehicle)) { NoFuel = 1; GameTextForPlayer(i, "Fara benzina", 1500, 3); vehEngine[vehicle] = 0; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicle, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective); SetPVarInt(i, "Engine", 0); } } } return true; }
-
task CheckGas[RunOutTime]() { new engine, lights, alarm, doors, bonnet, boot, objective; foreach(new i : Player) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(i), query[128]; new spe = Carspeed(GetPlayerVehicleID(i)); if(Gas[vehicle] >= 1 && !IsPlayerPaused(i)) { if(vehEngine[vehicle] == 1) { if(noFuelVehicles(vehicle) || IsABoat(vehicle) || ExamCar == vehicle || JobVehicle == vehicle) { Gas[vehicle]++; } if(!IsPlayerPaused(i)) Gas[vehicle]--; new carid = FindSpawnID(vehicle); if(CarInfo[carid][cID] != 0 && carid != 0) { if(spe > 5 && GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerVehicleID(i) == vehicle && !IsPlayerPaused(i)) { CarInfo[carid][KM] += (spe * 0.27) / 100; mysql_format(SQL, query, sizeof query, "UPDATE `cars` SET `KM` = '%f' WHERE `ID` = '%d'", CarInfo[carid][KM], CarInfo[carid][cID]); mysql_tquery(SQL, query, "", ""); } } } } else if(!IsAFLYCar(vehicle)) { NoFuel = 1; GameTextForPlayer(i, "Fara benzina", 1500, 3); vehEngine[vehicle] = 0; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicle, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective); SetPVarInt(i, "Engine", 0); } } } return true; }
-
mysql_format(SQL, query, sizeof query , "UPDATE `cars` SET `Neon` = '%d' WHERE `ID`='%d'", CarInfo[carid][cNeon], carid); mysql_tquery(SQL, query, "", "");
-
task CheckGas[RunOutTime]() { new engine, lights, alarm, doors, bonnet, boot, objective; foreach(new i : Player) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(i), query[128]; new spe = Carspeed(GetPlayerVehicleID(i)); if(spe < 1) return true; if(Gas[vehicle] >= 1) { if(vehEngine[vehicle] == 1) { if(noFuelVehicles(vehicle) || IsABoat(vehicle) || ExamCar == vehicle || JobVehicle == vehicle) { Gas[vehicle]++; } if(!IsPlayerPaused(i)) Gas[vehicle]--; new carid = FindSpawnID(vehicle); if(CarInfo[carid][cID] != 0 && carid != 0) { if(spe > 5 && GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerVehicleID(i) == vehicle && !IsPlayerPaused(i)) { CarInfo[carid][KM] += (spe * 0.27) / 100; mysql_format(SQL, query, sizeof query, "UPDATE `cars` SET `KM` = '%f' WHERE `ID` = '%d'", CarInfo[carid][KM], CarInfo[carid][cID]); mysql_tquery(SQL, query, "", ""); } } } } else if(!IsAFLYCar(vehicle)) { NoFuel = 1; GameTextForPlayer(i, "Fara benzina", 1500, 3); vehEngine[vehicle] = 0; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicle, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective); SetPVarInt(i, "Engine", 0); } } } return true; }
-
function noFuelVehicles(vehicleid) { switch (GetVehicleModel(vehicleid)) { case 481, 509, 510, 460, 476, 511, 512, 513, 519, 520, 553, 577, 592, 593: return 1; } return 0; } task CheckGas[RunOutTime]() { new engine, lights, alarm, doors, bonnet, boot, objective; foreach(new i : Player) { if(GetPlayerState(i) == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(i), query[128]; if(Gas[vehicle] >= 1) { if(vehEngine[vehicle] == 1) { if(noFuelVehicles(vehicle) || IsABoat(vehicle) || ExamCar == vehicle || JobVehicle == vehicle) { Gas[vehicle]++; } if(!IsPlayerPaused(i)) Gas[vehicle]--; new carid = FindSpawnID(vehicle); if(CarInfo[carid][cID] != 0 && carid != 0) { new spe = Carspeed(GetPlayerVehicleID(i)); if(spe > 5 && GetPlayerState(i) == PLAYER_STATE_DRIVER && GetPlayerVehicleID(i) == vehicle && !IsPlayerPaused(i)) { CarInfo[carid][KM] += (spe * 0.27) / 100; mysql_format(SQL, query, sizeof query, "UPDATE `cars` SET `KM` = '%f' WHERE `ID` = '%d'", CarInfo[carid][KM], CarInfo[carid][cID]); mysql_tquery(SQL, query, "", ""); } } } } else if(!IsAFLYCar(vehicle)) { NoFuel = 1; GameTextForPlayer(i, "Fara benzina", 1500, 3); vehEngine[vehicle] = 0; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); SetVehicleParamsEx(vehicle, VEHICLE_PARAMS_OFF, lights, alarm, doors, bonnet, boot, objective); SetPVarInt(i, "Engine", 0); } } } return true; } Incearca asa
-
getName(PersonalVehicle[pvModelID]); , functia getName e perntu numele vehiculelor sau numele jucatorilor?
-
Dialog:DIALOG_GENDER(playerid, response) { new query[128]; if(response) { mysql_format(SQL, query, sizeof query, "UPDATE `users` SET `gender` = '0', `model`= '26' WHERE `name` = '%s'", GetName(playerid)); mysql_pquery(SQL, query, "", ""); format(string, sizeof(string), ""#COL_SERVER">> "#COL_WHITE"Sex setat: Masculin"); SCM(playerid, -1, string); Dialog_Show(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, ">> Seteaza un E-mail", "Pentru a fi la curent cu tot ce se intampla cu acest server, te rugam sa introduci un e-mail", "Set", "Inchide"); } else { mysql_format(SQL, query, sizeof query, "UPDATE `users` SET `gender` = '1', `model`= '90' WHERE `name` = '%s'", GetName(playerid)); mysql_pquery(SQL, query, "", ""); format(string, sizeof(string), ""#COL_SERVER">> "#COL_WHITE"Sex setat: Feminin"); SCM(playerid, -1, string); Dialog_Show(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, ">> Seteaza un E-mail", "Pentru a fi la curent cu tot ce se intampla cu acest server, te rugam sa introduci un e-mail", "Set", "Inchide"); } return 1; }
-
nu pare sa fie aici problema, functia se numea checkgas sau ceva de genu'
-
[Tutorial] Admini, helperi, lideri etc. pe iteratori
LyN replied to 577777's topic in Tutoriale & ghiduri
hmm -
in serverlog/mysqllog ai erori?
-
Daca nu ma insel e o problema din baza de date, nu sunt in ordine id urile la bizuri... Nu mai stiu exact
ABOUT LEAKS COMMUNITY
LEAKS.RO is a resource community where aspiring webmasters can share content and receive support for a wide variety of software platforms — no license required.