SHOW:
|
|
- or go back to the newest paste.
| 1 | //============================================================================== | |
| 2 | - | Scripted By BlueFire_ |
| 2 | + | //---------------------------[SCRIPTED BY: BLUEFIRE_]--------------------------- |
| 3 | - | Gantzyo (For Object Functions) :) |
| 3 | + | //--------------[SPECIAL THANKS TO: GANTZYO FOR OBJECT FUNCTIONS]--------------- |
| 4 | //============================================================================== | |
| 5 | ||
| 6 | /* | |
| 7 | native CreateStaticIcon(Float:x,Float:y,Float:z,markertype,color); | |
| 8 | native CreateStaticObject(model,Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz); | |
| 9 | native CreateStaticCheckpoint(Float:x,Float:y,Float:z,Float:size); | |
| 10 | native DestroyStaticCheckpoint(checkpointid); | |
| 11 | native EnableCheckpointForPlayer(playerid,checkpointid); | |
| 12 | native DisableCheckpointForPlayer(playerid,checkpointid); | |
| 13 | native EnableCheckpointForAll(checkpointid); | |
| 14 | native DisableCheckpointForAll(checkpointid); | |
| 15 | native RotateObject(objectid,Float:rotX,Float:rotY,Float:rotZ,points,Float:speed); | |
| 16 | native SetObjectRotationSpeed(objectid,Float:speed); | |
| 17 | native StopRotatingObject(objectid); | |
| 18 | native GenerateBucle(objectid,Float:offX,Float:offY,Float:offZ,Float:speed) | |
| 19 | native StopBucle(objectid); | |
| 20 | native OnObjectRotated(objectid); | |
| 21 | native OnObjectStopRotate(objectid); | |
| 22 | native OnObjectStopBucle(objectid); | |
| 23 | native ReSpawn(playerid); | |
| 24 | native SetPlayerPosEx(playerid, Float:x ,Float:y,Float:z,Float:a,interior = 0,vw = 0); | |
| 25 | native CreateVehicleForPlayer(playerid, vehiclename[], color1, color2, Float:Health); | |
| 26 | native DeletePlayerVehicle(playerid); | |
| 27 | native RemoveBuilding(modelid, Float:oX, Float:oY, Float:oZ, Float:oRadius = 0.25, Float:orX = 0.0, Float:orY = 0.0, Float:orZ = 0.0); | |
| 28 | native RestoreBuilding(slotid); | |
| 29 | native RemoveSpecificBuilding(modelid); | |
| 30 | native CountRemovedObjects(); | |
| 31 | */ | |
| 32 | #include <a_samp> | |
| 33 | #if defined e_steam | |
| 34 | #endinput | |
| 35 | #endif | |
| 36 | ||
| 37 | #define e_steam | |
| 38 | #undef MAX_OBJECTS | |
| 39 | #define MAX_OBJECTS 200 | |
| 40 | #define STEAM_ICONS 200 | |
| 41 | #define STEAM_OBJECTS 2000 | |
| 42 | #define STEAM_CHECKPOINTS 100 | |
| 43 | #define DRAW_DISTANCE_ICONS 250.0 | |
| 44 | #define DRAW_DISTANCE_OBJECTS 75.0 | |
| 45 | #define SERVER_OBJECTS 1000 | |
| 46 | - | enum RemovedObjectsENUM {_model, Float:_oX, Float:_oY, Float:_oZ, Float:_orX, Float:_orY, Float:_orZ, Float:_oRadius, restored}
|
| 46 | + | |
| 47 | #define MAX_REMOVED_OBJECTS 100 | |
| 48 | - | enum PV_User { vehicle };
|
| 48 | + | |
| 49 | ||
| 50 | - | new Float:newrotX[SERVER_OBJECTS]; new Float:newrotY[SERVER_OBJECTS]; |
| 50 | + | //============================================================================== |
| 51 | - | new Float:newrotZ[SERVER_OBJECTS]; new Float:odifX[SERVER_OBJECTS]; |
| 51 | + | //------------------------------[ENUMS START HERE]------------------------------ |
| 52 | - | new Float:odifY[SERVER_OBJECTS]; new Float:odifZ[SERVER_OBJECTS]; |
| 52 | + | //============================================================================== |
| 53 | - | new ospeed[SERVER_OBJECTS]; new oTimer[SERVER_OBJECTS]; |
| 53 | + | |
| 54 | - | new oState[SERVER_OBJECTS]; new opoints[SERVER_OBJECTS]; |
| 54 | + | enum RemovedObjectsENUM |
| 55 | {
| |
| 56 | - | forward CreateVehicleForPlayer(playerid, vehiclename[], color1, color2, Float:Health); |
| 56 | + | _model, |
| 57 | - | forward DeletePlayerVehicle(playerid); forward ToggleSteamer(); forward CreateStaticIcon(Float:x,Float:y,Float:z,markertype,color); |
| 57 | + | Float:_oX, |
| 58 | - | forward CreateStaticObject(model,Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz); |
| 58 | + | Float:_oY, |
| 59 | - | forward CreateStaticCheckpoint(Float:x,Float:y,Float:z,Float:size); forward DestroyStaticCheckpoint(checkpointid); |
| 59 | + | Float:_oZ, |
| 60 | - | forward EnableCheckpointForPlayer(playerid,checkpointid); forward DisableCheckpointForPlayer(playerid,checkpointid); |
| 60 | + | Float:_orX, |
| 61 | - | forward EnableCheckpointForAll(checkpointid); forward DisableCheckpointForAll(checkpointid); |
| 61 | + | Float:_orY, |
| 62 | - | forward OnObjectStopRotate(objectid); forward OnObjectStopBucle(objectid); |
| 62 | + | Float:_orZ, |
| 63 | - | stock ReSpawn(playerid) { SpawnPlayer(playerid); return 1; }
|
| 63 | + | Float:_oRadius, |
| 64 | - | stock RotateObject(objectid,Float:rotX,Float:rotY,Float:rotZ,points,Float:speed) {
|
| 64 | + | restored |
| 65 | - | if(oState[objectid] == 1)KillTimer(oTimer[objectid]); |
| 65 | + | }; |
| 66 | - | ospeed[objectid] = floatround(floatdiv(1000,speed),floatround_round); |
| 66 | + | |
| 67 | - | oTimer[objectid] = SetTimerEx("RotateObj",ospeed[objectid],0,"dd",objectid,points);
|
| 67 | + | |
| 68 | - | newrotX[objectid] = rotX; newrotY[objectid] = rotY; newrotZ[objectid] = rotZ; |
| 68 | + | enum PV_User |
| 69 | - | new Float:rot[3]; GetObjectRot(objectid,rot[0],rot[1],rot[2]); |
| 69 | + | {
|
| 70 | - | odifX[objectid] = (rotX-rot[0])/points; odifY[objectid] = (rotY-rot[1])/points; |
| 70 | + | vehicle |
| 71 | - | odifZ[objectid] = (rotZ-rot[2])/points; oState[objectid] = 1; opoints[objectid] = 0; |
| 71 | + | }; |
| 72 | - | return 1; } |
| 72 | + | |
| 73 | - | public CreateVehicleForPlayer(playerid, vehiclename[], color1, color2, Float:Health) {
|
| 73 | + | |
| 74 | - | new pvmid; |
| 74 | + | enum CheckpointEnum |
| 75 | - | if(strfind("Landstalker", vehiclename,true,0) != -1) pvmid = 400;
|
| 75 | + | {
|
| 76 | - | if(strfind("Bravura", vehiclename,true,0) != -1) pvmid = 401;
|
| 76 | + | Float:checkpoint_x, |
| 77 | - | if(strfind("Buffalo", vehiclename,true,0) != -1) pvmid = 402;
|
| 77 | + | Float:checkpoint_y, |
| 78 | - | if(strfind("Linerunner", vehiclename,true,0) != -1) pvmid = 403;
|
| 78 | + | Float:checkpoint_z, |
| 79 | - | if(strfind("Perenniel", vehiclename,true,0) != -1) pvmid = 404;
|
| 79 | + | Float:checkpoint_size |
| 80 | - | if(strfind("Sentinel", vehiclename,true,0) != -1) pvmid = 405;
|
| 80 | + | }; |
| 81 | - | if(strfind("Dumper", vehiclename,true,0) != -1) pvmid = 406;
|
| 81 | + | new Checkpoint[STEAM_CHECKPOINTS][CheckpointEnum]; |
| 82 | - | if(strfind("Firetuck", vehiclename,true,0) != -1) pvmid = 407;
|
| 82 | + | new CheckpointsToShow[MAX_PLAYERS][STEAM_CHECKPOINTS]; |
| 83 | - | if(strfind("Trashmaster", vehiclename,true,0) != -1) pvmid = 408;
|
| 83 | + | |
| 84 | - | if(strfind("Stretch", vehiclename,true,0) != -1) pvmid = 409;
|
| 84 | + | enum IconEnum |
| 85 | - | if(strfind("Manana", vehiclename,true,0) != -1) pvmid = 410;
|
| 85 | + | {
|
| 86 | - | if(strfind("Infernus", vehiclename,true,0) != -1) pvmid = 411;
|
| 86 | + | Float:icon_x, |
| 87 | - | if(strfind("Voodoo", vehiclename,true,0) != -1) pvmid = 412;
|
| 87 | + | Float:icon_y, |
| 88 | - | if(strfind("Pony", vehiclename,true,0) != -1) pvmid = 413;
|
| 88 | + | Float:icon_z, |
| 89 | - | if(strfind("Mule", vehiclename,true,0) != -1) pvmid = 414;
|
| 89 | + | icon_markertype, |
| 90 | - | if(strfind("Cheetah", vehiclename,true,0) != -1) pvmid = 415;
|
| 90 | + | icon_color |
| 91 | - | if(strfind("Ambulance", vehiclename,true,0) != -1) pvmid = 416;
|
| 91 | + | }; |
| 92 | - | if(strfind("Leviathan", vehiclename,true,0) != -1) pvmid = 417;
|
| 92 | + | new Icon[STEAM_ICONS][IconEnum]; |
| 93 | - | if(strfind("Moonbeam", vehiclename,true,0) != -1) pvmid = 418;
|
| 93 | + | |
| 94 | - | if(strfind("Esperanto", vehiclename,true,0) != -1) pvmid = 419;
|
| 94 | + | enum Materials |
| 95 | - | if(strfind("Taxi", vehiclename,true,0) != -1) pvmid = 420;
|
| 95 | + | {
|
| 96 | - | if(strfind("Washington", vehiclename,true,0) != -1) pvmid = 421;
|
| 96 | + | object_model, |
| 97 | - | if(strfind("Bobcat", vehiclename,true,0) != -1) pvmid = 422;
|
| 97 | + | Float:object_x, |
| 98 | - | if(strfind("Mr Whoopie", vehiclename,true,0) != -1) pvmid = 423;
|
| 98 | + | Float:object_y, |
| 99 | - | if(strfind("BF Injection", vehiclename,true,0) != -1) pvmid = 424;
|
| 99 | + | Float:object_z, |
| 100 | - | if(strfind("Hunter", vehiclename,true,0) != -1) pvmid = 425;
|
| 100 | + | Float:object_rx, |
| 101 | - | if(strfind("Premier", vehiclename,true,0) != -1) pvmid = 426;
|
| 101 | + | Float:object_ry, |
| 102 | - | if(strfind("Enforcer", vehiclename,true,0) != -1) pvmid = 427;
|
| 102 | + | Float:object_rz |
| 103 | - | if(strfind("Securicar", vehiclename,true,0) != -1) pvmid = 428;
|
| 103 | + | }; |
| 104 | - | if(strfind("Banshee", vehiclename,true,0) != -1) pvmid = 429;
|
| 104 | + | new Object[STEAM_OBJECTS][Materials]; |
| 105 | - | if(strfind("Predator", vehiclename,true,0) != -1) pvmid = 430;
|
| 105 | + | |
| 106 | - | if(strfind("Bus", vehiclename,true,0) != -1) pvmid = 431;
|
| 106 | + | new Float:newrotX[SERVER_OBJECTS]; |
| 107 | - | if(strfind("Rhino", vehiclename,true,0) != -1) pvmid = 432;
|
| 107 | + | new Float:newrotY[SERVER_OBJECTS]; |
| 108 | - | if(strfind("Barracks", vehiclename,true,0) != -1) pvmid = 433;
|
| 108 | + | new Float:newrotZ[SERVER_OBJECTS]; |
| 109 | - | if(strfind("Hotknife", vehiclename,true,0) != -1) pvmid = 434;
|
| 109 | + | new Float:odifX[SERVER_OBJECTS]; |
| 110 | - | if(strfind("ArticleTrailer", vehiclename,true,0) != -1) pvmid = 435;
|
| 110 | + | new Float:odifY[SERVER_OBJECTS]; |
| 111 | - | if(strfind("Previon", vehiclename,true,0) != -1) pvmid = 436;
|
| 111 | + | new Float:odifZ[SERVER_OBJECTS]; |
| 112 | - | if(strfind("Coach", vehiclename,true,0) != -1) pvmid = 437;
|
| 112 | + | new ospeed[SERVER_OBJECTS]; |
| 113 | - | if(strfind("Cabbie", vehiclename,true,0) != -1) pvmid = 438;
|
| 113 | + | new oTimer[SERVER_OBJECTS]; |
| 114 | - | if(strfind("Stallion", vehiclename,true,0) != -1) pvmid = 439;
|
| 114 | + | new oState[SERVER_OBJECTS]; |
| 115 | - | if(strfind("Rumpo", vehiclename,true,0) != -1) pvmid = 440;
|
| 115 | + | new opoints[SERVER_OBJECTS]; |
| 116 | - | if(strfind("RCBandit", vehiclename,true,0) != -1) pvmid = 441;
|
| 116 | + | new ObjectID[MAX_OBJECTS]; |
| 117 | - | if(strfind("Romero", vehiclename,true,0) != -1) pvmid = 442;
|
| 117 | + | new ShownObjects[MAX_PLAYERS] = 0; |
| 118 | - | if(strfind("Packer", vehiclename,true,0) != -1) pvmid = 443;
|
| 118 | + | |
| 119 | - | if(strfind("Monster", vehiclename,true,0) != -1) pvmid = 444;
|
| 119 | + | |
| 120 | - | if(strfind("Admiral", vehiclename,true,0) != -1) pvmid = 445;
|
| 120 | + | //============================================================================== |
| 121 | - | if(strfind("Squallo", vehiclename,true,0) != -1) pvmid = 446;
|
| 121 | + | //---------------------------[FUNCTION FORWARDS HERE]--------------------------- |
| 122 | - | if(strfind("Seasparrow", vehiclename,true,0) != -1) pvmid = 447;
|
| 122 | + | //============================================================================== |
| 123 | - | if(strfind("Pizzaboy", vehiclename,true,0) != -1) pvmid = 448;
|
| 123 | + | |
| 124 | - | if(strfind("Tram", vehiclename,true,0) != -1) pvmid = 449;
|
| 124 | + | forward public CreateVehicleForPlayer(playerid, vehiclename[], color1, color2, Float:Health); |
| 125 | - | if(strfind("Article Trailer 2", vehiclename,true,0) != -1) pvmid = 450;
|
| 125 | + | forward public CreateStaticIcon(Float:x,Float:y,Float:z,markertype,color); |
| 126 | - | if(strfind("Turismo", vehiclename,true,0) != -1) pvmid = 451;
|
| 126 | + | forward public DeletePlayerVehicle(playerid); |
| 127 | - | if(strfind("Speeder", vehiclename,true,0) != -1) pvmid = 452;
|
| 127 | + | forward public ToggleSteamer(); |
| 128 | - | if(strfind("Reefer", vehiclename,true,0) != -1) pvmid = 453;
|
| 128 | + | forward public CreateStaticObject(model,Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz); |
| 129 | - | if(strfind("Tropic", vehiclename,true,0) != -1) pvmid = 454;
|
| 129 | + | forward public CreateStaticCheckpoint(Float:x,Float:y,Float:z,Float:size); |
| 130 | - | if(strfind("Flatbed", vehiclename,true,0) != -1) pvmid = 455;
|
| 130 | + | forward public DestroyStaticCheckpoint(checkpointid); |
| 131 | - | if(strfind("Yankee", vehiclename,true,0) != -1) pvmid = 456;
|
| 131 | + | forward public EnableCheckpointForPlayer(playerid,checkpointid); |
| 132 | - | if(strfind("Caddy", vehiclename,true,0) != -1) pvmid = 457;
|
| 132 | + | forward public DisableCheckpointForPlayer(playerid,checkpointid); |
| 133 | - | if(strfind("Solair", vehiclename,true,0) != -1) pvmid = 458;
|
| 133 | + | forward public EnableCheckpointForAll(checkpointid); |
| 134 | - | if(strfind("Berkley's RC Van", vehiclename,true,0) != -1) pvmid = 459;
|
| 134 | + | forward public DisableCheckpointForAll(checkpointid); |
| 135 | - | if(strfind("Skimmer", vehiclename,true,0) != -1) pvmid = 460;
|
| 135 | + | forward public OnObjectStopRotate(objectid); |
| 136 | - | if(strfind("PCJ600", vehiclename,true,0) != -1) pvmid = 461;
|
| 136 | + | forward public OnObjectStopBucle(objectid); |
| 137 | - | if(strfind("Faggio", vehiclename,true,0) != -1) pvmid = 462;
|
| 137 | + | forward public RotateObj(objectid,points); |
| 138 | - | if(strfind("Freeway", vehiclename,true,0) != -1) pvmid = 463;
|
| 138 | + | forward public RotateObjectBucle(objectid); |
| 139 | - | if(strfind("RCBaron", vehiclename,true,0) != -1) pvmid = 464;
|
| 139 | + | |
| 140 | - | if(strfind("RCRaider", vehiclename,true,0) != -1) pvmid = 465;
|
| 140 | + | //============================================================================== |
| 141 | - | if(strfind("Glendale", vehiclename,true,0) != -1) pvmid = 466;
|
| 141 | + | //---------------------------[FUNCTION PUBLICS HERE]---------------------------- |
| 142 | - | if(strfind("Oceanic", vehiclename,true,0) != -1) pvmid = 467;
|
| 142 | + | //============================================================================== |
| 143 | - | if(strfind("Sanchez", vehiclename,true,0) != -1) pvmid = 468;
|
| 143 | + | |
| 144 | - | if(strfind("Sparrow", vehiclename,true,0) != -1) pvmid = 469;
|
| 144 | + | public CreateVehicleForPlayer(playerid, vehiclename[], color1, color2, Float:Health) |
| 145 | - | if(strfind("Patriot", vehiclename,true,0) != -1) pvmid = 470;
|
| 145 | + | {
|
| 146 | - | if(strfind("Quad", vehiclename,true,0) != -1) pvmid = 471;
|
| 146 | + | new pvmid; |
| 147 | - | if(strfind("Coastguard", vehiclename,true,0) != -1) pvmid = 472;
|
| 147 | + | if(strfind("Landstalker", vehiclename,true,0) != -1) pvmid = 400;
|
| 148 | - | if(strfind("Dinghy", vehiclename,true,0) != -1) pvmid = 473;
|
| 148 | + | if(strfind("Bravura", vehiclename,true,0) != -1) pvmid = 401;
|
| 149 | - | if(strfind("Hermes", vehiclename,true,0) != -1) pvmid = 474;
|
| 149 | + | if(strfind("Buffalo", vehiclename,true,0) != -1) pvmid = 402;
|
| 150 | - | if(strfind("Sabre", vehiclename,true,0) != -1) pvmid = 475;
|
| 150 | + | if(strfind("Linerunner", vehiclename,true,0) != -1) pvmid = 403;
|
| 151 | - | if(strfind("Rustler", vehiclename,true,0) != -1) pvmid = 476;
|
| 151 | + | if(strfind("Perenniel", vehiclename,true,0) != -1) pvmid = 404;
|
| 152 | - | if(strfind("ZR350", vehiclename,true,0) != -1) pvmid = 477;
|
| 152 | + | if(strfind("Sentinel", vehiclename,true,0) != -1) pvmid = 405;
|
| 153 | - | if(strfind("Walton", vehiclename,true,0) != -1) pvmid = 478;
|
| 153 | + | if(strfind("Dumper", vehiclename,true,0) != -1) pvmid = 406;
|
| 154 | - | if(strfind("Regina", vehiclename,true,0) != -1) pvmid = 479;
|
| 154 | + | if(strfind("Firetuck", vehiclename,true,0) != -1) pvmid = 407;
|
| 155 | - | if(strfind("Comet", vehiclename,true,0) != -1) pvmid = 480;
|
| 155 | + | if(strfind("Trashmaster", vehiclename,true,0) != -1) pvmid = 408;
|
| 156 | - | if(strfind("BMX", vehiclename,true,0) != -1) pvmid = 481;
|
| 156 | + | if(strfind("Stretch", vehiclename,true,0) != -1) pvmid = 409;
|
| 157 | - | if(strfind("Burrito", vehiclename,true,0) != -1) pvmid = 482;
|
| 157 | + | if(strfind("Manana", vehiclename,true,0) != -1) pvmid = 410;
|
| 158 | - | if(strfind("Camper", vehiclename,true,0) != -1) pvmid = 483;
|
| 158 | + | if(strfind("Infernus", vehiclename,true,0) != -1) pvmid = 411;
|
| 159 | - | if(strfind("Marquis", vehiclename,true,0) != -1) pvmid = 484;
|
| 159 | + | if(strfind("Voodoo", vehiclename,true,0) != -1) pvmid = 412;
|
| 160 | - | if(strfind("Baggage", vehiclename,true,0) != -1) pvmid = 485;
|
| 160 | + | if(strfind("Pony", vehiclename,true,0) != -1) pvmid = 413;
|
| 161 | - | if(strfind("Dozer", vehiclename,true,0) != -1) pvmid = 486;
|
| 161 | + | if(strfind("Mule", vehiclename,true,0) != -1) pvmid = 414;
|
| 162 | - | if(strfind("Maverick", vehiclename,true,0) != -1) pvmid = 487;
|
| 162 | + | if(strfind("Cheetah", vehiclename,true,0) != -1) pvmid = 415;
|
| 163 | - | if(strfind("SAN News Maverick", vehiclename,true,0) != -1) pvmid = 488;
|
| 163 | + | if(strfind("Ambulance", vehiclename,true,0) != -1) pvmid = 416;
|
| 164 | - | if(strfind("Rancher", vehiclename,true,0) != -1) pvmid = 489;
|
| 164 | + | if(strfind("Leviathan", vehiclename,true,0) != -1) pvmid = 417;
|
| 165 | - | if(strfind("FBI Rancher", vehiclename,true,0) != -1) pvmid = 490;
|
| 165 | + | if(strfind("Moonbeam", vehiclename,true,0) != -1) pvmid = 418;
|
| 166 | - | if(strfind("Virgo", vehiclename,true,0) != -1) pvmid = 491;
|
| 166 | + | if(strfind("Esperanto", vehiclename,true,0) != -1) pvmid = 419;
|
| 167 | - | if(strfind("Greenwood", vehiclename,true,0) != -1) pvmid = 492;
|
| 167 | + | if(strfind("Taxi", vehiclename,true,0) != -1) pvmid = 420;
|
| 168 | - | if(strfind("Jetmax", vehiclename,true,0) != -1) pvmid = 493;
|
| 168 | + | if(strfind("Washington", vehiclename,true,0) != -1) pvmid = 421;
|
| 169 | - | if(strfind("Hotring Racer", vehiclename,true,0) != -1) pvmid = 494;
|
| 169 | + | if(strfind("Bobcat", vehiclename,true,0) != -1) pvmid = 422;
|
| 170 | - | if(strfind("Sandking", vehiclename,true,0) != -1) pvmid = 495;
|
| 170 | + | if(strfind("Mr Whoopie", vehiclename,true,0) != -1) pvmid = 423;
|
| 171 | - | if(strfind("Blista Compact", vehiclename,true,0) != -1) pvmid = 496;
|
| 171 | + | if(strfind("BF Injection", vehiclename,true,0) != -1) pvmid = 424;
|
| 172 | - | if(strfind("Police Maverick", vehiclename,true,0) != -1) pvmid = 497;
|
| 172 | + | if(strfind("Hunter", vehiclename,true,0) != -1) pvmid = 425;
|
| 173 | - | if(strfind("Boxville", vehiclename,true,0) != -1) pvmid = 498;
|
| 173 | + | if(strfind("Premier", vehiclename,true,0) != -1) pvmid = 426;
|
| 174 | - | if(strfind("Benson", vehiclename,true,0) != -1) pvmid = 499;
|
| 174 | + | if(strfind("Enforcer", vehiclename,true,0) != -1) pvmid = 427;
|
| 175 | - | if(strfind("Mesa", vehiclename,true,0) != -1) pvmid = 500;
|
| 175 | + | if(strfind("Securicar", vehiclename,true,0) != -1) pvmid = 428;
|
| 176 | - | if(strfind("RC Goblin", vehiclename,true,0) != -1) pvmid = 501;
|
| 176 | + | if(strfind("Banshee", vehiclename,true,0) != -1) pvmid = 429;
|
| 177 | - | if(strfind("Hotring Racer", vehiclename,true,0) != -1) pvmid = 502;
|
| 177 | + | if(strfind("Predator", vehiclename,true,0) != -1) pvmid = 430;
|
| 178 | - | if(strfind("Hotring Racer", vehiclename,true,0) != -1) pvmid = 503;
|
| 178 | + | if(strfind("Bus", vehiclename,true,0) != -1) pvmid = 431;
|
| 179 | - | if(strfind("Bloodring Banger", vehiclename,true,0) != -1) pvmid = 505;
|
| 179 | + | if(strfind("Rhino", vehiclename,true,0) != -1) pvmid = 432;
|
| 180 | - | if(strfind("Rancher", vehiclename,true,0) != -1) pvmid = 505;
|
| 180 | + | if(strfind("Barracks", vehiclename,true,0) != -1) pvmid = 433;
|
| 181 | - | if(strfind("Super GT", vehiclename,true,0) != -1) pvmid = 506;
|
| 181 | + | if(strfind("Hotknife", vehiclename,true,0) != -1) pvmid = 434;
|
| 182 | - | if(strfind("Elegant", vehiclename,true,0) != -1) pvmid = 507;
|
| 182 | + | if(strfind("ArticleTrailer", vehiclename,true,0) != -1) pvmid = 435;
|
| 183 | - | if(strfind("Journey", vehiclename,true,0) != -1) pvmid = 508;
|
| 183 | + | if(strfind("Previon", vehiclename,true,0) != -1) pvmid = 436;
|
| 184 | - | if(strfind("Bike", vehiclename,true,0) != -1) pvmid = 509;
|
| 184 | + | if(strfind("Coach", vehiclename,true,0) != -1) pvmid = 437;
|
| 185 | - | if(strfind("Mountain Bike", vehiclename,true,0) != -1) pvmid = 510;
|
| 185 | + | if(strfind("Cabbie", vehiclename,true,0) != -1) pvmid = 438;
|
| 186 | - | if(strfind("Beagle", vehiclename,true,0) != -1) pvmid = 511;
|
| 186 | + | if(strfind("Stallion", vehiclename,true,0) != -1) pvmid = 439;
|
| 187 | - | if(strfind("Cropduster", vehiclename,true,0) != -1) pvmid = 512;
|
| 187 | + | if(strfind("Rumpo", vehiclename,true,0) != -1) pvmid = 440;
|
| 188 | - | if(strfind("Stuntplane", vehiclename,true,0) != -1) pvmid = 513;
|
| 188 | + | if(strfind("RCBandit", vehiclename,true,0) != -1) pvmid = 441;
|
| 189 | - | if(strfind("Tanker", vehiclename,true,0) != -1) pvmid = 515;
|
| 189 | + | if(strfind("Romero", vehiclename,true,0) != -1) pvmid = 442;
|
| 190 | - | if(strfind("Roadtrain", vehiclename,true,0) != -1) pvmid = 515;
|
| 190 | + | if(strfind("Packer", vehiclename,true,0) != -1) pvmid = 443;
|
| 191 | - | if(strfind("Nebula", vehiclename,true,0) != -1) pvmid = 516;
|
| 191 | + | if(strfind("Monster", vehiclename,true,0) != -1) pvmid = 444;
|
| 192 | - | if(strfind("Majestic", vehiclename,true,0) != -1) pvmid = 517;
|
| 192 | + | if(strfind("Admiral", vehiclename,true,0) != -1) pvmid = 445;
|
| 193 | - | if(strfind("Buccaneer", vehiclename,true,0) != -1) pvmid = 518;
|
| 193 | + | if(strfind("Squallo", vehiclename,true,0) != -1) pvmid = 446;
|
| 194 | - | if(strfind("Shamal", vehiclename,true,0) != -1) pvmid = 519;
|
| 194 | + | if(strfind("Seasparrow", vehiclename,true,0) != -1) pvmid = 447;
|
| 195 | - | if(strfind("Hydra", vehiclename,true,0) != -1) pvmid = 520;
|
| 195 | + | if(strfind("Pizzaboy", vehiclename,true,0) != -1) pvmid = 448;
|
| 196 | - | if(strfind("FCR900", vehiclename,true,0) != -1) pvmid = 521;
|
| 196 | + | if(strfind("Tram", vehiclename,true,0) != -1) pvmid = 449;
|
| 197 | - | if(strfind("NRG500", vehiclename,true,0) != -1) pvmid = 522;
|
| 197 | + | if(strfind("Article Trailer 2", vehiclename,true,0) != -1) pvmid = 450;
|
| 198 | - | if(strfind("HPV1000", vehiclename,true,0) != -1) pvmid = 523;
|
| 198 | + | if(strfind("Turismo", vehiclename,true,0) != -1) pvmid = 451;
|
| 199 | - | if(strfind("Cement Truck", vehiclename,true,0) != -1) pvmid = 525;
|
| 199 | + | if(strfind("Speeder", vehiclename,true,0) != -1) pvmid = 452;
|
| 200 | - | if(strfind("Towtruck", vehiclename,true,0) != -1) pvmid = 525;
|
| 200 | + | if(strfind("Reefer", vehiclename,true,0) != -1) pvmid = 453;
|
| 201 | - | if(strfind("Fortune", vehiclename,true,0) != -1) pvmid = 526;
|
| 201 | + | if(strfind("Tropic", vehiclename,true,0) != -1) pvmid = 454;
|
| 202 | - | if(strfind("Cadrona", vehiclename,true,0) != -1) pvmid = 527;
|
| 202 | + | if(strfind("Flatbed", vehiclename,true,0) != -1) pvmid = 455;
|
| 203 | - | if(strfind("FBI Truck", vehiclename,true,0) != -1) pvmid = 528;
|
| 203 | + | if(strfind("Yankee", vehiclename,true,0) != -1) pvmid = 456;
|
| 204 | - | if(strfind("Willard", vehiclename,true,0) != -1) pvmid = 529;
|
| 204 | + | if(strfind("Caddy", vehiclename,true,0) != -1) pvmid = 457;
|
| 205 | - | if(strfind("Forklift", vehiclename,true,0) != -1) pvmid = 530;
|
| 205 | + | if(strfind("Solair", vehiclename,true,0) != -1) pvmid = 458;
|
| 206 | - | if(strfind("Tractor", vehiclename,true,0) != -1) pvmid = 531;
|
| 206 | + | if(strfind("Berkley's RC Van", vehiclename,true,0) != -1) pvmid = 459;
|
| 207 | - | if(strfind("Combine Harvester", vehiclename,true,0) != -1) pvmid = 532;
|
| 207 | + | if(strfind("Skimmer", vehiclename,true,0) != -1) pvmid = 460;
|
| 208 | - | if(strfind("Feltzer", vehiclename,true,0) != -1) pvmid = 533;
|
| 208 | + | if(strfind("PCJ600", vehiclename,true,0) != -1) pvmid = 461;
|
| 209 | - | if(strfind("Remington", vehiclename,true,0) != -1) pvmid = 535;
|
| 209 | + | if(strfind("Faggio", vehiclename,true,0) != -1) pvmid = 462;
|
| 210 | - | if(strfind("Slamvan", vehiclename,true,0) != -1) pvmid = 535;
|
| 210 | + | if(strfind("Freeway", vehiclename,true,0) != -1) pvmid = 463;
|
| 211 | - | if(strfind("Blade", vehiclename,true,0) != -1) pvmid = 536;
|
| 211 | + | if(strfind("RCBaron", vehiclename,true,0) != -1) pvmid = 464;
|
| 212 | - | if(strfind("Freight Train", vehiclename,true,0) != -1) pvmid = 537;
|
| 212 | + | if(strfind("RCRaider", vehiclename,true,0) != -1) pvmid = 465;
|
| 213 | - | if(strfind("Brownstreak Train", vehiclename,true,0) != -1) pvmid = 538;
|
| 213 | + | if(strfind("Glendale", vehiclename,true,0) != -1) pvmid = 466;
|
| 214 | - | if(strfind("Vortex", vehiclename,true,0) != -1) pvmid = 539;
|
| 214 | + | if(strfind("Oceanic", vehiclename,true,0) != -1) pvmid = 467;
|
| 215 | - | if(strfind("Vincent", vehiclename,true,0) != -1) pvmid = 540;
|
| 215 | + | if(strfind("Sanchez", vehiclename,true,0) != -1) pvmid = 468;
|
| 216 | - | if(strfind("Bullet", vehiclename,true,0) != -1) pvmid = 541;
|
| 216 | + | if(strfind("Sparrow", vehiclename,true,0) != -1) pvmid = 469;
|
| 217 | - | if(strfind("Clover", vehiclename,true,0) != -1) pvmid = 542;
|
| 217 | + | if(strfind("Patriot", vehiclename,true,0) != -1) pvmid = 470;
|
| 218 | - | if(strfind("Sadler", vehiclename,true,0) != -1) pvmid = 543;
|
| 218 | + | if(strfind("Quad", vehiclename,true,0) != -1) pvmid = 471;
|
| 219 | - | if(strfind("Firetruck LA", vehiclename,true,0) != -1) pvmid = 544;
|
| 219 | + | if(strfind("Coastguard", vehiclename,true,0) != -1) pvmid = 472;
|
| 220 | - | if(strfind("Hustler", vehiclename,true,0) != -1) pvmid = 545;
|
| 220 | + | if(strfind("Dinghy", vehiclename,true,0) != -1) pvmid = 473;
|
| 221 | - | if(strfind("Intruder", vehiclename,true,0) != -1) pvmid = 546;
|
| 221 | + | if(strfind("Hermes", vehiclename,true,0) != -1) pvmid = 474;
|
| 222 | - | if(strfind("Primo", vehiclename,true,0) != -1) pvmid = 547;
|
| 222 | + | if(strfind("Sabre", vehiclename,true,0) != -1) pvmid = 475;
|
| 223 | - | if(strfind("Cargobob", vehiclename,true,0) != -1) pvmid = 548;
|
| 223 | + | if(strfind("Rustler", vehiclename,true,0) != -1) pvmid = 476;
|
| 224 | - | if(strfind("Tampa", vehiclename,true,0) != -1) pvmid = 549;
|
| 224 | + | if(strfind("ZR350", vehiclename,true,0) != -1) pvmid = 477;
|
| 225 | - | if(strfind("Sunrise", vehiclename,true,0) != -1) pvmid = 550;
|
| 225 | + | if(strfind("Walton", vehiclename,true,0) != -1) pvmid = 478;
|
| 226 | - | if(strfind("Merit", vehiclename,true,0) != -1) pvmid = 551;
|
| 226 | + | if(strfind("Regina", vehiclename,true,0) != -1) pvmid = 479;
|
| 227 | - | if(strfind("Utility Van", vehiclename,true,0) != -1) pvmid = 552;
|
| 227 | + | if(strfind("Comet", vehiclename,true,0) != -1) pvmid = 480;
|
| 228 | - | if(strfind("Nevada", vehiclename,true,0) != -1) pvmid = 553;
|
| 228 | + | if(strfind("BMX", vehiclename,true,0) != -1) pvmid = 481;
|
| 229 | - | if(strfind("Yosemite", vehiclename,true,0) != -1) pvmid = 555;
|
| 229 | + | if(strfind("Burrito", vehiclename,true,0) != -1) pvmid = 482;
|
| 230 | - | if(strfind("Windsor", vehiclename,true,0) != -1) pvmid = 555;
|
| 230 | + | if(strfind("Camper", vehiclename,true,0) != -1) pvmid = 483;
|
| 231 | - | if(strfind("MonsterA", vehiclename,true,0) != -1) pvmid = 556;
|
| 231 | + | if(strfind("Marquis", vehiclename,true,0) != -1) pvmid = 484;
|
| 232 | - | if(strfind("MonsterB", vehiclename,true,0) != -1) pvmid = 557;
|
| 232 | + | if(strfind("Baggage", vehiclename,true,0) != -1) pvmid = 485;
|
| 233 | - | if(strfind("Uranus", vehiclename,true,0) != -1) pvmid = 558;
|
| 233 | + | if(strfind("Dozer", vehiclename,true,0) != -1) pvmid = 486;
|
| 234 | - | if(strfind("Jester", vehiclename,true,0) != -1) pvmid = 559;
|
| 234 | + | if(strfind("Maverick", vehiclename,true,0) != -1) pvmid = 487;
|
| 235 | - | if(strfind("Sultan", vehiclename,true,0) != -1) pvmid = 560;
|
| 235 | + | if(strfind("SAN News Maverick", vehiclename,true,0) != -1) pvmid = 488;
|
| 236 | - | if(strfind("Stratum", vehiclename,true,0) != -1) pvmid = 561;
|
| 236 | + | if(strfind("Rancher", vehiclename,true,0) != -1) pvmid = 489;
|
| 237 | - | if(strfind("Elegy", vehiclename,true,0) != -1) pvmid = 562;
|
| 237 | + | if(strfind("FBI Rancher", vehiclename,true,0) != -1) pvmid = 490;
|
| 238 | - | if(strfind("Raindance", vehiclename,true,0) != -1) pvmid = 563;
|
| 238 | + | if(strfind("Virgo", vehiclename,true,0) != -1) pvmid = 491;
|
| 239 | - | if(strfind("RC Tiger", vehiclename,true,0) != -1) pvmid = 564;
|
| 239 | + | if(strfind("Greenwood", vehiclename,true,0) != -1) pvmid = 492;
|
| 240 | - | if(strfind("Flash", vehiclename,true,0) != -1) pvmid = 565;
|
| 240 | + | if(strfind("Jetmax", vehiclename,true,0) != -1) pvmid = 493;
|
| 241 | - | if(strfind("Tahoma", vehiclename,true,0) != -1) pvmid = 566;
|
| 241 | + | if(strfind("Hotring Racer", vehiclename,true,0) != -1) pvmid = 494;
|
| 242 | - | if(strfind("Savanna", vehiclename,true,0) != -1) pvmid = 567;
|
| 242 | + | if(strfind("Sandking", vehiclename,true,0) != -1) pvmid = 495;
|
| 243 | - | if(strfind("Bandito", vehiclename,true,0) != -1) pvmid = 568;
|
| 243 | + | if(strfind("Blista Compact", vehiclename,true,0) != -1) pvmid = 496;
|
| 244 | - | if(strfind("Freight Flat Trailer", vehiclename,true,0) != -1) pvmid = 569;
|
| 244 | + | if(strfind("Police Maverick", vehiclename,true,0) != -1) pvmid = 497;
|
| 245 | - | if(strfind("Streak Trailer", vehiclename,true,0) != -1) pvmid = 570;
|
| 245 | + | if(strfind("Boxville", vehiclename,true,0) != -1) pvmid = 498;
|
| 246 | - | if(strfind("Kart", vehiclename,true,0) != -1) pvmid = 571;
|
| 246 | + | if(strfind("Benson", vehiclename,true,0) != -1) pvmid = 499;
|
| 247 | - | if(strfind("Mower", vehiclename,true,0) != -1) pvmid = 572;
|
| 247 | + | if(strfind("Mesa", vehiclename,true,0) != -1) pvmid = 500;
|
| 248 | - | if(strfind("Dune", vehiclename,true,0) != -1) pvmid = 573;
|
| 248 | + | if(strfind("RC Goblin", vehiclename,true,0) != -1) pvmid = 501;
|
| 249 | - | if(strfind("Sweeper", vehiclename,true,0) != -1) pvmid = 574;
|
| 249 | + | if(strfind("Hotring Racer", vehiclename,true,0) != -1) pvmid = 502;
|
| 250 | - | if(strfind("Broadway", vehiclename,true,0) != -1) pvmid = 575;
|
| 250 | + | if(strfind("Hotring Racer", vehiclename,true,0) != -1) pvmid = 503;
|
| 251 | - | if(strfind("Tornado", vehiclename,true,0) != -1) pvmid = 576;
|
| 251 | + | if(strfind("Bloodring Banger", vehiclename,true,0) != -1) pvmid = 505;
|
| 252 | - | if(strfind("AT400", vehiclename,true,0) != -1) pvmid = 577;
|
| 252 | + | if(strfind("Rancher", vehiclename,true,0) != -1) pvmid = 505;
|
| 253 | - | if(strfind("DFT30", vehiclename,true,0) != -1) pvmid = 578;
|
| 253 | + | if(strfind("Super GT", vehiclename,true,0) != -1) pvmid = 506;
|
| 254 | - | if(strfind("Huntley", vehiclename,true,0) != -1) pvmid = 579;
|
| 254 | + | if(strfind("Elegant", vehiclename,true,0) != -1) pvmid = 507;
|
| 255 | - | if(strfind("Stafford", vehiclename,true,0) != -1) pvmid = 580;
|
| 255 | + | if(strfind("Journey", vehiclename,true,0) != -1) pvmid = 508;
|
| 256 | - | if(strfind("BF400", vehiclename,true,0) != -1) pvmid = 581;
|
| 256 | + | if(strfind("Bike", vehiclename,true,0) != -1) pvmid = 509;
|
| 257 | - | if(strfind("Newsvan", vehiclename,true,0) != -1) pvmid = 582;
|
| 257 | + | if(strfind("Mountain Bike", vehiclename,true,0) != -1) pvmid = 510;
|
| 258 | - | if(strfind("Tug", vehiclename,true,0) != -1) pvmid = 583;
|
| 258 | + | if(strfind("Beagle", vehiclename,true,0) != -1) pvmid = 511;
|
| 259 | - | if(strfind("Petrol Trailer", vehiclename,true,0) != -1) pvmid = 584;
|
| 259 | + | if(strfind("Cropduster", vehiclename,true,0) != -1) pvmid = 512;
|
| 260 | - | if(strfind("Emperor", vehiclename,true,0) != -1) pvmid = 585;
|
| 260 | + | if(strfind("Stuntplane", vehiclename,true,0) != -1) pvmid = 513;
|
| 261 | - | if(strfind("Wayfarer", vehiclename,true,0) != -1) pvmid = 586;
|
| 261 | + | if(strfind("Tanker", vehiclename,true,0) != -1) pvmid = 515;
|
| 262 | - | if(strfind("Euros", vehiclename,true,0) != -1) pvmid = 587;
|
| 262 | + | if(strfind("Roadtrain", vehiclename,true,0) != -1) pvmid = 515;
|
| 263 | - | if(strfind("Hotdog", vehiclename,true,0) != -1) pvmid = 588;
|
| 263 | + | if(strfind("Nebula", vehiclename,true,0) != -1) pvmid = 516;
|
| 264 | - | if(strfind("Club", vehiclename,true,0) != -1) pvmid = 589;
|
| 264 | + | if(strfind("Majestic", vehiclename,true,0) != -1) pvmid = 517;
|
| 265 | - | if(strfind("Freight Box Trailer", vehiclename,true,0) != -1) pvmid = 590;
|
| 265 | + | if(strfind("Buccaneer", vehiclename,true,0) != -1) pvmid = 518;
|
| 266 | - | if(strfind("Article Trailer 3", vehiclename,true,0) != -1) pvmid = 591;
|
| 266 | + | if(strfind("Shamal", vehiclename,true,0) != -1) pvmid = 519;
|
| 267 | - | if(strfind("Andromada", vehiclename,true,0) != -1) pvmid = 592;
|
| 267 | + | if(strfind("Hydra", vehiclename,true,0) != -1) pvmid = 520;
|
| 268 | - | if(strfind("Dodo", vehiclename,true,0) != -1) pvmid = 593;
|
| 268 | + | if(strfind("FCR900", vehiclename,true,0) != -1) pvmid = 521;
|
| 269 | - | if(strfind("RCCam", vehiclename,true,0) != -1) pvmid = 595;
|
| 269 | + | if(strfind("NRG500", vehiclename,true,0) != -1) pvmid = 522;
|
| 270 | - | if(strfind("Launch", vehiclename,true,0) != -1) pvmid = 595;
|
| 270 | + | if(strfind("HPV1000", vehiclename,true,0) != -1) pvmid = 523;
|
| 271 | - | if(strfind("Police Car LSPD", vehiclename,true,0) != -1) pvmid = 596;
|
| 271 | + | if(strfind("Cement Truck", vehiclename,true,0) != -1) pvmid = 525;
|
| 272 | - | if(strfind("Police Car SFPP", vehiclename,true,0) != -1) pvmid = 597;
|
| 272 | + | if(strfind("Towtruck", vehiclename,true,0) != -1) pvmid = 525;
|
| 273 | - | if(strfind("Police Car LVPD", vehiclename,true,0) != -1) pvmid = 598;
|
| 273 | + | if(strfind("Fortune", vehiclename,true,0) != -1) pvmid = 526;
|
| 274 | - | if(strfind("Police Ranger", vehiclename,true,0) != -1) pvmid = 599;
|
| 274 | + | if(strfind("Cadrona", vehiclename,true,0) != -1) pvmid = 527;
|
| 275 | - | if(strfind("S.W.A.T. SWAT", vehiclename,true,0) != -1) pvmid = 601;
|
| 275 | + | if(strfind("FBI Truck", vehiclename,true,0) != -1) pvmid = 528;
|
| 276 | - | if(strfind("Alpha", vehiclename,true,0) != -1) pvmid = 602;
|
| 276 | + | if(strfind("Willard", vehiclename,true,0) != -1) pvmid = 529;
|
| 277 | - | if(strfind("Phoenix", vehiclename,true,0) != -1) pvmid = 603;
|
| 277 | + | if(strfind("Forklift", vehiclename,true,0) != -1) pvmid = 530;
|
| 278 | - | if(strfind("Glendale Shit", vehiclename,true,0) != -1) pvmid = 604;
|
| 278 | + | if(strfind("Tractor", vehiclename,true,0) != -1) pvmid = 531;
|
| 279 | - | if(strfind("Sadler Shit", vehiclename,true,0) != -1) pvmid = 605;
|
| 279 | + | if(strfind("Combine Harvester", vehiclename,true,0) != -1) pvmid = 532;
|
| 280 | - | if(strfind("Baggage Trailer A", vehiclename,true,0) != -1) pvmid = 606;
|
| 280 | + | if(strfind("Feltzer", vehiclename,true,0) != -1) pvmid = 533;
|
| 281 | - | if(strfind("Baggage Trailer B", vehiclename,true,0) != -1) pvmid = 607;
|
| 281 | + | if(strfind("Remington", vehiclename,true,0) != -1) pvmid = 535;
|
| 282 | - | if(strfind("Tug Stairs Trailer", vehiclename,true,0) != -1) pvmid = 608;
|
| 282 | + | if(strfind("Slamvan", vehiclename,true,0) != -1) pvmid = 535;
|
| 283 | - | if(strfind("Boxville", vehiclename,true,0) != -1) pvmid = 609;
|
| 283 | + | if(strfind("Blade", vehiclename,true,0) != -1) pvmid = 536;
|
| 284 | - | if(strfind("Farm Trailer", vehiclename,true,0) != -1) pvmid = 610;
|
| 284 | + | if(strfind("Freight Train", vehiclename,true,0) != -1) pvmid = 537;
|
| 285 | - | if(strfind("Utility Trailer", vehiclename,true,0) != -1) pvmid = 611;
|
| 285 | + | if(strfind("Brownstreak Train", vehiclename,true,0) != -1) pvmid = 538;
|
| 286 | - | if(strlen(vehiclename) == 3 && strval(vehiclename) >= 400 && strval(vehiclename) <= 611) pvmid = strval(vehiclename); |
| 286 | + | if(strfind("Vortex", vehiclename,true,0) != -1) pvmid = 539;
|
| 287 | - | if(pvmid == 0) return SendClientMessage(playerid, 0xFF0000AA, "Incorrect Vehicle Name/Model ID"); |
| 287 | + | if(strfind("Vincent", vehiclename,true,0) != -1) pvmid = 540;
|
| 288 | - | new Float:pVposX, Float:pVposY, Float:pVposZ, Float:pVposFA; |
| 288 | + | if(strfind("Bullet", vehiclename,true,0) != -1) pvmid = 541;
|
| 289 | - | GetPlayerPos(playerid, pVposX, pVposY, pVposZ); GetPlayerFacingAngle(playerid, pVposFA); |
| 289 | + | if(strfind("Clover", vehiclename,true,0) != -1) pvmid = 542;
|
| 290 | - | if(IsPlayerInAnyVehicle(playerid)) {
|
| 290 | + | if(strfind("Sadler", vehiclename,true,0) != -1) pvmid = 543;
|
| 291 | - | new VID; VID = GetPlayerVehicleID(playerid); GetVehicleZAngle(VID, pVposFA); } |
| 291 | + | if(strfind("Firetruck LA", vehiclename,true,0) != -1) pvmid = 544;
|
| 292 | - | new CVID, pVW, pINT; pVW = GetPlayerVirtualWorld(playerid); |
| 292 | + | if(strfind("Hustler", vehiclename,true,0) != -1) pvmid = 545;
|
| 293 | - | pINT = GetPlayerInterior(playerid); DeletePlayerVehicle(playerid); |
| 293 | + | if(strfind("Intruder", vehiclename,true,0) != -1) pvmid = 546;
|
| 294 | - | CVID = CreateVehicle(pvmid, pVposX, pVposY, pVposZ+0.6, pVposFA,color1,color2,0); |
| 294 | + | if(strfind("Primo", vehiclename,true,0) != -1) pvmid = 547;
|
| 295 | - | SetVehicleVirtualWorld(CVID, pVW); LinkVehicleToInterior(CVID, pINT); |
| 295 | + | if(strfind("Cargobob", vehiclename,true,0) != -1) pvmid = 548;
|
| 296 | - | SetVehicleHealth(CVID, Health); PutPlayerInVehicle(playerid,CVID,0); |
| 296 | + | if(strfind("Tampa", vehiclename,true,0) != -1) pvmid = 549;
|
| 297 | - | P_DATA_VEH[playerid][vehicle] = CVID; new pmsg[64]; |
| 297 | + | if(strfind("Sunrise", vehiclename,true,0) != -1) pvmid = 550;
|
| 298 | - | format(pmsg,sizeof(pmsg),"Vehicle ID: %i Created (Model %i).",CVID,pvmid); print(pmsg); |
| 298 | + | if(strfind("Merit", vehiclename,true,0) != -1) pvmid = 551;
|
| 299 | - | return CVID; } |
| 299 | + | if(strfind("Utility Van", vehiclename,true,0) != -1) pvmid = 552;
|
| 300 | - | stock SetObjectRotationSpeed(objectid,Float:speed) {
|
| 300 | + | if(strfind("Nevada", vehiclename,true,0) != -1) pvmid = 553;
|
| 301 | - | ospeed[objectid] = floatround(floatdiv(1000,speed),floatround_round); |
| 301 | + | if(strfind("Yosemite", vehiclename,true,0) != -1) pvmid = 555;
|
| 302 | - | return 1; } |
| 302 | + | if(strfind("Windsor", vehiclename,true,0) != -1) pvmid = 555;
|
| 303 | - | stock StopRotatingObject(objectid) {
|
| 303 | + | if(strfind("MonsterA", vehiclename,true,0) != -1) pvmid = 556;
|
| 304 | - | if(oState[objectid] == 1)KillTimer(oTimer[objectid]); oState[objectid] = 0; OnObjectStopRotate(objectid); |
| 304 | + | if(strfind("MonsterB", vehiclename,true,0) != -1) pvmid = 557;
|
| 305 | - | return 1; } |
| 305 | + | if(strfind("Uranus", vehiclename,true,0) != -1) pvmid = 558;
|
| 306 | - | stock GenerateBucle(objectid,Float:offX,Float:offY,Float:offZ,Float:speed) {
|
| 306 | + | if(strfind("Jester", vehiclename,true,0) != -1) pvmid = 559;
|
| 307 | - | if(oState[objectid] == 1)KillTimer(oTimer[objectid]); |
| 307 | + | if(strfind("Sultan", vehiclename,true,0) != -1) pvmid = 560;
|
| 308 | - | ospeed[objectid] = floatround(floatdiv(1000,speed),floatround_round); |
| 308 | + | if(strfind("Stratum", vehiclename,true,0) != -1) pvmid = 561;
|
| 309 | - | oTimer[objectid] = SetTimerEx("RotateObjBucle",ospeed[objectid],0,"d",objectid);
|
| 309 | + | if(strfind("Elegy", vehiclename,true,0) != -1) pvmid = 562;
|
| 310 | - | odifX[objectid] = offX; odifY[objectid] = offY; |
| 310 | + | if(strfind("Raindance", vehiclename,true,0) != -1) pvmid = 563;
|
| 311 | - | odifZ[objectid] = offZ; oState[objectid] = 1; |
| 311 | + | if(strfind("RC Tiger", vehiclename,true,0) != -1) pvmid = 564;
|
| 312 | - | return 1; } |
| 312 | + | if(strfind("Flash", vehiclename,true,0) != -1) pvmid = 565;
|
| 313 | - | stock StopBucle(objectid) {
|
| 313 | + | if(strfind("Tahoma", vehiclename,true,0) != -1) pvmid = 566;
|
| 314 | - | if(oState[objectid] == 1)KillTimer(oTimer[objectid]); oState[objectid] = 0; OnObjectStopBucle(objectid); |
| 314 | + | if(strfind("Savanna", vehiclename,true,0) != -1) pvmid = 567;
|
| 315 | - | return 1; } |
| 315 | + | if(strfind("Bandito", vehiclename,true,0) != -1) pvmid = 568;
|
| 316 | - | forward RotateObj(objectid,points); |
| 316 | + | if(strfind("Freight Flat Trailer", vehiclename,true,0) != -1) pvmid = 569;
|
| 317 | - | public RotateObj(objectid,points) {
|
| 317 | + | if(strfind("Streak Trailer", vehiclename,true,0) != -1) pvmid = 570;
|
| 318 | - | if(oState[objectid] == 0) return 1; |
| 318 | + | if(strfind("Kart", vehiclename,true,0) != -1) pvmid = 571;
|
| 319 | - | new Float:rot[3]; |
| 319 | + | if(strfind("Mower", vehiclename,true,0) != -1) pvmid = 572;
|
| 320 | - | GetObjectRot(objectid,rot[0],rot[1],rot[2]); |
| 320 | + | if(strfind("Dune", vehiclename,true,0) != -1) pvmid = 573;
|
| 321 | - | if(newrotX[objectid] != rot[0])rot[0]+=odifX[objectid]; if(newrotY[objectid] != rot[1])rot[1]+=odifY[objectid]; |
| 321 | + | if(strfind("Sweeper", vehiclename,true,0) != -1) pvmid = 574;
|
| 322 | - | if(newrotZ[objectid] != rot[2])rot[2]+=odifZ[objectid]; SetObjectRot(objectid,rot[0],rot[1],rot[2]); opoints[objectid]++; |
| 322 | + | if(strfind("Broadway", vehiclename,true,0) != -1) pvmid = 575;
|
| 323 | - | if((newrotX[objectid] != rot[0] || newrotY[objectid] != rot[1] || newrotZ[objectid] != rot[2]) && opoints[objectid] != points)oTimer[objectid] = SetTimerEx("RotateObj",ospeed[objectid],0,"dd",objectid,points);
|
| 323 | + | if(strfind("Tornado", vehiclename,true,0) != -1) pvmid = 576;
|
| 324 | - | else {oState[objectid] = 0; }
|
| 324 | + | if(strfind("AT400", vehiclename,true,0) != -1) pvmid = 577;
|
| 325 | - | return 1; } |
| 325 | + | if(strfind("DFT30", vehiclename,true,0) != -1) pvmid = 578;
|
| 326 | - | forward RotateObjectBucle(objectid); |
| 326 | + | if(strfind("Huntley", vehiclename,true,0) != -1) pvmid = 579;
|
| 327 | - | public RotateObjectBucle(objectid) {
|
| 327 | + | if(strfind("Stafford", vehiclename,true,0) != -1) pvmid = 580;
|
| 328 | - | if(oState[objectid] == 0) return 1; new Float:rot[3]; |
| 328 | + | if(strfind("BF400", vehiclename,true,0) != -1) pvmid = 581;
|
| 329 | - | GetObjectRot(objectid,rot[0],rot[1],rot[2]); SetObjectRot(objectid,rot[0]+odifX[objectid],rot[1]+odifY[objectid],rot[2]+odifZ[objectid]); |
| 329 | + | if(strfind("Newsvan", vehiclename,true,0) != -1) pvmid = 582;
|
| 330 | - | oTimer[objectid] = SetTimerEx("RotateObjBucle",ospeed[objectid],0,"d",objectid);
|
| 330 | + | if(strfind("Tug", vehiclename,true,0) != -1) pvmid = 583;
|
| 331 | - | return 1; } |
| 331 | + | if(strfind("Petrol Trailer", vehiclename,true,0) != -1) pvmid = 584;
|
| 332 | - | public OnGameModeInit() { SetTimer("ToggleSteamer",1000,1); }
|
| 332 | + | if(strfind("Emperor", vehiclename,true,0) != -1) pvmid = 585;
|
| 333 | - | enum CheckpointEnum { Float:checkpoint_x, Float:checkpoint_y, Float:checkpoint_z, Float:checkpoint_size }
|
| 333 | + | if(strfind("Wayfarer", vehiclename,true,0) != -1) pvmid = 586;
|
| 334 | - | enum IconEnum { Float:icon_x, Float:icon_y, Float:icon_z, icon_markertype, icon_color };
|
| 334 | + | if(strfind("Euros", vehiclename,true,0) != -1) pvmid = 587;
|
| 335 | - | enum Materials { object_model, Float:object_x, Float:object_y, Float:object_z, Float:object_rx, Float:object_ry, Float:object_rz };
|
| 335 | + | if(strfind("Hotdog", vehiclename,true,0) != -1) pvmid = 588;
|
| 336 | - | new Icon[STEAM_ICONS][IconEnum]; new Object[STEAM_OBJECTS][Materials]; |
| 336 | + | if(strfind("Club", vehiclename,true,0) != -1) pvmid = 589;
|
| 337 | - | new Checkpoint[STEAM_CHECKPOINTS][CheckpointEnum]; new CheckpointsToShow[MAX_PLAYERS][STEAM_CHECKPOINTS]; |
| 337 | + | if(strfind("Freight Box Trailer", vehiclename,true,0) != -1) pvmid = 590;
|
| 338 | - | public CreateStaticCheckpoint(Float:x,Float:y,Float:z,Float:size) {
|
| 338 | + | if(strfind("Article Trailer 3", vehiclename,true,0) != -1) pvmid = 591;
|
| 339 | - | static checkpoint_checkpointid; checkpoint_checkpointid++; |
| 339 | + | if(strfind("Andromada", vehiclename,true,0) != -1) pvmid = 592;
|
| 340 | - | Checkpoint[checkpoint_checkpointid][checkpoint_x] = x; Checkpoint[checkpoint_checkpointid][checkpoint_y] = y; |
| 340 | + | if(strfind("Dodo", vehiclename,true,0) != -1) pvmid = 593;
|
| 341 | - | Checkpoint[checkpoint_checkpointid][checkpoint_z] = z; Checkpoint[checkpoint_checkpointid][checkpoint_size] = size; |
| 341 | + | if(strfind("RCCam", vehiclename,true,0) != -1) pvmid = 595;
|
| 342 | - | return checkpoint_checkpointid; } |
| 342 | + | if(strfind("Launch", vehiclename,true,0) != -1) pvmid = 595;
|
| 343 | - | public DestroyStaticCheckpoint(checkpointid) {
|
| 343 | + | if(strfind("Police Car LSPD", vehiclename,true,0) != -1) pvmid = 596;
|
| 344 | - | Checkpoint[checkpointid][checkpoint_x] = 0; Checkpoint[checkpointid][checkpoint_y] = 0; |
| 344 | + | if(strfind("Police Car SFPP", vehiclename,true,0) != -1) pvmid = 597;
|
| 345 | - | Checkpoint[checkpointid][checkpoint_z] = 0; Checkpoint[checkpointid][checkpoint_size] = 0; } |
| 345 | + | if(strfind("Police Car LVPD", vehiclename,true,0) != -1) pvmid = 598;
|
| 346 | - | public EnableCheckpointForPlayer(playerid,checkpointid) { CheckpointsToShow[playerid][checkpointid] = 1; }
|
| 346 | + | if(strfind("Police Ranger", vehiclename,true,0) != -1) pvmid = 599;
|
| 347 | - | public DisableCheckpointForPlayer(playerid,checkpointid) { CheckpointsToShow[playerid][checkpointid] = 0; }
|
| 347 | + | if(strfind("S.W.A.T. SWAT", vehiclename,true,0) != -1) pvmid = 601;
|
| 348 | - | public EnableCheckpointForAll(checkpointid) { for(new i = 0;i < MAX_PLAYERS;i++) CheckpointsToShow[i][checkpointid] = 1; }
|
| 348 | + | if(strfind("Alpha", vehiclename,true,0) != -1) pvmid = 602;
|
| 349 | - | public DisableCheckpointForAll(checkpointid) { for(new i = 0;i < MAX_PLAYERS;i++) CheckpointsToShow[i][checkpointid] = 0; }
|
| 349 | + | if(strfind("Phoenix", vehiclename,true,0) != -1) pvmid = 603;
|
| 350 | - | stock Float:distance(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2) { return Float:floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2)); }
|
| 350 | + | if(strfind("Glendale Shit", vehiclename,true,0) != -1) pvmid = 604;
|
| 351 | - | stock GetClosestCheckpoint(playerid,Float:x,Float:y,Float:z) {
|
| 351 | + | if(strfind("Sadler Shit", vehiclename,true,0) != -1) pvmid = 605;
|
| 352 | - | new Float:closest = 9999.9999; new j = -1; |
| 352 | + | if(strfind("Baggage Trailer A", vehiclename,true,0) != -1) pvmid = 606;
|
| 353 | - | for(new i = 0;i < STEAM_CHECKPOINTS;i++) {
|
| 353 | + | if(strfind("Baggage Trailer B", vehiclename,true,0) != -1) pvmid = 607;
|
| 354 | - | if(CheckpointsToShow[playerid][i] == 1) {
|
| 354 | + | if(strfind("Tug Stairs Trailer", vehiclename,true,0) != -1) pvmid = 608;
|
| 355 | - | if(distance(x,y,z,Checkpoint[i][checkpoint_x],Checkpoint[i][checkpoint_y],Checkpoint[i][checkpoint_z]) < closest) {
|
| 355 | + | if(strfind("Boxville", vehiclename,true,0) != -1) pvmid = 609;
|
| 356 | - | closest = distance(x,y,z,Checkpoint[i][checkpoint_x],Checkpoint[i][checkpoint_y],Checkpoint[i][checkpoint_z]); j = i; |
| 356 | + | if(strfind("Farm Trailer", vehiclename,true,0) != -1) pvmid = 610;
|
| 357 | - | } } } return j; } |
| 357 | + | if(strfind("Utility Trailer", vehiclename,true,0) != -1) pvmid = 611;
|
| 358 | - | stock DeletePlayerVehicle(playerid) {
|
| 358 | + | if(strlen(vehiclename) == 3 && strval(vehiclename) >= 400 && strval(vehiclename) <= 611) pvmid = strval(vehiclename); |
| 359 | - | new CVID, pvmid, pmsg[64]; CVID = P_DATA_VEH[playerid][vehicle]; |
| 359 | + | if(pvmid == 0) return SendClientMessage(playerid, 0xFF0000AA, "Incorrect Vehicle Name/Model ID"); |
| 360 | - | pvmid = GetVehicleModel(CVID); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); DestroyVehicle(CVID); |
| 360 | + | new Float:pVposX, Float:pVposY, Float:pVposZ, Float:pVposFA; |
| 361 | - | format(pmsg,sizeof(pmsg),"Vehicle ID: %i Destroyed. (Model %i)",CVID,pvmid); print(pmsg); |
| 361 | + | GetPlayerPos(playerid, pVposX, pVposY, pVposZ); GetPlayerFacingAngle(playerid, pVposFA); |
| 362 | - | return true; } |
| 362 | + | if(IsPlayerInAnyVehicle(playerid)) |
| 363 | - | public CreateStaticObject(model,Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz) {
|
| 363 | + | {
|
| 364 | - | static object_objectid; |
| 364 | + | new VID; VID = GetPlayerVehicleID(playerid); GetVehicleZAngle(VID, pVposFA); |
| 365 | - | if(object_objectid < STEAM_OBJECTS) {
|
| 365 | + | } |
| 366 | - | object_objectid++; Object[object_objectid][object_model] = model; |
| 366 | + | new CVID, pVW, pINT; pVW = GetPlayerVirtualWorld(playerid); |
| 367 | - | Object[object_objectid][object_x] = x; Object[object_objectid][object_y] = y; |
| 367 | + | pINT = GetPlayerInterior(playerid); DeletePlayerVehicle(playerid); |
| 368 | - | Object[object_objectid][object_z] = z; Object[object_objectid][object_rx] = rx; |
| 368 | + | CVID = CreateVehicle(pvmid, pVposX, pVposY, pVposZ+0.6, pVposFA,color1,color2,0); |
| 369 | - | Object[object_objectid][object_ry] = ry; Object[object_objectid][object_rz] = rz; } } |
| 369 | + | SetVehicleVirtualWorld(CVID, pVW); LinkVehicleToInterior(CVID, pINT); |
| 370 | - | public CreateStaticIcon(Float:x,Float:y,Float:z,markertype,color) {
|
| 370 | + | SetVehicleHealth(CVID, Health); PutPlayerInVehicle(playerid,CVID,0); |
| 371 | - | static icon_iconid; icon_iconid++; |
| 371 | + | P_DATA_VEH[playerid][vehicle] = CVID; new pmsg[64]; |
| 372 | - | Icon[icon_iconid][icon_x] = x; Icon[icon_iconid][icon_y] = y; |
| 372 | + | format(pmsg,sizeof(pmsg),"Vehicle ID: %i Created (Model %i).",CVID,pvmid); print(pmsg); |
| 373 | - | Icon[icon_iconid][icon_z] = z; Icon[icon_iconid][icon_markertype] = markertype; |
| 373 | + | return CVID; |
| 374 | - | Icon[icon_iconid][icon_color] = color; } |
| 374 | + | } |
| 375 | - | new ObjectID[MAX_OBJECTS]; new ShownObjects[MAX_PLAYERS] = 0; |
| 375 | + | |
| 376 | - | public ToggleSteamer() {
|
| 376 | + | public RotateObj(objectid,points) |
| 377 | - | for(new i = 0;i < MAX_PLAYERS;i++) {
|
| 377 | + | {
|
| 378 | - | if(IsPlayerConnected(i)) {
|
| 378 | + | if(oState[objectid] == 0) return 1; |
| 379 | - | new Float:x,Float:y,Float:z; GetPlayerPos(i,x,y,z); |
| 379 | + | new Float:rot[3]; |
| 380 | - | for(new j = 0; j < sizeof(Object);j++) {
|
| 380 | + | GetObjectRot(objectid,rot[0],rot[1],rot[2]); |
| 381 | - | if(j < STEAM_OBJECTS) {
|
| 381 | + | if(newrotX[objectid] != rot[0])rot[0]+=odifX[objectid]; if(newrotY[objectid] != rot[1])rot[1]+=odifY[objectid]; |
| 382 | - | if(distance(x,y,z,Object[j][object_x],Object[j][object_y],Object[j][object_z])<DRAW_DISTANCE_OBJECTS) {
|
| 382 | + | if(newrotZ[objectid] != rot[2])rot[2]+=odifZ[objectid]; SetObjectRot(objectid,rot[0],rot[1],rot[2]); opoints[objectid]++; |
| 383 | - | if(ShownObjects[i] < MAX_OBJECTS) {
|
| 383 | + | if((newrotX[objectid] != rot[0] || newrotY[objectid] != rot[1] || newrotZ[objectid] != rot[2]) && opoints[objectid] != points)oTimer[objectid] = SetTimerEx("RotateObj",ospeed[objectid],0,"dd",objectid,points);
|
| 384 | - | if(!IsValidPlayerObject(i,ObjectID[j])) {
|
| 384 | + | else |
| 385 | - | ShownObjects[i]+=1; ObjectID[j] = CreatePlayerObject(i,Object[j][object_model],Object[j][object_x],Object[j][object_y],Object[j][object_z],Object[j][object_rx],Object[j][object_ry],Object[j][object_rz]); |
| 385 | + | {
|
| 386 | - | } } } else {
|
| 386 | + | oState[objectid] = 0; |
| 387 | - | if(IsValidPlayerObject(i,ObjectID[j])) {
|
| 387 | + | } |
| 388 | - | DestroyPlayerObject(i,ObjectID[j]); ObjectID[j] = 0; ShownObjects[i]-=1; |
| 388 | + | return 1; |
| 389 | - | } } } } |
| 389 | + | } |
| 390 | - | for(new k = 0;k < 32;k++)RemovePlayerMapIcon(i,k); |
| 390 | + | |
| 391 | - | new iid; |
| 391 | + | |
| 392 | - | for(new j = 0; j < sizeof(Icon);j++) {
|
| 392 | + | public RotateObjectBucle(objectid) |
| 393 | - | if(j < STEAM_ICONS) {
|
| 393 | + | {
|
| 394 | - | if(distance(x,y,z,Icon[j][icon_x],Icon[j][icon_y],Icon[j][icon_z])<DRAW_DISTANCE_ICONS) SetPlayerMapIcon(i,iid++,Icon[j][icon_x],Icon[j][icon_y],Icon[j][icon_x],Icon[j][icon_markertype],0); |
| 394 | + | if(oState[objectid] == 0) return 1; new Float:rot[3]; |
| 395 | - | } } |
| 395 | + | GetObjectRot(objectid,rot[0],rot[1],rot[2]); SetObjectRot(objectid,rot[0]+odifX[objectid],rot[1]+odifY[objectid],rot[2]+odifZ[objectid]); |
| 396 | - | new checkpoint = GetClosestCheckpoint(i,x,y,z); |
| 396 | + | oTimer[objectid] = SetTimerEx("RotateObjBucle",ospeed[objectid],0,"d",objectid);
|
| 397 | - | if(checkpoint != -1) SetPlayerCheckpoint(i,Checkpoint[checkpoint][checkpoint_x],Checkpoint[checkpoint][checkpoint_y],Checkpoint[checkpoint][checkpoint_z],Checkpoint[checkpoint][checkpoint_size]); |
| 397 | + | return 1; |
| 398 | - | } } } |
| 398 | + | } |
| 399 | - | stock SetPlayerPosEx(playerid, Float:x ,Float:y,Float:z,Float:a,interior = 0,vw = 0) {
|
| 399 | + | |
| 400 | - | SetPlayerPos(playerid , x , y ,z); SetPlayerFacingAngle(playerid, a); |
| 400 | + | public OnGameModeInit() |
| 401 | - | SetPlayerInterior(playerid, interior); SetPlayerVirtualWorld(playerid, vw); |
| 401 | + | {
|
| 402 | - | return 1; } |
| 402 | + | SetTimer("ToggleSteamer",1000,1);
|
| 403 | - | stock RemoveBuilding(modelid, Float:oX, Float:oY, Float:oZ, Float:oRadius = 0.25, Float:orX = 0.0, Float:orY = 0.0, Float:orZ = 0.0) {
|
| 403 | + | } |
| 404 | - | for(new i; i < MAX_REMOVED_OBJECTS; i++) {
|
| 404 | + | |
| 405 | - | if(RemovedObjects[i][_model] != modelid) continue; |
| 405 | + | public CreateStaticCheckpoint(Float:x,Float:y,Float:z,Float:size) |
| 406 | - | if(RemovedObjects[i][restored] != 0) {
|
| 406 | + | {
|
| 407 | - | if((RemovedObjects[i][_oX] == oX) && (RemovedObjects[i][_oY] == oY) && (RemovedObjects[i][_oZ] == oZ)) {
|
| 407 | + | static checkpoint_checkpointid; checkpoint_checkpointid++; |
| 408 | - | DestroyObject(RemovedObjects[i][restored]); RemovedObjects[i][restored] = 0; RemovedObjects[i][_model] = 0; |
| 408 | + | Checkpoint[checkpoint_checkpointid][checkpoint_x] = x; Checkpoint[checkpoint_checkpointid][checkpoint_y] = y; |
| 409 | - | return i; } } } |
| 409 | + | Checkpoint[checkpoint_checkpointid][checkpoint_z] = z; Checkpoint[checkpoint_checkpointid][checkpoint_size] = size; |
| 410 | - | new slot = GetObjectFreeSlot(); |
| 410 | + | return checkpoint_checkpointid; |
| 411 | - | if(slot == -1) return printf("\tCannot remove any more objects.\nIncrease MAX_REMOVED_OBJECTS in your script.\nIt is currently: %i", MAX_REMOVED_OBJECTS);
|
| 411 | + | } |
| 412 | - | RemovedObjects[slot][_model] = modelid; RemovedObjects[slot][_oX] = oX; RemovedObjects[slot][_oY] = oY; |
| 412 | + | |
| 413 | - | RemovedObjects[slot][_oZ] = oZ; RemovedObjects[slot][_oRadius] = oRadius; |
| 413 | + | public DestroyStaticCheckpoint(checkpointid) |
| 414 | - | RemovedObjects[slot][_orX] = orX; RemovedObjects[slot][_orY] = orY; RemovedObjects[slot][_orZ] = orZ; |
| 414 | + | {
|
| 415 | - | for(new i; i < MAX_PLAYERS; i++) {
|
| 415 | + | Checkpoint[checkpointid][checkpoint_x] = 0; Checkpoint[checkpointid][checkpoint_y] = 0; |
| 416 | - | if(!IsPlayerConnected(i)) continue; |
| 416 | + | Checkpoint[checkpointid][checkpoint_z] = 0; Checkpoint[checkpointid][checkpoint_size] = 0; |
| 417 | - | RemoveBuildingForPlayer(i, modelid, oX, oY, oZ, oRadius); } |
| 417 | + | } |
| 418 | - | return slot; } |
| 418 | + | |
| 419 | - | stock RestoreBuilding(slot) {
|
| 419 | + | public EnableCheckpointForPlayer(playerid,checkpointid) |
| 420 | - | if(slot < 0 || slot > MAX_REMOVED_OBJECTS) return 0; |
| 420 | + | {
|
| 421 | - | if(RemovedObjects[slot][_model] == 0) return 0; |
| 421 | + | CheckpointsToShow[playerid][checkpointid] = 1; |
| 422 | - | RemovedObjects[slot][restored] = CreateObject(RemovedObjects[slot][_model], RemovedObjects[slot][_oX], RemovedObjects[slot][_oY], RemovedObjects[slot][_oZ], RemovedObjects[slot][_orX], RemovedObjects[slot][_orY], RemovedObjects[slot][_orZ]); |
| 422 | + | } |
| 423 | - | return 1; } |
| 423 | + | |
| 424 | - | stock RemoveSpecificBuilding(modelid) {
|
| 424 | + | public DisableCheckpointForPlayer(playerid,checkpointid) |
| 425 | - | return RemoveBuilding(modelid, 0.0, 0.0, 0.0, 10000.0); } |
| 425 | + | {
|
| 426 | - | stock RemoveBuildingInit(playerid) {
|
| 426 | + | CheckpointsToShow[playerid][checkpointid] = 0; |
| 427 | - | for(new i; i < MAX_REMOVED_OBJECTS; i++) {
|
| 427 | + | } |
| 428 | - | if(RemovedObjects[i][_model] != 0) RemoveBuildingForPlayer(playerid, RemovedObjects[i][_model], RemovedObjects[i][_oX], RemovedObjects[i][_oY], RemovedObjects[i][_oZ], RemovedObjects[i][_oRadius]); } |
| 428 | + | |
| 429 | - | return 1; } |
| 429 | + | public EnableCheckpointForAll(checkpointid) |
| 430 | - | stock GetObjectFreeSlot() {
|
| 430 | + | {
|
| 431 | - | for(new i; i < MAX_REMOVED_OBJECTS; i++) {
|
| 431 | + | for(new i = 0;i < MAX_PLAYERS;i++) CheckpointsToShow[i][checkpointid] = 1; |
| 432 | - | if(RemovedObjects[i][_model] == 0) return i; } |
| 432 | + | } |
| 433 | - | return -1; } |
| 433 | + | |
| 434 | - | stock CountRemovedObjects() {
|
| 434 | + | public DisableCheckpointForAll(checkpointid) |
| 435 | - | new count = 0; for(new i; i < MAX_REMOVED_OBJECTS; i++) {
|
| 435 | + | {
|
| 436 | - | if(RemovedObjects[i][_model] != 0) count++; } |
| 436 | + | for(new i = 0;i < MAX_PLAYERS;i++) CheckpointsToShow[i][checkpointid] = 0; |
| 437 | - | return count; } |
| 437 | + | } |
| 438 | ||
| 439 | public CreateStaticObject(model,Float:x,Float:y,Float:z,Float:rx,Float:ry,Float:rz) | |
| 440 | {
| |
| 441 | static object_objectid; | |
| 442 | if(object_objectid < STEAM_OBJECTS) | |
| 443 | {
| |
| 444 | object_objectid++; Object[object_objectid][object_model] = model; | |
| 445 | Object[object_objectid][object_x] = x; Object[object_objectid][object_y] = y; | |
| 446 | Object[object_objectid][object_z] = z; Object[object_objectid][object_rx] = rx; | |
| 447 | Object[object_objectid][object_ry] = ry; Object[object_objectid][object_rz] = rz; | |
| 448 | } | |
| 449 | } | |
| 450 | ||
| 451 | public CreateStaticIcon(Float:x,Float:y,Float:z,markertype,color) | |
| 452 | {
| |
| 453 | static icon_iconid; icon_iconid++; | |
| 454 | Icon[icon_iconid][icon_x] = x; Icon[icon_iconid][icon_y] = y; | |
| 455 | Icon[icon_iconid][icon_z] = z; Icon[icon_iconid][icon_markertype] = markertype; | |
| 456 | Icon[icon_iconid][icon_color] = color; | |
| 457 | } | |
| 458 | ||
| 459 | public ToggleSteamer() | |
| 460 | {
| |
| 461 | for(new i = 0;i < MAX_PLAYERS;i++) | |
| 462 | {
| |
| 463 | if(IsPlayerConnected(i)) | |
| 464 | {
| |
| 465 | new Float:x,Float:y,Float:z; GetPlayerPos(i,x,y,z); | |
| 466 | for(new j = 0; j < sizeof(Object);j++) | |
| 467 | {
| |
| 468 | if(j < STEAM_OBJECTS) | |
| 469 | {
| |
| 470 | if(distance(x,y,z,Object[j][object_x],Object[j][object_y],Object[j][object_z])<DRAW_DISTANCE_OBJECTS) | |
| 471 | {
| |
| 472 | if(ShownObjects[i] < MAX_OBJECTS) | |
| 473 | {
| |
| 474 | if(!IsValidPlayerObject(i,ObjectID[j])) | |
| 475 | {
| |
| 476 | ShownObjects[i]+=1; ObjectID[j] = CreatePlayerObject(i,Object[j][object_model],Object[j][object_x],Object[j][object_y],Object[j][object_z],Object[j][object_rx],Object[j][object_ry],Object[j][object_rz]); | |
| 477 | ||
| 478 | } | |
| 479 | } | |
| 480 | } | |
| 481 | else | |
| 482 | {
| |
| 483 | if(IsValidPlayerObject(i,ObjectID[j])) | |
| 484 | {
| |
| 485 | DestroyPlayerObject(i,ObjectID[j]); ObjectID[j] = 0; ShownObjects[i]-=1; | |
| 486 | ||
| 487 | } | |
| 488 | } | |
| 489 | } | |
| 490 | } | |
| 491 | for(new k = 0;k < 32;k++)RemovePlayerMapIcon(i,k); | |
| 492 | new iid; | |
| 493 | for(new j = 0; j < sizeof(Icon);j++) | |
| 494 | {
| |
| 495 | if(j < STEAM_ICONS) | |
| 496 | {
| |
| 497 | if(distance(x,y,z,Icon[j][icon_x],Icon[j][icon_y],Icon[j][icon_z])<DRAW_DISTANCE_ICONS) SetPlayerMapIcon(i,iid++,Icon[j][icon_x],Icon[j][icon_y],Icon[j][icon_x],Icon[j][icon_markertype],0); | |
| 498 | ||
| 499 | } | |
| 500 | } | |
| 501 | new checkpoint = GetClosestCheckpoint(i,x,y,z); | |
| 502 | if(checkpoint != -1) SetPlayerCheckpoint(i,Checkpoint[checkpoint][checkpoint_x],Checkpoint[checkpoint][checkpoint_y],Checkpoint[checkpoint][checkpoint_z],Checkpoint[checkpoint][checkpoint_size]); | |
| 503 | ||
| 504 | } | |
| 505 | } | |
| 506 | } | |
| 507 | ||
| 508 | //============================================================================== | |
| 509 | //---------------------------------[STOCKS HERE]-------------------------------- | |
| 510 | //============================================================================== | |
| 511 | ||
| 512 | stock ReSpawn(playerid) | |
| 513 | {
| |
| 514 | SpawnPlayer(playerid); | |
| 515 | return 1; | |
| 516 | } | |
| 517 | ||
| 518 | stock RotateObject(objectid,Float:rotX,Float:rotY,Float:rotZ,points,Float:speed) | |
| 519 | {
| |
| 520 | if(oState[objectid] == 1)KillTimer(oTimer[objectid]); | |
| 521 | ospeed[objectid] = floatround(floatdiv(1000,speed),floatround_round); | |
| 522 | oTimer[objectid] = SetTimerEx("RotateObj",ospeed[objectid],0,"dd",objectid,points);
| |
| 523 | newrotX[objectid] = rotX; newrotY[objectid] = rotY; newrotZ[objectid] = rotZ; | |
| 524 | new Float:rot[3]; GetObjectRot(objectid,rot[0],rot[1],rot[2]); | |
| 525 | odifX[objectid] = (rotX-rot[0])/points; odifY[objectid] = (rotY-rot[1])/points; | |
| 526 | odifZ[objectid] = (rotZ-rot[2])/points; oState[objectid] = 1; opoints[objectid] = 0; | |
| 527 | return 1; | |
| 528 | } | |
| 529 | ||
| 530 | stock SetObjectRotationSpeed(objectid,Float:speed) | |
| 531 | {
| |
| 532 | ospeed[objectid] = floatround(floatdiv(1000,speed),floatround_round); | |
| 533 | return 1; | |
| 534 | } | |
| 535 | ||
| 536 | stock StopRotatingObject(objectid) | |
| 537 | {
| |
| 538 | if(oState[objectid] == 1)KillTimer(oTimer[objectid]); oState[objectid] = 0; OnObjectStopRotate(objectid); | |
| 539 | return 1; | |
| 540 | } | |
| 541 | ||
| 542 | stock GenerateBucle(objectid,Float:offX,Float:offY,Float:offZ,Float:speed) | |
| 543 | {
| |
| 544 | if(oState[objectid] == 1)KillTimer(oTimer[objectid]); | |
| 545 | ospeed[objectid] = floatround(floatdiv(1000,speed),floatround_round); | |
| 546 | oTimer[objectid] = SetTimerEx("RotateObjBucle",ospeed[objectid],0,"d",objectid);
| |
| 547 | odifX[objectid] = offX; odifY[objectid] = offY; | |
| 548 | odifZ[objectid] = offZ; oState[objectid] = 1; | |
| 549 | return 1; | |
| 550 | } | |
| 551 | ||
| 552 | stock StopBucle(objectid) | |
| 553 | {
| |
| 554 | if(oState[objectid] == 1) | |
| 555 | {
| |
| 556 | KillTimer(oTimer[objectid]); | |
| 557 | oState[objectid] = 0; | |
| 558 | OnObjectStopBucle(objectid); | |
| 559 | } | |
| 560 | return 1; | |
| 561 | } | |
| 562 | ||
| 563 | stock Float:distance(Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2) | |
| 564 | {
| |
| 565 | return Float:floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2)); | |
| 566 | } | |
| 567 | ||
| 568 | stock GetClosestCheckpoint(playerid,Float:x,Float:y,Float:z) | |
| 569 | {
| |
| 570 | new Float:closest = 9999.9999; new j = -1; | |
| 571 | for(new i = 0;i < STEAM_CHECKPOINTS;i++) | |
| 572 | {
| |
| 573 | if(CheckpointsToShow[playerid][i] == 1) | |
| 574 | {
| |
| 575 | if(distance(x,y,z,Checkpoint[i][checkpoint_x],Checkpoint[i][checkpoint_y],Checkpoint[i][checkpoint_z]) < closest) | |
| 576 | {
| |
| 577 | closest = distance(x,y,z,Checkpoint[i][checkpoint_x],Checkpoint[i][checkpoint_y],Checkpoint[i][checkpoint_z]); j = i; | |
| 578 | ||
| 579 | } | |
| 580 | } | |
| 581 | } | |
| 582 | return j; | |
| 583 | } | |
| 584 | ||
| 585 | stock DeletePlayerVehicle(playerid) | |
| 586 | {
| |
| 587 | new CVID, pvmid, pmsg[64]; CVID = P_DATA_VEH[playerid][vehicle]; | |
| 588 | pvmid = GetVehicleModel(CVID); SetVehicleToRespawn(GetPlayerVehicleID(playerid)); DestroyVehicle(CVID); | |
| 589 | format(pmsg,sizeof(pmsg),"Vehicle ID: %i Destroyed. (Model %i)",CVID,pvmid); print(pmsg); | |
| 590 | return true; | |
| 591 | } | |
| 592 | ||
| 593 | stock SetPlayerPosEx(playerid, Float:x ,Float:y,Float:z,Float:a,interior = 0,vw = 0) | |
| 594 | {
| |
| 595 | SetPlayerPos(playerid , x , y ,z); SetPlayerFacingAngle(playerid, a); | |
| 596 | SetPlayerInterior(playerid, interior); SetPlayerVirtualWorld(playerid, vw); | |
| 597 | return 1; | |
| 598 | } | |
| 599 | ||
| 600 | stock RemoveBuilding(modelid, Float:oX, Float:oY, Float:oZ, Float:oRadius = 0.25, Float:orX = 0.0, Float:orY = 0.0, Float:orZ = 0.0) | |
| 601 | {
| |
| 602 | for(new i; i < MAX_REMOVED_OBJECTS; i++) | |
| 603 | {
| |
| 604 | if(RemovedObjects[i][_model] != modelid) continue; | |
| 605 | if(RemovedObjects[i][restored] != 0) | |
| 606 | {
| |
| 607 | if((RemovedObjects[i][_oX] == oX) && (RemovedObjects[i][_oY] == oY) && (RemovedObjects[i][_oZ] == oZ)) | |
| 608 | {
| |
| 609 | DestroyObject(RemovedObjects[i][restored]); RemovedObjects[i][restored] = 0; RemovedObjects[i][_model] = 0; | |
| 610 | return i; | |
| 611 | } | |
| 612 | } | |
| 613 | } | |
| 614 | new slot = GetObjectFreeSlot(); | |
| 615 | if(slot == -1) return printf("\tCannot remove any more objects.\nIncrease MAX_REMOVED_OBJECTS in your script.\nIt is currently: %i", MAX_REMOVED_OBJECTS);
| |
| 616 | RemovedObjects[slot][_model] = modelid; RemovedObjects[slot][_oX] = oX; RemovedObjects[slot][_oY] = oY; | |
| 617 | RemovedObjects[slot][_oZ] = oZ; RemovedObjects[slot][_oRadius] = oRadius; | |
| 618 | RemovedObjects[slot][_orX] = orX; RemovedObjects[slot][_orY] = orY; RemovedObjects[slot][_orZ] = orZ; | |
| 619 | for(new i; i < MAX_PLAYERS; i++) | |
| 620 | {
| |
| 621 | if(!IsPlayerConnected(i)) continue; | |
| 622 | RemoveBuildingForPlayer(i, modelid, oX, oY, oZ, oRadius); | |
| 623 | } | |
| 624 | return slot; | |
| 625 | } | |
| 626 | ||
| 627 | stock RestoreBuilding(slot) | |
| 628 | {
| |
| 629 | if(slot < 0 || slot > MAX_REMOVED_OBJECTS) return 0; | |
| 630 | if(RemovedObjects[slot][_model] == 0) return 0; | |
| 631 | RemovedObjects[slot][restored] = CreateObject(RemovedObjects[slot][_model], RemovedObjects[slot][_oX], RemovedObjects[slot][_oY], RemovedObjects[slot][_oZ], RemovedObjects[slot][_orX], RemovedObjects[slot][_orY], RemovedObjects[slot][_orZ]); | |
| 632 | return 1; | |
| 633 | } | |
| 634 | ||
| 635 | stock RemoveSpecificBuilding(modelid) | |
| 636 | {
| |
| 637 | return RemoveBuilding(modelid, 0.0, 0.0, 0.0, 10000.0); | |
| 638 | } | |
| 639 | ||
| 640 | stock RemoveBuildingInit(playerid) | |
| 641 | {
| |
| 642 | for(new i; i < MAX_REMOVED_OBJECTS; i++) | |
| 643 | {
| |
| 644 | if(RemovedObjects[i][_model] != 0) | |
| 645 | {
| |
| 646 | RemoveBuildingForPlayer(playerid, RemovedObjects[i][_model], RemovedObjects[i][_oX], RemovedObjects[i][_oY], RemovedObjects[i][_oZ], RemovedObjects[i][_oRadius]); | |
| 647 | } | |
| 648 | } | |
| 649 | return 1; | |
| 650 | } | |
| 651 | ||
| 652 | stock GetObjectFreeSlot() | |
| 653 | {
| |
| 654 | for(new i; i < MAX_REMOVED_OBJECTS; i++) | |
| 655 | {
| |
| 656 | if(RemovedObjects[i][_model] == 0) return i; | |
| 657 | } | |
| 658 | return -1; | |
| 659 | } | |
| 660 | ||
| 661 | stock CountRemovedObjects() | |
| 662 | {
| |
| 663 | new count = 0; | |
| 664 | for(new i; i < MAX_REMOVED_OBJECTS; i++) | |
| 665 | {
| |
| 666 | if(RemovedObjects[i][_model] != 0) count++; | |
| 667 | } | |
| 668 | return count; | |
| 669 | } |