|
 |
|
|
|
|
|
GTA Modification Forums
how do I use this code
 |
|
 |
| |
Skorpro  |
|
GTAholiker

Group: Members
Joined: Jul 19, 2009


|
Hi, try this... ScriptHook (C++)CustomFiberThread.h| CODE | void SkorproTrafficControl();
| CustomFiberThread.cpp| CODE | // Global int tr_changeTraffic = 1;
|
| CODE | void CustomFiberThread::SkorproTrafficControl() { switch(tr_changeTraffic) { case 1: f32 tcx, tcy, tcz; GetCharCoordinates(GetPlayerPed(), &tcx, &tcy, &tcz); ClearAreaOfCars(tcx, tcy, tcz, 400.0f); ClearAreaOfChars(tcx, tcy, tcz, 400.0f); ClearAreaOfCops(tcx, tcy, tcz, 400.0f); tr_changeTraffic = 2; PrintStringWithLiteralStringNow("STRING","No Traffic",3000,1); SetCarDensityMultiplier(0.00); SetPedDensityMultiplier(0.00); SwitchGarbageTrucks(0); SetRandomCarDensityMultiplier(0.00); SetParkedCarDensityMultiplier(2.25); AllowEmergencyServices(0); SwitchRandomBoats(0); SwitchRandomTrains(0); SwitchAmbientPlanes(0); break; case 2: tr_changeTraffic = 3; PrintStringWithLiteralStringNow("STRING","Low Traffic",3000,1); SetCarDensityMultiplier(0.25); SetPedDensityMultiplier(0.50); SwitchGarbageTrucks(1); SetRandomCarDensityMultiplier(0.25); SetParkedCarDensityMultiplier(2.25); AllowEmergencyServices(1); SwitchRandomBoats(1); SwitchRandomTrains(1); SwitchAmbientPlanes(1); break; case 3: tr_changeTraffic = 4; PrintStringWithLiteralStringNow("STRING","Standard",3000,1); SetCarDensityMultiplier(1.25); SetPedDensityMultiplier(1.50); SwitchGarbageTrucks(1); SetRandomCarDensityMultiplier(1.25); SetParkedCarDensityMultiplier(2.25); AllowEmergencyServices(1); break; case 4: tr_changeTraffic = 5; PrintStringWithLiteralStringNow("STRING","High Traffic",3000,1); SetCarDensityMultiplier(3.25); SetPedDensityMultiplier(3.50); SwitchGarbageTrucks(1); SetRandomCarDensityMultiplier(3.25); SetParkedCarDensityMultiplier(2.25); AllowEmergencyServices(1); break; case 5: tr_changeTraffic = 1; PrintStringWithLiteralStringNow("STRING","Full Traffic",3000,1); SetCarDensityMultiplier(7.25); SetPedDensityMultiplier(7.50); SwitchGarbageTrucks(1); SetRandomCarDensityMultiplier(7.25); SetParkedCarDensityMultiplier(2.25); AllowEmergencyServices(1); break; default: Wait(10); } }
|
| CODE | void CustomFiberThread::RunScript() { while(IsThreadAlive()) { if (GetKeyState(16) && (GetKeyState(84) < 0)) // Shift + Key T ! { SkorproTrafficControl(); Wait(200); } } }
| Or simply download my Traffic Control mod! Have fun...
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|