Smokey20_official Posted February 1 Report Share Posted February 1 Salut, am copiat toate scripturile legate de stage din gamemodeul bhood in gamemodeul burned si viteza vehiculului nu se actualizeaza. Va rog sa ma ajutati. Un infernus fara stage prinde maxim 209, dar cu stage prinde tot 209 function OneTimer() { foreach(new i : IsSpeed) GiveVehicleSpeed(i); return 1; } l-am trecut sub functie deoarece sub forma de task dadea erori, iar apoi am zis sa apelez la functia de timer, dar nu mai stiu unde trebuia sa o pun. SetTimer("OneTimer", 350, true); Quote Link to comment Share on other sites More sharing options...
nobilzeus Posted February 2 Report Share Posted February 2 (edited) arată funcția aia givevehiclespeed si mai bine muți să fie apela funcția asta doar când tine apasat pe w Edited February 2 by nobilzeus Quote Link to comment Share on other sites More sharing options...
Smokey20_official Posted February 2 Author Report Share Posted February 2 7 hours ago, nobilzeus said: arată funcția aia givevehiclespeed si mai bine muți să fie apela funcția asta doar când tine apasat pe w function GiveVehicleSpeed(i) { if(ServerSystem[11] == 1 || !IsPlayerInAnyVehicle(i)) return true; new vehicleid = GetPlayerVehicleID(i), keys, Float:vx, Float:vy, Float:vz, carid = FindSpawnID(GetPlayerVehicleID(i)) ; if(GetVehicleSpeedUp(i, carid)) return true; GetPlayerKeys(i, keys, _:vx, _:vx); if ((keys & (KEY_VEHICLE_FORWARD | KEY_VEHICLE_BACKWARD | KEY_HANDBRAKE)) == KEY_VEHICLE_FORWARD) { GetVehicleVelocity(vehicleid, vx, vy, vz); if (vx * vx + vy * vy < g_SpeedThreshold) return true; vx *= SPEED_MULTIPLIER; vy *= SPEED_MULTIPLIER; if (vz > 0.04 || vz < -0.04) vz -= 0.020; SetVehicleVelocity(vehicleid, vx, vy, vz); } return true; } Quote Link to comment Share on other sites More sharing options...
segmentationfault Posted February 2 Report Share Posted February 2 10 hours ago, nobilzeus said: arată funcția aia givevehiclespeed si mai bine muți să fie apela funcția asta doar când tine apasat pe w și ce faci dacă mașina își pierde treptat din viteză (neapăsând pe W)? Quote Link to comment Share on other sites More sharing options...
nobilzeus Posted February 2 Report Share Posted February 2 (edited) 1 hour ago, segmentationfault said: și ce faci dacă mașina își pierde treptat din viteză (neapăsând pe W)? nu asta e logica? dacă nu apeși pe w încetinești if(GetVehicleSpeedUp(i, carid) ia vezi aici Edited February 2 by nobilzeus Quote Link to comment Share on other sites More sharing options...
Smokey20_official Posted February 2 Author Report Share Posted February 2 8 hours ago, nobilzeus said: nu asta e logica? dacă nu apeși pe w încetinești if(GetVehicleSpeedUp(i, carid) ia vezi aici function GiveVehicleSpeed(i) { if(ServerSystem[11] == 1 || !IsPlayerInAnyVehicle(i)) return true; new vehicleid = GetPlayerVehicleID(i), keys, Float:vx, Float:vy, Float:vz, carid = FindSpawnID(GetPlayerVehicleID(i)) ; if(GetVehicleSpeedUp(i, carid)) return true; GetPlayerKeys(i, keys, _:vx, _:vx); if ((keys & (KEY_VEHICLE_FORWARD | KEY_VEHICLE_BACKWARD | KEY_HANDBRAKE)) == KEY_VEHICLE_FORWARD) { GetVehicleVelocity(vehicleid, vx, vy, vz); if (vx * vx + vy * vy < g_SpeedThreshold) return true; vx *= SPEED_MULTIPLIER; vy *= SPEED_MULTIPLIER; if (vz > 0.04 || vz < -0.04) vz -= 0.020; SetVehicleVelocity(vehicleid, vx, vy, vz); } return true; } Quote Link to comment Share on other sites More sharing options...
nobilzeus Posted February 2 Report Share Posted February 2 1 minute ago, Smokey20_official said: function GiveVehicleSpeed(i) { if(ServerSystem[11] == 1 || !IsPlayerInAnyVehicle(i)) return true; new vehicleid = GetPlayerVehicleID(i), keys, Float:vx, Float:vy, Float:vz, carid = FindSpawnID(GetPlayerVehicleID(i)) ; if(GetVehicleSpeedUp(i, carid)) return true; GetPlayerKeys(i, keys, _:vx, _:vx); if ((keys & (KEY_VEHICLE_FORWARD | KEY_VEHICLE_BACKWARD | KEY_HANDBRAKE)) == KEY_VEHICLE_FORWARD) { GetVehicleVelocity(vehicleid, vx, vy, vz); if (vx * vx + vy * vy < g_SpeedThreshold) return true; vx *= SPEED_MULTIPLIER; vy *= SPEED_MULTIPLIER; if (vz > 0.04 || vz < -0.04) vz -= 0.020; SetVehicleVelocity(vehicleid, vx, vy, vz); } return true; } ai dat aceiași vezi ca are Up la sfârșit Quote Link to comment Share on other sites More sharing options...
Smokey20_official Posted February 2 Author Report Share Posted February 2 2 minutes ago, nobilzeus said: ai dat aceiași vezi ca are Up la sfârșit Presupun ca am gasit problema, iti spun imediat Quote Link to comment Share on other sites More sharing options...
Smokey20_official Posted February 2 Author Report Share Posted February 2 10 minutes ago, nobilzeus said: ai dat aceiași vezi ca are Up la sfârșit function GetVehicleSpeedUp(playerid, carid) { if(ServerSystem[11] == 1) return true; new x, m = CarInfo[carid][cMaxSpeed]; x = CarInfo[carid][cStage] ? StageSpeed[0][CarInfo[carid][cStage]]+x : x; return Carspeed(GetPlayerVehicleID(playerid)) < (m-3) || Carspeed(GetPlayerVehicleID(playerid)) > (x-3) ? (true) : (false); } Quote Link to comment Share on other sites More sharing options...
nobilzeus Posted February 3 Report Share Posted February 3 (edited) cmaxspeed trebuie setat la toate mașinile, poți faci asta când o cumperi sau când faci upgrade la stage, posibil să ai deja vitezele maxime pt mașini în tabelul de la dealership și iei viteză maximă de acolo dacă e gm de pe net posibil ca unele valori să fie greșite pt anumite mașini deci probabil trebuie să actualizezi viteza maximă din tabel pt unele Edited February 3 by nobilzeus Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.