SHOW:
|
|
- or go back to the newest paste.
| 1 | //THIS SCRIPT IS MADE BY MILAN_HUIZEN | |
| 2 | //IF U USE OR EDIT THIS SCRIPT. DONT REMOVE THE CREDITS | |
| 3 | //THAT IS ALL I ASK:) HAVE FUN WITH IT AND I HOPE YOU APPRECIATE IT | |
| 4 | ||
| 5 | #define FILTERSCRIPT | |
| 6 | ||
| 7 | #include <a_samp> | |
| 8 | #include <zcmd> | |
| 9 | #include <sscanf> | |
| 10 | ||
| 11 | new Truck1; | |
| 12 | new Truck2; | |
| 13 | new Truck3; | |
| 14 | new Truck4; | |
| 15 | new truck1loaded; | |
| 16 | new truck2loaded; | |
| 17 | new truck3loaded; | |
| 18 | new truck4loaded; | |
| 19 | new PickUpLoad; | |
| 20 | new PickUpUnload; | |
| 21 | ||
| 22 | #if defined FILTERSCRIPT | |
| 23 | ||
| 24 | public OnFilterScriptInit() | |
| 25 | {
| |
| 26 | truck1loaded = 0; | |
| 27 | truck2loaded = 0; | |
| 28 | truck3loaded = 0; | |
| 29 | truck4loaded = 0; | |
| 30 | PickUpLoad = CreatePickup(1239, 1, 2334.8611, -2081.3384, 13.5469, 0); // Loading Point | |
| 31 | PickUpUnload = CreatePickup(1239, 1, -1969.5801, -2431.8479, 30.6250, 0); //Unloading point | |
| 32 | Truck1 = AddStaticVehicleEx(456,-68.3554,-1156.6191,1.9231,89.0, -1,-1, 6000000); // TRUCK 1 heroin | |
| 33 | Truck2 = AddStaticVehicleEx(456,-72.3116,-1160.9124,1.9718,89.0,-1,-1, 6000000); // TRUCK 2 heroin | |
| 34 | Truck3 = AddStaticVehicleEx(456,-81.4130,-1187.9762,1.9228,89.0,-1,-1, 6000000); // TRUCK 3 heroin | |
| 35 | Truck4 = AddStaticVehicleEx(456,-85.0908,-1193.1639,2.0789,89.0,-1,-1, 6000000); // TRUCK 4 heroin | |
| 36 | print("\n--------------------------------------");
| |
| 37 | print(" Heroin Smuggling by Milan_Huizen");
| |
| 38 | print("--------------------------------------\n");
| |
| 39 | return 1; | |
| 40 | } | |
| 41 | ||
| 42 | public OnFilterScriptExit() | |
| 43 | {
| |
| 44 | return 1; | |
| 45 | } | |
| 46 | ||
| 47 | #else | |
| 48 | ||
| 49 | main() | |
| 50 | {
| |
| 51 | print("\n----------------------------------");
| |
| 52 | print(" Blank Gamemode by your name here");
| |
| 53 | print("----------------------------------\n");
| |
| 54 | } | |
| 55 | ||
| 56 | #endif | |
| 57 | ||
| 58 | public OnGameModeInit() | |
| 59 | {
| |
| 60 | // Don't use these lines if it's a filterscript | |
| 61 | return 1; | |
| 62 | } | |
| 63 | ||
| 64 | public OnGameModeExit() | |
| 65 | {
| |
| 66 | return 1; | |
| 67 | } | |
| 68 | ||
| 69 | public OnPlayerRequestClass(playerid, classid) | |
| 70 | {
| |
| 71 | SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746); | |
| 72 | SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746); | |
| 73 | SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746); | |
| 74 | return 1; | |
| 75 | } | |
| 76 | ||
| 77 | public OnPlayerConnect(playerid) | |
| 78 | {
| |
| 79 | SendClientMessage(playerid, 0xFF950063, "This server uses Heroin Smuggler Job by Milan_Huizen"); | |
| 80 | return 1; | |
| 81 | } | |
| 82 | ||
| 83 | public OnPlayerDisconnect(playerid, reason) | |
| 84 | {
| |
| 85 | return 1; | |
| 86 | } | |
| 87 | ||
| 88 | public OnPlayerSpawn(playerid) | |
| 89 | {
| |
| 90 | return 1; | |
| 91 | } | |
| 92 | ||
| 93 | public OnPlayerDeath(playerid, killerid, reason) | |
| 94 | {
| |
| 95 | return 1; | |
| 96 | } | |
| 97 | ||
| 98 | public OnVehicleSpawn(vehicleid) | |
| 99 | {
| |
| 100 | return 1; | |
| 101 | } | |
| 102 | ||
| 103 | public OnVehicleDeath(vehicleid, killerid) | |
| 104 | {
| |
| 105 | return 1; | |
| 106 | } | |
| 107 | ||
| 108 | public OnPlayerText(playerid, text[]) | |
| 109 | {
| |
| 110 | return 1; | |
| 111 | } | |
| 112 | ||
| 113 | CMD:unloadheroin(playerid, params[]) | |
| 114 | {
| |
| 115 | if(GetPlayerScore(playerid) >= -500) | |
| 116 | {
| |
| 117 | if(IsPlayerInRangeOfPoint(playerid, 7.0, 2334.8611, -2081.3384, 13.5469)) | |
| 118 | {
| |
| 119 | new getveh; | |
| 120 | getveh = GetPlayerVehicleID(playerid); | |
| 121 | if(getveh == Truck1) | |
| 122 | {
| |
| 123 | if(truck1loaded == 1) | |
| 124 | {
| |
| 125 | truck1loaded = 0; | |
| 126 | GivePlayerMoney(playerid, 1500); | |
| 127 | SendClientMessage(playerid, 0x00900082, "You sold the heroin and earned $1500!"); | |
| 128 | return 1; | |
| 129 | } | |
| 130 | else return SendClientMessage(playerid, 0x00000014, "Your truck is emtpy!"); | |
| 131 | } | |
| 132 | if(getveh == Truck2) | |
| 133 | {
| |
| 134 | if(truck2loaded == 1) | |
| 135 | {
| |
| 136 | truck2loaded = 0; | |
| 137 | GivePlayerMoney(playerid, 1500); | |
| 138 | SendClientMessage(playerid, 0x00900082, "You sold the heroin and earned $1500!"); | |
| 139 | return 1; | |
| 140 | } | |
| 141 | else return SendClientMessage(playerid, 0x00000014, "Your truck is emtpy!"); | |
| 142 | } | |
| 143 | if(getveh == Truck3) | |
| 144 | {
| |
| 145 | if(truck3loaded == 1) | |
| 146 | {
| |
| 147 | truck3loaded = 0; | |
| 148 | GivePlayerMoney(playerid, 1500); | |
| 149 | SendClientMessage(playerid, 0x00900082, "You sold the heroin and earned $1500!"); | |
| 150 | return 1; | |
| 151 | } | |
| 152 | else return SendClientMessage(playerid, 0x00000014, "Your truck is emtpy!"); | |
| 153 | } | |
| 154 | if(getveh == Truck4) | |
| 155 | {
| |
| 156 | if(truck4loaded == 1) | |
| 157 | {
| |
| 158 | truck4loaded = 0; | |
| 159 | GivePlayerMoney(playerid, 1500); | |
| 160 | SendClientMessage(playerid, 0x00900082, "You sold the heroin and earned $1500!"); | |
| 161 | return 1; | |
| 162 | } | |
| 163 | else return SendClientMessage(playerid, 0x00000014, "Your truck is emtpy!"); | |
| 164 | } | |
| 165 | else return SendClientMessage(playerid, 0x00000014, "You are not in a heroin delivery truck!"); | |
| 166 | } | |
| 167 | else return SendClientMessage(playerid, 0x00000014, "You are not near the delivery point!"); | |
| 168 | } | |
| 169 | else return SendClientMessage(playerid, 0x00000014, "You are failing to hard to use this command. TROLLED BY MILAN"); | |
| 170 | } | |
| 171 | ||
| 172 | CMD:loadheroin(playerid, params[]) | |
| 173 | {
| |
| 174 | if(GetPlayerScore(playerid) >= -500) | |
| 175 | {
| |
| 176 | if(IsPlayerInRangeOfPoint(playerid, 7.0, -1969.5801, -2431.8479, 30.6250)) | |
| 177 | {
| |
| 178 | new getveh; | |
| 179 | getveh = GetPlayerVehicleID(playerid); | |
| 180 | if(getveh == Truck1) | |
| 181 | {
| |
| 182 | if(truck1loaded == 0) | |
| 183 | {
| |
| 184 | truck1loaded = 1; | |
| 185 | GivePlayerMoney(playerid, -500); | |
| 186 | SendClientMessage(playerid, 0x00900082, "You bought heroin for $500"); | |
| 187 | return 1; | |
| 188 | } | |
| 189 | else return SendClientMessage(playerid, 0x00000014, "Your truck is emtpy!"); | |
| 190 | } | |
| 191 | if(getveh == Truck2) | |
| 192 | {
| |
| 193 | if(truck2loaded == 0) | |
| 194 | {
| |
| 195 | truck2loaded = 1; | |
| 196 | GivePlayerMoney(playerid, -500); | |
| 197 | SendClientMessage(playerid, 0x00900082, "You bought heroin for $500"); | |
| 198 | return 1; | |
| 199 | } | |
| 200 | else return SendClientMessage(playerid, 0x00000014, "Your truck is emtpy!"); | |
| 201 | } | |
| 202 | if(getveh == Truck3) | |
| 203 | {
| |
| 204 | if(truck3loaded == 0) | |
| 205 | {
| |
| 206 | truck3loaded = 1; | |
| 207 | GivePlayerMoney(playerid, -500); | |
| 208 | SendClientMessage(playerid, 0x00900082, "You bought heroin for $500"); | |
| 209 | return 1; | |
| 210 | } | |
| 211 | else return SendClientMessage(playerid, 0x00000014, "Your truck is emtpy!"); | |
| 212 | } | |
| 213 | if(getveh == Truck4) | |
| 214 | {
| |
| 215 | if(truck4loaded == 0) | |
| 216 | {
| |
| 217 | truck4loaded = 1; | |
| 218 | GivePlayerMoney(playerid, -500); | |
| 219 | SendClientMessage(playerid, 0x00900082, "You bought heroin for $500"); | |
| 220 | return 1; | |
| 221 | } | |
| 222 | else return SendClientMessage(playerid, 0x00000014, "Your truck is already full!"); | |
| 223 | } | |
| 224 | else return SendClientMessage(playerid, 0x00000014, "You are not in a heroin delivery truck!"); | |
| 225 | } | |
| 226 | else return SendClientMessage(playerid, 0x00000014, "You are not near a loading point!"); | |
| 227 | } | |
| 228 | else return SendClientMessage(playerid, 0x00000014, "You are failing to hard to use this command. TROLLED BY MILAN"); | |
| 229 | } | |
| 230 | ||
| 231 | CMD:frisktruck(playerid, params[]) | |
| 232 | {
| |
| 233 | new Float:Xh1, Float:Yh1, Float:Zh1; | |
| 234 | new Float:Xh2, Float:Yh2, Float:Zh2; | |
| 235 | new Float:Xh3, Float:Yh3, Float:Zh3; | |
| 236 | new Float:Xh4, Float:Yh4, Float:Zh4; | |
| 237 | GetVehiclePos(Truck1, Xh1, Yh1, Zh1); | |
| 238 | GetVehiclePos(Truck2, Xh2, Yh2, Zh2); | |
| 239 | GetVehiclePos(Truck3, Xh3, Yh3, Zh3); | |
| 240 | GetVehiclePos(Truck4, Xh4, Yh4, Zh4); | |
| 241 | if(GetPlayerScore(playerid) >= -500) | |
| 242 | {
| |
| 243 | if(IsPlayerInRangeOfPoint(playerid, 5.0, Xh1, Yh1, Zh1)) | |
| 244 | {
| |
| 245 | if(truck1loaded == 0) | |
| 246 | {
| |
| 247 | SendClientMessage(playerid, 0x00900082, "Heroin: 0"); | |
| 248 | return 1; | |
| 249 | } | |
| 250 | if(truck1loaded == 1) | |
| 251 | {
| |
| 252 | SendClientMessage(playerid, 0x00900082, "Heroin: 3"); | |
| 253 | return 1; | |
| 254 | } | |
| 255 | } | |
| 256 | if(IsPlayerInRangeOfPoint(playerid, 5.0, Xh2, Yh2, Zh2)) | |
| 257 | {
| |
| 258 | if(truck2loaded == 0) | |
| 259 | {
| |
| 260 | SendClientMessage(playerid, 0x00900082, "Heroin: 0"); | |
| 261 | return 1; | |
| 262 | } | |
| 263 | if(truck2loaded == 1) | |
| 264 | {
| |
| 265 | SendClientMessage(playerid, 0x00900082, "Heroin: 3"); | |
| 266 | return 1; | |
| 267 | } | |
| 268 | } | |
| 269 | if(IsPlayerInRangeOfPoint(playerid, 5.0, Xh3, Yh3, Zh3)) | |
| 270 | {
| |
| 271 | if(truck3loaded == 0) | |
| 272 | {
| |
| 273 | SendClientMessage(playerid, 0x00900082, "Heroin: 0"); | |
| 274 | return 1; | |
| 275 | } | |
| 276 | if(truck3loaded == 1) | |
| 277 | {
| |
| 278 | SendClientMessage(playerid, 0x00900082, "Heroin: 3"); | |
| 279 | return 1; | |
| 280 | } | |
| 281 | } | |
| 282 | if(IsPlayerInRangeOfPoint(playerid, 5.0, Xh4, Yh4, Zh4)) | |
| 283 | {
| |
| 284 | if(truck4loaded == 0) | |
| 285 | {
| |
| 286 | SendClientMessage(playerid, 0x00900082, "Heroin: 0"); | |
| 287 | return 1; | |
| 288 | } | |
| 289 | if(truck4loaded == 1) | |
| 290 | {
| |
| 291 | SendClientMessage(playerid, 0x00900082, "Heroin: 3"); | |
| 292 | return 1; | |
| 293 | } | |
| 294 | return 1; | |
| 295 | } | |
| 296 | else return SendClientMessage(playerid, 0x00000014, "You are not near any possible smuggling vehicles!"); | |
| 297 | } | |
| 298 | else return SendClientMessage(playerid, 0x00000014, "You are in minus 500 score.. u suck"); | |
| 299 | } | |
| 300 | ||
| 301 | public OnPlayerPickUpPickup(playerid, pickupid) | |
| 302 | {
| |
| 303 | if(pickupid == PickUpLoad) | |
| 304 | {
| |
| 305 | GameTextForPlayer(playerid,"~b~Use /loadheroin to buy heroin!",2000,1); | |
| 306 | return 1; | |
| 307 | } | |
| 308 | if(pickupid == PickUpUnload) | |
| 309 | {
| |
| 310 | GameTextForPlayer(playerid,"~b~Use /unloadheroin to sell your heroin!",2000,1); | |
| 311 | return 1; | |
| 312 | } | |
| 313 | return 1; | |
| 314 | } |