2_1.5: - added a 15 minute countdown 'clock' with the textdraw system - added team identification of sender and suspect in /report - blocked pm from picking up rockets in desert - added rockets and heat seekers to /minis - changed /minis into /weapons & /weps - names now get removed from /weps when you run out of ammo or overwrite your weapon with another - blocked /reclass while watching - blocked /watch while at the character selection screen to stop bugs with weapons/teams mixing up - redid weather ids - added time checks to reject 'bad' weathers at times when they dont work - added a health increase check for the pm on the air map (to stop the pm camping on the ground using a vending machine to regenerate) - added a /rc abreviation for /reclass - added /rc for tmedic, bmedic and cmedic respectively - more weapon pickups added to chiliad - more vehicle spawns added to chiliad - objects added to chiliad - basic anti spam system added new mode_name[] = "Protect the PM 2 v1.5"; #include #include #define log_printf(%1) do { \ new _dy, _mn, _yr; \ new _h, _m, _s; \ getdate(_yr,_mn,_dy); \ gettime(_h,_m,_s); \ new _text[256]; \ format(_text,sizeof _text,"activity_log_%%002d%%002d%%002d.txt",_yr,_mn,_dy); \ new File:_f = fopen(_text,io_append); \ if (_f) { \ format (_text,sizeof _text,"%%002d%%002d%%002d ",_h,_m,_s); \ fwrite(_f,_text); \ format (_text,sizeof _text,%1); \ fwrite(_f,_text); \ fwrite(_f,"\n"); \ fclose(_f); \ } \ } while (zero()) // do while required so we can do if (...) log_printf(...); else ... #define COLOUR_PERSONAL 0x8080FFAA #define COLOUR_IMPORTANT 0xFF0000AA #define COLOUR_GLOBAL 0xD0D0FFAA #define COLOUR_BROADCAST 0x0066CCAA #define COLOUR_QUERY 0xFFDC18AA #define COLOUR_CONNECTION 0xC0C0C0FF #define GAME_TEXT_STYLE_BIG 6 #define GAME_TEXT_STYLE_SMALL 4 //#define PICKUP_BRASS_KNUCKLES 331 #define PICKUP_GOLFCLUB 333 #define PICKUP_NITESTICK 334 #define PICKUP_KNIFE 335 #define PICKUP_BAT 336 #define PICKUP_SHOVEL 337 #define PICKUP_POOLSTICK 338 #define PICKUP_KATANA 338 #define PICKUP_CHAINSAW 341 #define PICKUP_DILDO 321 #define PICKUP_DILDO2 322 #define PICKUP_VIBRATOR1 323 #define PICKUP_VIBRATOR2 324 #define PICKUP_FLOWER 325 #define PICKUP_CANE 326 #define PICKUP_GRENADE 342 // not synced #define PICKUP_TEARGAS 343 #define PICKUP_MOLTOV 344 //#define PICKUP_MISSILE 345 #define PICKUP_COLT45 346 #define PICKUP_SILENCED 347 #define PICKUP_DEAGLE 348 #define PICKUP_SHOTGUN 349 #define PICKUP_SAWEDOFF 350 #define PICKUP_SHOTGSPA 351 #define PICKUP_UZI 352 #define PICKUP_MP5 353 //#define PICKUP_HYDRAFLARE 354 #define PICKUP_AK47 355 #define PICKUP_M4 356 #define PICKUP_TEC9 372 #define PICKUP_RIFLE 357 #define PICKUP_SNIPER 358 #define PICKUP_ROCKETLAUNCHER 359 #define PICKUP_HEATSEEKER 360 #define PICKUP_FLAMETHROWER 361 #define PICKUP_MINIGUN 362 //#define PICKUP_SACHEL 363 //#define PICKUP_BOMB 364 // actually the detonator #define PICKUP_SPRAYCAN 365 #define PICKUP_FIREEXTINGUISHER 366 //#define PICKUP_CAMERA 367 //#define PICKUP_NIGHTVISION_GOGGLES 368 //#define PICKUP_THERMAL_GOGGLES 369 #define PICKUP_PARACHUTE 371 #define PICKUP_ARMOR 1242 #define PICKUP_JETPACK 370 #define SOUND_PICKUP_STANDARD 1150 #define PICKUP_SECURITY_CAMERA 1616 #define PICKUP_ARROW 1318 // every vehicle in SA #define V_ADMIRAL 445 #define V_ALPHA 602 #define V_AMBULAN 416 #define V_ANDROM 592 // air #define V_ARTICT1 435 #define V_ARTICT2 450 #define V_ARTICT3 591 #define V_AT400 577 // air #define V_BAGBOXA 606 #define V_BAGBOXB 607 #define V_BAGGAGE 485 #define V_BANDITO 568 #define V_BANSHEE 429 #define V_BARRACKS 433 #define V_BEAGLE 511 // air #define V_BENSON 499 #define V_BF400 581 // bike #define V_BFINJECT 424 #define V_BIKE 509 // bike #define V_BLADE 536 #define V_BLISTAC 496 #define V_BLOODRA 504 #define V_BMX 481 // bike #define V_BOBCAT 422 #define V_BOXBURG 609 #define V_BOXVILLE 498 #define V_BRAVURA 401 #define V_BROADWAY 575 #define V_BUCCANEE 518 #define V_BUFFALO 402 #define V_BULLET 541 #define V_BURRITO 482 #define V_BUS 431 #define V_CABBIE 438 #define V_CADDY 457 #define V_CADRONA 527 #define V_CAMPER 483 #define V_CARGOBOB 548 // air #define V_CEMENT 524 #define V_CHEETAH 415 #define V_CLOVER 542 #define V_CLUB 589 #define V_COACH 437 #define V_COASTG 472 // water #define V_COMBINE 532 #define V_COMET 480 #define V_COPBIKE 523 // bike #define V_COPCARLA 596 #define V_COPCARRU 599 #define V_COPCARSF 597 #define V_COPCARVG 598 #define V_CROPDUST 512 // air #define V_DFT30 578 #define V_DINGHY 473 // water #define V_DODO 593 // air #define V_DOZER 486 #define V_DUMPER 406 #define V_DUNERIDE 573 #define V_ELEGANT 507 #define V_ELEGY 562 #define V_EMPEROR 585 #define V_ENFORCER 427 #define V_ESPERANT 419 #define V_EUROS 587 #define V_FAGGIO 462 #define V_FARMTR1 610 #define V_FBIRANCH 490 #define V_FBITRUCK 528 #define V_FCR900 521 // bike #define V_FELTZER 533 #define V_FIRELA 544 #define V_FIRETRUK 407 #define V_FLASH 565 #define V_FLATBED 455 #define V_FORKLIFT 530 #define V_FORTUNE 526 #define V_FREEWAY 463 // bike #define V_FREIBOX 590 #define V_FREIFLAT 569 #define V_FREIGHT 537 #define V_GLENDALE 466 #define V_GLENSHIT 604 #define V_GREENWOO 492 #define V_HERMES 474 #define V_HOTDOG 588 #define V_HOTKNIFE 434 #define V_HOTRINA 502 #define V_HOTRINB 503 #define V_HOTRING 494 #define V_HUNTER 425 // air #define V_HUNTLEY 579 #define V_HUSTLER 545 #define V_HYDRA 520 // air #define V_INFERNUS 411 #define V_INTRUDER 546 #define V_JESTER 559 #define V_JETMAX 493 // water #define V_JOURNEY 508 #define V_KART 571 #define V_LANDSTAL 400 #define V_LAUNCH 595 // water #define V_LEVIATHN 417 // air #define V_LINERUN 403 #define V_MAJESTIC 517 #define V_MANANA 410 #define V_MARQUIS 484 // water #define V_MAVERICK 487 // air #define V_MERIT 551 #define V_MESA 500 #define V_MONSTER 444 #define V_MONSTERA 556 #define V_MONSTERB 557 #define V_MOONBEAM 418 #define V_MOWER 572 #define V_MRWHOOP 423 #define V_MTBIKE 510 // bike #define V_MULE 414 #define V_NEBULA 516 #define V_NEVADA 553 // air #define V_NEWSVAN 582 #define V_NRG500 522 // bike #define V_OCEANIC 467 #define V_PACKER 443 #define V_PATRIOT 470 #define V_PCJ600 461 // bike #define V_PEREN 404 #define V_PETRO 514 #define V_PETROTR 584 #define V_PHOENIX 603 #define V_PICADOR 600 #define V_PIZZABOY 448 #define V_POLMAV 497 // air #define V_PONY 413 #define V_PREDATOR 430 // water #define V_PREMIER 426 #define V_PREVION 436 #define V_PRIMO 547 #define V_QUAD 471 // bike #define V_RAINDANC 563 // air #define V_RANCHER 489 #define V_RCBANDIT 441 #define V_RCBARON 464 // air #define V_RCCAM 594 #define V_RCGOBLIN 501 // air #define V_RCRAIDER 465 // air #define V_RCTIGER 564 #define V_RDTRAIN 515 #define V_REEFER 453 // water #define V_REGINA 479 #define V_REMINGTN 534 #define V_RHINO 432 #define V_RNCHLURE 505 #define V_ROMERO 442 #define V_RUMPO 440 #define V_RUSTLER 476 // air #define V_SABRE 475 #define V_SADLER 543 #define V_SADLSHIT 605 #define V_SANCHEZ 468 // bike #define V_SANDKING 495 #define V_SAVANNA 567 #define V_SEASPAR 447 // air #define V_SECURICA 428 #define V_SENTINEL 405 #define V_SHAMAL 519 // air #define V_SKIMMER 460 // air #define V_SLAMVAN 535 #define V_SOLAIR 458 #define V_SPARROW 469 // air #define V_SPEEDER 452 // water #define V_SQUALO 446 // water #define V_STAFFORD 580 #define V_STALLION 439 #define V_STRATUM 561 #define V_STREAK 538 #define V_STREAKC 570 #define V_STRETCH 409 #define V_STUNT 513 // air #define V_SULTAN 560 #define V_SUNRISE 550 #define V_SUPERGT 506 #define V_SWATVAN 601 #define V_SWEEPER 574 #define V_TAHOMA 566 #define V_TAMPA 549 #define V_TAXI 420 #define V_TOPFUN 459 #define V_TORNADO 576 #define V_TOWTRUCK 525 #define V_TRACTOR 531 #define V_TRAM 449 #define V_TRASH 408 #define V_TROPIC 454 #define V_TUG 583 #define V_TUGSTAIR 608 #define V_TURISMO 451 #define V_URANUS 558 #define V_UTILITY 552 #define V_UTILTR1 611 #define V_VCNMAV 488 // air #define V_VINCENT 540 #define V_VIRGO 491 #define V_VOODOO 412 #define V_VORTEX 539 // hovercraft #define V_WALTON 478 #define V_WASHING 421 #define V_WAYFARER 586 // bike #define V_WILLARD 529 #define V_WINDSOR 555 #define V_YANKEE 456 #define V_YOSEMITE 554 #define V_ZR350 477 #define NUM_V_MODELIDS 212 // maximum velocities from standard handling.cfg // for CHEETAH (415) use vehicle_velocity[15]; new Float:vehicle_velocity[NUM_V_MODELIDS] = { 160.0, // landstal (400) 160.0, // bravura (401) 200.0, // buffalo (402) 120.0, // linerun (403) 150.0, // peren (404) 165.0, // sentinel (405) 110.0, // dumper (406) 170.0, // firetruk (407) 110.0, // trash (408) 180.0, // stretch (409) 160.0, // manana (410) 240.0, // infernus (411) 160.0, // voodoo (412) 160.0, // pony (413) 140.0, // mule (414) 230.0, // cheetah (415) 155.0, // ambulan (416) 200.0, // leviathn (417) 150.0, // moonbeam (418) 160.0, // esperant (419) 180.0, // taxi (420) 180.0, // washing (421) 165.0, // bobcat (422) 145.0, // mrwhoop (423) 170.0, // bfinject (424) 200.0, // hunter (425) 200.0, // premier (426) 170.0, // enforcer (427) 170.0, // securica (428) 200.0, // banshee (429) 190.0, // predator (430) 130.0, // bus (431) 80.0, // rhino (432) 180.0, // barracks (433) 200.0, // hotknife (434) 120.0, // artict1 (435) 160.0, // previon (436) 160.0, // coach (437) 160.0, // cabbie (438) 160.0, // stallion (439) 160.0, // rumpo (440) 75.0, // rcbandit (441) 150.0, // romero (442) 150.0, // packer (443) 110.0, // monster (444) 165.0, // admiral (445) 280.0, // squalo (446) // WAS 190 200.0, // seaspar (447) 190.0, // pizzaboy (448) 150.0, // tram (449) 120.0, // artict2 (450) 240.0, // turismo (451) 190.0, // speeder (452) 190.0, // reefer (453) 190.0, // tropic (454) 140.0, // flatbed (455) 160.0, // yankee (456) 160.0, // caddy (457) 165.0, // solair (458) 160.0, // topfun (459) 200.0, // skimmer (460) 190.0, // pcj600 (461) 190.0, // faggio (462) 190.0, // freeway (463) 75.0, // rcbaron (464) 75.0, // rcraider (465) 160.0, // glendale (466) 160.0, // oceanic (467) 190.0, // sanchez (468) 200.0, // sparrow (469) 170.0, // patriot (470) 160.0, // QUAD (471) 190.0, // coastg (472) 190.0, // dinghy (473) 160.0, // hermes (474) 160.0, // sabre (475) 330.0, // rustler (476) (was 200) 200.0, // zr350 (477) 150.0, // walton (478) 165.0, // regina (479) 200.0, // comet (480) 120.0, // bmx (481) 150.0, // burrito (482) 120.0, // camper (483) 190.0, // marquis (484) 160.0, // baggage (485) 100.0, // dozer (486) 200.0, // maverick (487) 200.0, // vcnmav (488) 170.0, // rancher (489) 170.0, // fbiranch (490) 160.0, // virgo (491) 160.0, // greenwoo (492) 190.0, // jetmax (493) 220.0, // hotring (494) 170.0, // sandking (495) 200.0, // blistac (496) 200.0, // polmav (497) 140.0, // boxville (498) 140.0, // benson (499) 160.0, // mesa (500) 75.0, // rcgoblin (501) 220.0, // hotrina (502) 220.0, // hotrinb (503) 160.0, // bloodra (504) 170.0, // rnchlure (505) 230.0, // supergt (506) 165.0, // elegant (507) 140.0, // journey (508) 120.0, // bike (509) 140.0, // mtbike (510) 200.0, // beagle (511) 200.0, // cropdust (512) 200.0, // stunt (513) 120.0, // petro (514) 120.0, // rdtrain (515) 165.0, // nebula (516) 165.0, // majestic (517) 160.0, // buccanee (518) 330.0, // shamal (519) (WAS 200) 330.0, // hydra (520) (WAS 200) 190.0, // fcr900 (521) 190.0, // nrg500 (522) 190.0, // copbike (523) 110.0, // cement (524) 160.0, // towtruck (525) 160.0, // fortune (526) 160.0, // cadrona (527) 170.0, // fbitruck (528) 160.0, // willard (529) 60.0, // forklift (530) 70.0, // tractor (531) 140.0, // combine (532) 200.0, // feltzer (533) 160.0, // remingtn (534) 160.0, // slamvan (535) 160.0, // blade (536) 110.0, // freight (537) 110.0, // streak (538) 150.0, // vortex (539) 160.0, // vincent (540) 230.0, // bullet (541) 160.0, // clover (542) 165.0, // sadler (543) 170.0, // firela (544) 160.0, // hustler (545) 160.0, // intruder (546) 160.0, // primo (547) 200.0, // cargobob (548) 160.0, // tampa (549) 160.0, // sunrise (550) 165.0, // merit (551) 160.0, // utility (552) 200.0, // nevada (553) 170.0, // yosemite (554) 180.0, // windsor (555) 110.0, // monstera (556) 110.0, // monsterb (557) 200.0, // uranus (558) 200.0, // jester (559) 200.0, // sultan (560) 200.0, // stratum (561) 200.0, // elegy (562) 200.0, // raindanc (563) 75.0, // rctiger (564) 200.0, // flash (565) 160.0, // tahoma (566) 160.0, // savanna (567) 170.0, // bandito (568) 110.0, // freiflat (569) 110.0, // streakc (570) 90.0, // kart (571) 60.0, // mower (572) 110.0, // duneride (573) 60.0, // sweeper (574) 160.0, // broadway (575) 160.0, // tornado (576) 200.0, // at400 (577) 110.0, // dft30 (578) 160.0, // huntley (579) 165.0, // stafford (580) 190.0, // bf400 (581) 160.0, // newsvan (582) 170.0, // tug (583) 120.0, // petrotr (584) 165.0, // emperor (585) 190.0, // wayfarer (586) 200.0, // euros (587) 140.0, // hotdog (588) 200.0, // club (589) 110.0, // freibox (590) 120.0, // artict3 (591) 200.0, // androm (592) 200.0, // dodo (593) 60.0, // rccam (594) 190.0, // launch (595) 200.0, // copcarla (596) 200.0, // copcarsf (597) 200.0, // copcarvg (598) 160.0, // copcarru (599) 165.0, // picador (600) 110.0, // swatvan (601) 200.0, // alpha (602) 200.0, // phoenix (603) 160.0, // glenshit (604) 165.0, // sadlshit (605) 160.0, // bagboxa (606) 160.0, // bagboxb (607) 160.0, // tugstair (608) 140.0, // boxburg (609) 160.0, // farmtr1 (610) 160.0 // utiltr1 (611) }; // names from vehicles.ide, matches up with the #defines new vehicle_name[NUM_V_MODELIDS][9] = { "landstal", "bravura", "buffalo", "linerun", "peren", "sentinel", "dumper", "firetruk", "trash", "stretch", "manana", "infernus", "voodoo", "pony", "mule", "cheetah", "ambulan", "leviathn", "moonbeam", "esperant", "taxi", "washing", "bobcat", "mrwhoop", "bfinject", "hunter", "premier", "enforcer", "securica", "banshee", "predator", "bus", "rhino", "barracks", "hotknife", "artict1", "previon", "coach", "cabbie", "stallion", "rumpo", "rcbandit", "romero", "packer", "monster", "admiral", "squalo", "seaspar", "pizzaboy", "tram", "artict2", "turismo", "speeder", "reefer", "tropic", "flatbed", "yankee", "caddy", "solair", "topfun", "skimmer", "pcj600", "faggio", "freeway", "rcbaron", "rcraider", "glendale", "oceanic", "sanchez", "sparrow", "patriot", "QUAD", "coastg", "dinghy", "hermes", "sabre", "rustler", "zr350", "walton", "regina", "comet", "bmx", "burrito", "camper", "marquis", "baggage", "dozer", "maverick", "vcnmav", "rancher", "fbiranch", "virgo", "greenwoo", "jetmax", "hotring", "sandking", "blistac", "polmav", "boxville", "benson", "mesa", "rcgoblin", "hotrina", "hotrinb", "bloodra", "rnchlure", "supergt", "elegant", "journey", "bike", "mtbike", "beagle", "cropdust", "stunt", "petro", "rdtrain", "nebula", "majestic", "buccanee", "shamal", "hydra", "fcr900", "nrg500", "copbike", "cement", "towtruck", "fortune", "cadrona", "fbitruck", "willard", "forklift", "tractor", "combine", "feltzer", "remingtn", "slamvan", "blade", "freight", "streak", "vortex", "vincent", "bullet", "clover", "sadler", "firela", "hustler", "intruder", "primo", "cargobob", "tampa", "sunrise", "merit", "utility", "nevada", "yosemite", "windsor", "monstera", "monsterb", "uranus", "jester", "sultan", "stratum", "elegy", "raindanc", "rctiger", "flash", "tahoma", "savanna", "bandito", "freiflat", "streakc", "kart", "mower", "duneride", "sweeper", "broadway", "tornado", "at400", "dft30", "huntley", "stafford", "bf400", "newsvan", "tug", "petrotr", "emperor", "wayfarer", "euros", "hotdog", "club", "freibox", "artict3", "androm", "dodo", "rccam", "launch", "copcarla", "copcarsf", "copcarvg", "copcarru", "picador", "swatvan", "alpha", "phoenix", "glenshit", "sadlshit", "bagboxa", "bagboxb", "tugstair", "boxburg", "farmtr1", "utiltr1" }; #define NUM_CITY_WEATHER 12 new city_weather[NUM_CITY_WEATHER] = { 1, 2, 7, 8, 9, 13, // 16, 17, // 42, 3, 11, 18, 5, 24 }; #define NUM_COUNTRY_WEATHER 9 new country_weather[NUM_COUNTRY_WEATHER] = { 4, 8, 1, 9, 15, // 16, 8, 20, 3, 5 }; #define NUM_DESERT_WEATHER 8 new desert_weather[NUM_DESERT_WEATHER] = { 3, 12, 14, 17, 19, 308, 320, 10 }; forward Float:DistanceFromPlayerToPlayer(id1, id2); forward PlayerMapVote(playerid,map[]); forward PlayerMapVoteHelp(playerid); forward PlayerMapVoteStatus(playerid); forward MapVoteDisplayNextMap(); forward MapVoteWinner(); forward MapVoteStore(); forward MapVoteGetVotedMap(); forward RoundTick(); forward GameModeExitFunc(); forward RegularTask(); forward PlayerCalculateSpeed(playerid); forward OnPlayerStepOnPickup(playerid, pickupid); forward GivePlayerWeapon2(playerid, pickupid); forward DisruptTrack(playerid); forward ResetVote(); forward ResetVoteOnEndGame(); #define POCKET_MONEY 500 // don't forget to change these #define NUM_PSYCHOS 4 #define NUM_TERRORISTS 8 #define NUM_BODYGUARDS 6 #define NUM_COPS 10 #define NUM_CLASSES (NUM_PSYCHOS+NUM_TERRORISTS+1+NUM_BODYGUARDS+NUM_COPS) new class_psycho1; new class_psycho2; new class_psycho3; new class_psycho4; new class_terrorist1; new class_terrorist2; new class_terrorist3; new class_terrorist4; new class_terrorist5; new class_terrorist6; new class_terrorist7; new class_terrorist_medic; new class_primeminister; new class_bodyguard1; new class_bodyguard2; new class_bodyguard3; new class_bodyguard4; new class_bodyguard5; new class_bodyguard_medic; new class_cop1; new class_cop2; new class_cop3; new class_cop4; new class_cop5; new class_cop6; new class_cop7; new class_cop8; new class_cop9; new class_cop_medic; #define INVALID_CLASS (-1) #define TEAM_PSYCHO 0 #define TEAM_TERRORIST 1 #define TEAM_PRIMEMINISTER 2 #define TEAM_BODYGUARD 3 #define TEAM_COP 4 #define NUM_TEAMS 5 #define NUM_SPAWNS 512 #define NUM_PICKUPS 100 #define NUM_OBJS 256 new class_team[NUM_CLASSES]; //new player_vis_tmp[MAX_PLAYERS]; new class_normal_vis[NUM_CLASSES]; /* THESE DO NOT CHANGE AS THE GAME PROGRESSES */ #define NUM_GAME_BOUNDARY_CORNERS 256 new Float:game_boundary_x[NUM_GAME_BOUNDARY_CORNERS]; new Float:game_boundary_y[NUM_GAME_BOUNDARY_CORNERS]; new game_boundary_count = 0; new game_boundary_enabled = 1; new Float:game_boundary_min_x; new Float:game_boundary_min_y; new Float:game_boundary_max_x; new Float:game_boundary_max_y; new Float:intel_north; new Float:intel_south; new Float:intel_east; new Float:intel_west; new safehouse_exists = 0; new Float:safehouse_x; new Float:safehouse_y; new Float:safehouse_z; new safehouse_exclusion; // radius of hydra exclusion sphere new intel_feature[256] = "the map"; new playerid_max = 0; new wardrobe_interior = 14; new Float:wardrobe_player_x = 258.4893; new Float:wardrobe_player_y = -41.4008; new Float:wardrobe_player_z = 1002.0234; new Float:wardrobe_player_orientation = 270.0; new Float:wardrobe_camera_x = 256.0815; new Float:wardrobe_camera_y = -43.0475; new Float:wardrobe_camera_z = 1004.0234; new cant_drive_vehicle[NUM_TEAMS][MAX_VEHICLES]; new cant_passenger_vehicle[NUM_TEAMS][MAX_VEHICLES]; new connection_message_block = 0; #define MAX_USERNAME 256 new transmap_nickname[MAX_PLAYERS][MAX_PLAYER_NAME]; new transmap_username[MAX_PLAYERS][MAX_USERNAME]; /* PLAYER DATABASE */ new player_class[MAX_PLAYERS]; new player_class_requested[MAX_PLAYERS]; new Float:player_last_good_x[MAX_PLAYERS]; new Float:player_last_good_y[MAX_PLAYERS]; new Float:player_last_good_z[MAX_PLAYERS]; new player_pos_faked[MAX_PLAYERS]; new Float:player_old_x[MAX_PLAYERS]; new Float:player_old_y[MAX_PLAYERS]; new Float:player_old_z[MAX_PLAYERS]; //new Float:player_pos_faked_distance[MAX_PLAYERS]; new player_reset_me[MAX_PLAYERS]; new Float:player_reset_x[MAX_PLAYERS]; new Float:player_reset_y[MAX_PLAYERS]; new Float:player_reset_z[MAX_PLAYERS]; new player_teamkills[MAX_PLAYERS]; new player_teamkill_freeze_counter[MAX_PLAYERS]; new player_vehicle_passenger[MAX_PLAYERS]; new player_vehicle_driver[MAX_PLAYERS]; new player_username[MAX_PLAYERS][MAX_USERNAME]; new player_legal_minigun[MAX_PLAYERS]; new player_legal_rocketlauncher[MAX_PLAYERS]; new player_legal_heatseeker[MAX_PLAYERS]; new player_map[MAX_PLAYERS]; new player_pickup_when[MAX_PLAYERS][NUM_PICKUPS]; new player_pickup_squatting[MAX_PLAYERS]; new player_speed_watch[MAX_PLAYERS]; new player_last_speed_warning[MAX_PLAYERS]; new Float:player_world_bounds_min_x[MAX_PLAYERS]; new Float:player_world_bounds_max_x[MAX_PLAYERS]; new Float:player_world_bounds_min_y[MAX_PLAYERS]; new Float:player_world_bounds_max_y[MAX_PLAYERS]; new player_dragging[MAX_PLAYERS]; new player_watching[MAX_PLAYERS]; new Float:player_watching_health[MAX_PLAYERS]; new Float:player_watching_armour[MAX_PLAYERS]; new Float:player_watching_angle[MAX_PLAYERS]; new player_watching_interior[MAX_PLAYERS]; new Float:player_watching_x[MAX_PLAYERS]; new Float:player_watching_y[MAX_PLAYERS]; new Float:player_watching_z[MAX_PLAYERS]; #define SPAM_LIMIT 7 // players are allowed this many repeats before they are muted #define SPAM_MUTE_LENGTH 30 // length of the mute new player_repeat[MAX_PLAYERS]; new previous_text[MAX_PLAYERS][256]; #define WEAPON_SLOTS 13 new player_weapon_data[MAX_PLAYERS][WEAPON_SLOTS]; new player_ammo_data[MAX_PLAYERS][WEAPON_SLOTS]; new pm_radar_time = 0; new Float:pm_x; new Float:pm_y; new Float:pm_z; #define NUM_PLOTS 20 new Float:player_plot_x[MAX_PLAYERS][NUM_PLOTS]; new Float:player_plot_y[MAX_PLAYERS][NUM_PLOTS]; new Float:player_plot_z[MAX_PLAYERS][NUM_PLOTS]; new player_plots[MAX_PLAYERS]; new player_muted[MAX_PLAYERS]; new player_vote_muted[MAX_PLAYERS]; new player_query_target[MAX_PLAYERS]; new player_mute_time[MAX_PLAYERS]; new player_freeze_time[MAX_PLAYERS]; new pickup_unauthorised[NUM_TEAMS][NUM_PICKUPS]; new plan_active; new plan_text[256]; #define INVALID_MAP (-1) /* PM INTEL STUFF */ new pm_old_location = -1; new ticks_since_loc_update = 100; new terrorists_in_airport = 0; new round_timer; // 1 second, does president health boost new round_timer_counter; // counts up to round_time then the round ends new round_time = 15*60; // in seconds new regular_task_timer; // 100ms, checks for things like players in the wrong cars new regular_task_counter; new obj_completed = 0; new obj_time_left; new obj_current; new obj_required = 1; new obj_was_in = 0; new pm_fresh; // 1 between spawn and entering first vehicle new pm_can_drown = 0; new pm_abandoned_health_penalty = 0; new pm_health_bonus = 0; new medic_health_bonus = 0; new pm_medic = 0; new pm_health_increase_check = 0; new Float:pm_health_increase_current; new Float:pm_health_increase_previous = 100.0; new vote_timer; new vote_victim = INVALID_PLAYER_ID; new vote_initiator = INVALID_PLAYER_ID; new vote_reason[256]; new votes_left = 0; new player_already_voted[MAX_PLAYERS]; new distance_display_interval = 0; new distance_display = 0; new Text:timer; new timer_string[5]; // returns 1 if %2 is between %1 and %3 #define BETWEEN(%1,%2,%3) ((%1<=%2 && %2<=%3) || (%3<=%2 && %2<=%1)) // returns 1 if x,y crosses the line on its way to -infinity,y LeftIntersect(Float:x, Float:y, Float:x1, Float:y1, Float:x2, Float:y2) { if (!BETWEEN(y1,y,y2)) return 0; // x co-ord of point on the line, at height y new Float:point = (y - y1) * (x2 - x1) / (y2 - y1) + x1; return x > point; } IsCoordInPolygon (Float:x, Float:y, Float:xs[], Float:ys[], num_edges = sizeof xs) { new c = 0; for (new i=0, j=num_edges-1 ; i=50) { printf("Unfortunately, the SA:MP developers are completely incompetent strval(\"%s\")",str); return 0; } return strval(str); } public Float:DistanceFromPlayerToPlayer(id1, id2) { new Float:px, Float:py, Float:pz; GetPlayerPos(id1,px,py,pz); new Float:mx, Float:my, Float:mz; GetPlayerPos(id2,mx,my,mz); return floatsqroot(floatpower(px-mx,2)+floatpower(py-my,2)+floatpower(pz-mz,2)); } /* Float:atan(Float:y) { for (new Float:a = 0 ; a<=90 ; a++) if (floattan(a,degrees)>=y) return a; return 90.0; }*/ // needed to trick pawncc zero() { return 0; } main() { } CarCol() { return random(126); } new player_controllable[MAX_PLAYERS]; SetPlayerControllable(playerid,v) { player_controllable[playerid] = v; TogglePlayerControllable(playerid,v); } new pickup_counter = 0; new pickup_id[NUM_PICKUPS]; new pickup_weaponid[NUM_PICKUPS]; new pickup_ammo[NUM_PICKUPS]; new Float: pickup_x[NUM_PICKUPS]; new Float: pickup_y[NUM_PICKUPS]; new Float: pickup_z[NUM_PICKUPS]; new pickup_respawn_time[NUM_PICKUPS]; new pickup_synced[NUM_PICKUPS]; new pickup_last_used_by[NUM_PICKUPS]; #define WP_NO_RESPAWN 0 #define WP_UNSYNCED 0 #define WP_SYNCED 1 AddWeaponPickup(pickupid, weaponid, ammo, Float:x, Float:y, Float:z, respawn_time=30, synced=WP_UNSYNCED) { if (pickup_counter>=NUM_PICKUPS) { printf("Too many weapon pickups, pickup ignored %d,%d,%d,%f,%f,%f!",pickupid,weaponid,ammo,x,y,z); return 0; } pickup_id[pickup_counter] = pickupid; pickup_weaponid[pickup_counter] = weaponid; pickup_ammo[pickup_counter] = ammo; pickup_x[pickup_counter] = x; pickup_y[pickup_counter] = y; pickup_z[pickup_counter] = z; pickup_respawn_time[pickup_counter] = respawn_time; pickup_synced[pickup_counter] = synced; pickup_last_used_by[pickup_counter] = INVALID_PLAYER_ID; new pickuptype = 1; //respawn_time ? 1 : 19; // unfortunately pickuptype 19 doesnt respawn properly when you die, so we cant use it AddStaticPickup(pickupid, pickuptype, x, y, z); // return pickup_counter++ doesn't work -- suspect compiler bug new retval = pickup_counter++; return retval; } new vehicle_counter = 1; new vehicle_modelid[MAX_VEHICLES]; new Float: vehicle_spawn_x[MAX_VEHICLES]; new Float: vehicle_spawn_y[MAX_VEHICLES]; new Float: vehicle_spawn_z[MAX_VEHICLES]; new Float: vehicle_z_angle[MAX_VEHICLES]; new vehicle_colour1[MAX_VEHICLES]; new vehicle_colour2[MAX_VEHICLES]; new vehicle_safehouse_excluded[MAX_VEHICLES]; AddStaticVehicle2(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, safehouse_excluded = 0) { if (vehicle_counter>MAX_VEHICLES) { printf("Too many vehicle spawns, ignoring vehicle %d,%f,%f,%f,%f,%d,%d!",modelid,spawn_x,spawn_y,spawn_z,z_angle,color1,color2); return 0; } vehicle_modelid[vehicle_counter] = modelid; vehicle_spawn_x[vehicle_counter] = spawn_x; vehicle_spawn_y[vehicle_counter] = spawn_y; vehicle_spawn_z[vehicle_counter] = spawn_z; vehicle_z_angle[vehicle_counter] = z_angle; vehicle_colour1[vehicle_counter] = color1; vehicle_colour2[vehicle_counter] = color2; vehicle_safehouse_excluded[vehicle_counter] = safehouse_excluded; AddStaticVehicle(modelid, spawn_x, spawn_y, spawn_z, z_angle, color1, color2); // return vehicle_counter++ doesn't work -- suspect compiler bug new retval = vehicle_counter++; return retval; } new obj_counter = 0; new Float:obj_x[NUM_OBJS]; new Float:obj_y[NUM_OBJS]; new Float:obj_z[NUM_OBJS]; new Float:obj_size[NUM_OBJS]; new obj_time[NUM_OBJS]; new obj_desc[NUM_OBJS][256]; // objectives as invented by spark for LV AddObjective(Float:x, Float:y, Float:z, desc[], Float:size, time = 30) { if (obj_counter>=NUM_OBJS) { printf("Too many objectives! Ignoring (%f,%f,%f) %f %d.",x,y,z,size,time); return 0; } obj_x[obj_counter] = x; obj_y[obj_counter] = y; obj_z[obj_counter] = z; obj_size[obj_counter] = size; obj_time[obj_counter] = time; //printf("Objective[%d] at (%f,%f,%f) (%f) %d",obj_counter,obj_x[obj_counter],obj_y[obj_counter],obj_z[obj_counter],obj_size[obj_counter],obj_time[obj_counter]); format(obj_desc[obj_counter],sizeof obj_desc[],"%s",desc); new retval = obj_counter++; return retval; } #define NUM_TASKS 10 #define TASK_HP_PENALTY 0 #define TASK_WEAPONS 1 #define TASK_RADAR 2 #define TASK_KEYS 3 #define TASK_ACCELERATE_TIME 4 #define TASK_MINI 5 #define TASK_MEDIC 6 #define TASK_SAFEHOUSE 7 #define TASK_HP_BONUS 8 new task_counter = 0; new Float:task_x[NUM_TASKS]; new Float:task_y[NUM_TASKS]; new Float:task_z[NUM_TASKS]; new Float:task_size[NUM_TASKS]; new task_type[NUM_TASKS]; new task_time[NUM_TASKS]; // tasks as invented by r3mp for countryside AddTask(Float:x, Float:y, Float:z, Float:size, type, time) { if (task_counter>=NUM_TASKS) { printf("Too many tasks! Ignoring (%f,%f,%f) %f %d %d.",x,y,z,size,type,time); return 0; } task_x[task_counter] = x; task_y[task_counter] = y; task_z[task_counter] = z; task_size[task_counter] = size; task_type[task_counter] = type; task_time[task_counter] = time; new retval = task_counter++; return retval; } #define NUM_BANNED 25 new banned_cuboid_counter = 0; new Float:banned_cuboid_max_x[NUM_BANNED]; new Float:banned_cuboid_min_x[NUM_BANNED]; new Float:banned_cuboid_max_y[NUM_BANNED]; new Float:banned_cuboid_min_y[NUM_BANNED]; new Float:banned_cuboid_max_z[NUM_BANNED]; new Float:banned_cuboid_min_z[NUM_BANNED]; new Float:banned_cuboid_tele_x[NUM_BANNED]; new Float:banned_cuboid_tele_y[NUM_BANNED]; new Float:banned_cuboid_tele_z[NUM_BANNED]; new Float:banned_cuboid_tele_a[NUM_BANNED]; new Float:banned_cuboid_vehicles[NUM_BANNED]; new banned_cuboid_tele_interior[NUM_BANNED]; new banned_cuboid_message[NUM_BANNED][256]; AddBannedCuboid(Float:max_x, Float:min_x, Float:max_y, Float:min_y, Float:max_z, Float:min_z, message[], Float:tele_x, Float:tele_y, Float:tele_z, Float:tele_a, vehicles, interior) { if (banned_cuboid_counter>=NUM_BANNED) { printf("Too many banned cuboids! Ignoring (%f,%f,%f,%f,%f,%f)",max_x,min_x,max_y,min_y,max_z,min_z); return 0; } banned_cuboid_max_x[banned_cuboid_counter] = max_x; banned_cuboid_min_x[banned_cuboid_counter] = min_x; banned_cuboid_max_y[banned_cuboid_counter] = max_y; banned_cuboid_min_y[banned_cuboid_counter] = min_y; banned_cuboid_max_z[banned_cuboid_counter] = max_z; banned_cuboid_min_z[banned_cuboid_counter] = min_z; banned_cuboid_tele_x[banned_cuboid_counter] = tele_x; banned_cuboid_tele_y[banned_cuboid_counter] = tele_y; banned_cuboid_tele_z[banned_cuboid_counter] = tele_z; banned_cuboid_tele_a[banned_cuboid_counter] = tele_a; banned_cuboid_vehicles[banned_cuboid_counter] = vehicles; banned_cuboid_tele_interior[banned_cuboid_counter] = interior; format(banned_cuboid_message[banned_cuboid_counter],sizeof banned_cuboid_message[],"%s",message); new retval = banned_cuboid_counter++; return retval; } AddGameBoundaryCorner(Float:x, Float:y) { if (game_boundary_count>=NUM_GAME_BOUNDARY_CORNERS) { printf("Too many corners! Ignoring (%f,%f)",x,y); return 0; } game_boundary_x[game_boundary_count] = x; game_boundary_y[game_boundary_count] = y; new retval = game_boundary_count++; return retval; } #define NUM_CAMERA 10 #define INVALID_CAMERA -1 new cam_counter = 0; new player_cam_active[MAX_PLAYERS]; new Float:cam_pickup_x[NUM_CAMERA]; new Float:cam_pickup_y[NUM_CAMERA]; new Float:cam_pickup_z[NUM_CAMERA]; new Float:cam_mount_x[NUM_CAMERA]; // camera mounted here new Float:cam_mount_y[NUM_CAMERA]; new Float:cam_mount_z[NUM_CAMERA]; new Float:cam_look_x[NUM_CAMERA]; // pointing here new Float:cam_look_y[NUM_CAMERA]; new Float:cam_look_z[NUM_CAMERA]; new Float:cam_player_busy_x[NUM_CAMERA]; // move player to here while they're watching the camera new Float:cam_player_busy_y[NUM_CAMERA]; new Float:cam_player_busy_z[NUM_CAMERA]; new cam_view_message[NUM_CAMERA][256]; AddSecurityCamera(Float:x, Float:y, Float:z, message[], Float:cp_x, Float:cp_y, Float:cp_z, Float:cl_x, Float:cl_y, Float:cl_z, Float:ppos_x, Float:ppos_y, Float:ppos_z) { if (cam_counter>=NUM_CAMERA) { printf("Too many Camera views! Ignoring (%f,%f,%f)",x,y,z); return 0; } cam_player_busy_x[cam_counter] = ppos_x; cam_player_busy_y[cam_counter] = ppos_y; cam_player_busy_z[cam_counter] = ppos_z; cam_pickup_x[cam_counter] = x; cam_pickup_y[cam_counter] = y; cam_pickup_z[cam_counter] = z; cam_mount_x[cam_counter] = cp_x; cam_mount_y[cam_counter] = cp_y; cam_mount_z[cam_counter] = cp_z; cam_look_x[cam_counter] = cl_x; cam_look_y[cam_counter] = cl_y; cam_look_z[cam_counter] = cl_z; AddStaticPickup(PICKUP_SECURITY_CAMERA,1,x,y,z); format(cam_view_message[cam_counter],sizeof cam_view_message[],"%s",message); new retval = cam_counter++; return retval; } new team_spawn_counter[NUM_TEAMS]; new Float:team_spawn_x[NUM_TEAMS][NUM_SPAWNS]; new Float:team_spawn_y[NUM_TEAMS][NUM_SPAWNS]; new Float:team_spawn_z[NUM_TEAMS][NUM_SPAWNS]; new Float:team_spawn_a[NUM_TEAMS][NUM_SPAWNS]; new team_spawn_interior[NUM_TEAMS][NUM_SPAWNS]; AddTeamSpawn(team, Float:x, Float:y, Float:z, Float:a, interior=0) { if (team_spawn_counter[team]>=NUM_SPAWNS) { printf("Too many player spawns (team %d)!",team); return 0; } //printf("Spawn (team %d) at (%f,%f,%f) (%f)",team,x,y,z,a); team_spawn_x[team][team_spawn_counter[team]] = x; team_spawn_y[team][team_spawn_counter[team]] = y; team_spawn_z[team][team_spawn_counter[team]] = z; team_spawn_a[team][team_spawn_counter[team]] = a; team_spawn_interior[team][team_spawn_counter[team]] = interior; new retval = team_spawn_counter[team]++; return retval; } AddTeamLineSpawn(team, Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float: z2, Float:separation = 1.0, interior=0) { new Float:length = floatsqroot(floatpower(x2-x1,2)+floatpower(y2-y1,2)+floatpower(z2-z1,2)); if (length<1.0) { printf("AddTeamLineSpawn: This line is too short (%f,%f,%f) -> (%f,%f,%f)",x1,y1,z1,x2,y2,z2); return; } new Float:xv = (x2-x1)/length; new Float:yv = (y2-y1)/length; new Float:zv = (z2-z1)/length; new Float: face_angle; new Float: grad = floatabs(yv/xv); if (xv>=0 && yv>=0) { face_angle = 90-atan(grad); } else if (xv>=0 && yv<0) { face_angle = 90+atan(grad); } else if (xv<0 && yv<0) { face_angle = 270-atan(grad); } else if (xv<0 && yv>=0) { face_angle = 270+atan(grad); } face_angle = face_angle - 90.0; if (face_angle >= 360.0) face_angle -= 360.0; for (new Float:i=0 ; i <= length ; i+=separation) { AddTeamSpawn(team, x1+i*xv, y1+i*yv, z1+i*zv,360-face_angle, interior); } } new class_counter = 0; new class_modelid[MAX_PLAYERS]; new class_weapon1[MAX_PLAYERS]; new class_weapon1_ammo[MAX_PLAYERS]; new class_weapon2[MAX_PLAYERS]; new class_weapon2_ammo[MAX_PLAYERS]; new class_weapon3[MAX_PLAYERS]; new class_weapon3_ammo[MAX_PLAYERS]; new class_initial_hp[MAX_PLAYERS]; AddPlayerClass2(modelid, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo, initial_hp = 100) { class_modelid[class_counter] = modelid; class_weapon1[class_counter] = weapon1; class_weapon1_ammo[class_counter] = weapon1_ammo; class_weapon2[class_counter] = weapon2; class_weapon2_ammo[class_counter] = weapon2_ammo; class_weapon3[class_counter] = weapon3; class_weapon3_ammo[class_counter] = weapon3_ammo; class_initial_hp[class_counter] = initial_hp; // AddPlayerClass(modelid, game_boundary_min_x+(game_boundary_max_x-game_boundary_min_x)/2,game_boundary_min_y+(game_boundary_max_y-game_boundary_min_y)/2,0,0, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); AddPlayerClass(modelid, 0,0,0,0, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo); new retval = class_counter++; return retval; } #define NUM_MAPS 12 public PlayerMapVote(playerid, map[]) { if (streq(map,"ls_hydra")) { player_map[playerid] = 0; } else if (streq(map,"sf")) { player_map[playerid] = 1; } else if (streq(map,"desert") || streq(map,"d")) { player_map[playerid] = 2; } else if (streq(map,"area51") || streq(map,"a51")) { player_map[playerid] = 3; } else if (streq(map,"lv_obj")) { player_map[playerid] = 4; } else if (streq(map,"air")) { player_map[playerid] = 5; } else if (streq(map,"chiliad") || streq(map,"chilliad") || streq(map,"chill") || streq(map,"chil")) { player_map[playerid] = 6; } else if (streq(map,"country") || streq(map,"cs")) { player_map[playerid] = 7; } else if (streq(map,"ls")) { player_map[playerid] = 8; } else if (streq(map,"lv")) { player_map[playerid] = 9; } else if (streq(map,"factory") || streq(map,"fac")) { player_map[playerid] = 10; } else if (streq(map,"bayside") || streq(map,"bay")) { player_map[playerid] = 11; } else PlayerMapVoteHelp(playerid); PlayerMapVoteStatus(playerid); } public PlayerMapVoteHelp(playerid) { SendClientMessage(playerid,COLOUR_PERSONAL,"Usage: /mapvote ls_hydra|sf|desert|a51|lv_obj|air|chiliad|country|ls|lv|fac|bayside"); } public PlayerMapVoteStatus(playerid) { new score[NUM_MAPS]; for (new i=0 ; imax_score) max_score = score[i]; } new map = INVALID_MAP; while (map==INVALID_MAP) { new proposal = random(sizeof score); if (score[proposal] == max_score) map = proposal; //printf("score={%d,%d,%d} max_score=%d map=%d proposal=%d",score[0],score[1],score[2],max_score,map,proposal); } if (max_score>0) { log_printf("Mapvote: %d",map); } return map; } public MapVoteStore() { new filename[256] = "mapvote.txt"; new File:mapvotefile = fopen(filename, io_write); if (!mapvotefile) { printf("ERROR: writing to mapvote file"); return; } new line[256]; format(line,sizeof line,"%d",MapVoteWinner()); fwrite(mapvotefile, line); fclose(mapvotefile); } public MapVoteGetVotedMap() { new filename[256] = "mapvote.txt"; new File:mapvotefile = fopen(filename, io_read); if (!mapvotefile) { printf("ERROR: reading from mapvote file"); return MapVoteWinner(); // a random map since no votes are present when the map starts } new line[256]; fread(mapvotefile, line); fclose(mapvotefile); return strvalfixed(line); } GetTextFromTeam(str[80], team) { switch(team) { case TEAM_PSYCHO: str = "a psychopath"; case TEAM_TERRORIST: str = "a terrorist"; case TEAM_PRIMEMINISTER: str = "the Prime Minister"; case TEAM_BODYGUARD: str = "a bodyguard"; case TEAM_COP:str = "a cop"; } return 1; } TeamColour(team) { switch(team) { case TEAM_PSYCHO: return 0xFF7F0050; case TEAM_TERRORIST: return 0xFF00AF60; case TEAM_PRIMEMINISTER: return 0xFFFF40FF & (pm_radar_time==0 ? 0xFFFFFFFF : 0xFFFFFF00); case TEAM_BODYGUARD: return 0x00800048; case TEAM_COP: return 0x5050CF50; } return 0x000000FF; } ClassColour(class) { if (class==INVALID_CLASS) return 0x00000000; new colour = 0x000000FF; if (class==class_terrorist_medic) { colour = 0xFF40CF60; } else if (class==class_bodyguard_medic) { colour = 0x50B05048; } else if (class==class_cop_medic) { colour = 0x8080EF50; } else { colour = TeamColour(class_team[class]); } colour = colour & (class_normal_vis[class] ? 0xFFFFFFFF : 0xFFFFFF00); return colour; } ExplainRole(playerid) { if (player_class[playerid]==INVALID_CLASS) return; new team = class_team[player_class[playerid]]; switch(team) { case TEAM_PSYCHO: { SendClientMessage(playerid,COLOUR_PERSONAL,"Nobody wants to be your friend. So trust noone. Kill them all."); } case TEAM_TERRORIST: { SendClientMessage(playerid,COLOUR_PERSONAL,"Your role is to try and kill the Prime Minister(yellow) before the timer runs out."); SendClientMessage(playerid,COLOUR_PERSONAL,"You must work with the other terrorists(pink) as a team. You must avoid the cops(blue)"); SendClientMessage(playerid,COLOUR_PERSONAL,"as they will hunt you. Beware of psychopaths(orange), they will kill anyone."); if (obj_counter>0) { SendClientMessage(playerid,COLOUR_PERSONAL,"The Prime Minister and his bodyguards will be visiting areas of the city. These"); SendClientMessage(playerid,COLOUR_PERSONAL,"are red on the radar. You should try and ambush him on his way there, siege him"); SendClientMessage(playerid,COLOUR_PERSONAL,"when he is there, and drive him away. If the Prime Minister achieves his objectives"); SendClientMessage(playerid,COLOUR_PERSONAL,"then you lose the game."); } } case TEAM_PRIMEMINISTER: { if (obj_counter==0) { SendClientMessage(playerid,COLOUR_PERSONAL,"Your role is to avoid being killed by terrorists(pink) or psychopaths(orange)"); SendClientMessage(playerid,COLOUR_PERSONAL,"until the timer runs out. Use /time to find out how long there is left."); } else { SendClientMessage(playerid,COLOUR_PERSONAL,"Your role is to visit and each of the objectives in order. You must defend the objective"); SendClientMessage(playerid,COLOUR_PERSONAL,"for the specified time before the next objective will be revealed. Terrorists(pink) and"); SendClientMessage(playerid,COLOUR_PERSONAL,"psychopaths(orange) will try to kill you. If you die, the terrorists win."); SendClientMessage(playerid,COLOUR_PERSONAL,"THERE IS NO TIME LIMIT FOR THIS GAME!"); } SendClientMessage(playerid,COLOUR_PERSONAL,"You must work with your loyal bodyguards(green), they will protect you."); SendClientMessage(playerid,COLOUR_PERSONAL,"You are to co-operate with the local police(blue), who will hunt the terrorists."); } case TEAM_BODYGUARD: { SendClientMessage(playerid,COLOUR_PERSONAL,"Your duty is to stay with the Prime Minister(yellow) and protect him from harm."); SendClientMessage(playerid,COLOUR_PERSONAL,"Terrorists(pink) will soon try and murder him. Also beware of psychopaths(orange)."); SendClientMessage(playerid,COLOUR_PERSONAL,"You are to co-operate with the local police(blue), who will hunt the terrorists."); if (obj_counter>0) { SendClientMessage(playerid,COLOUR_PERSONAL,"The Prime Minister will be visiting areas of the city. These are red on the radar."); SendClientMessage(playerid,COLOUR_PERSONAL,"The terrorists know where he needs to go, so you must prevent them from ambusing or"); SendClientMessage(playerid,COLOUR_PERSONAL,"successfully sieging the Prime Minister. If he is killed, you lose the game."); } } case TEAM_COP: { SendClientMessage(playerid,COLOUR_PERSONAL,"Your orders are to kill the terrorists(pink) without harming the bodyguards(green) or"); SendClientMessage(playerid,COLOUR_PERSONAL,"the Prime Minister(yellow). Also beware of psychopaths(orange). Protect the Prime Minister!"); if (obj_counter>0) { SendClientMessage(playerid,COLOUR_PERSONAL,"The Prime Minister and his bodyguards will be visiting areas of the city. These"); SendClientMessage(playerid,COLOUR_PERSONAL,"are red on the radar. You should focus your efforts there, clean out the terrorists"); SendClientMessage(playerid,COLOUR_PERSONAL,"so that the prime minister can go in. Then defend the area until he is done."); } } } if (player_class[playerid]==class_terrorist_medic || player_class[playerid]==class_bodyguard_medic || player_class[playerid]==class_cop_medic) { SendClientMessage(playerid,COLOUR_PERSONAL,"You are a medic, you can heal people with /heal!"); } if (safehouse_exists) { SendClientMessage(playerid,COLOUR_PERSONAL,"Only terrorists and bodyguards may fly the hydra or seasparrow."); SendClientMessage(playerid,COLOUR_PERSONAL,"The Prime Minister's safehouse (red) is a hydra/seasparrow free zone."); } } LosSantosVehicles() { AddStaticVehicle2(V_STRETCH,1272.0273,-2052.5105,58.9108,268.6577,1,1); // pm limo AddStaticVehicle2(V_ENFORCER,1248.0804,-2041.6018,59.8980,269.1785,0,1); // pm swat van south AddStaticVehicle2(V_ENFORCER,1248.4545,-2029.4104,59.8854,269.3774,0,1); // pm swat van middle AddStaticVehicle2(V_ENFORCER,1247.5862,-2016.4684,59.9106,270.2272,0,1); // pm swat van north AddStaticVehicle2(V_COPCARLA,1258.5917,-2052.1367,59.2043,267.4406,0,1); // pm police car behind limo AddStaticVehicle2(V_COPCARLA,1283.4066,-2052.5417,58.5057,267.8666,0,1); // pm police car infront of limo AddStaticVehicle2(V_NEWSVAN,1307.8915,-2061.7043,58.2399,269.3047,CarCol(),CarCol()); // pm news van AddStaticVehicle2(V_NEWSVAN,1323.5018,-2061.6367,57.7726,270.4650,CarCol(),CarCol()); // pm news van AddStaticVehicle2(V_NEWSVAN,1275,-2013,59.1134,89.3634,CarCol(),CarCol()); // pm newsvan AddStaticVehicle2(V_FBIRANCH,1275,-2023,59.1450,88.3334,0,0); // pm fbiranch north AddStaticVehicle2(V_FBIRANCH,1275,-2028,59.1616,88.3310,0,0); // pm fbiranch south AddStaticVehicle2(V_STRETCH,1330.2595,-626.7542,108.9349,289.3475,0,0); // safe house limo AddStaticVehicle2(V_FBIRANCH,1339.3717,-623.1824,109.2619,289.7454,0,0); // safe house escort before limo AddStaticVehicle2(V_FBIRANCH,1320.3932,-630.0724,109.2656,286.9799,0,0); // safe house escort behind limo AddStaticVehicle2(V_COPCARLA,1356.0096,-610.3824,108.8543,105.9892,0,1); // safe house cop car north AddStaticVehicle2(V_COPCARLA,1357.4025,-614.4976,108.9018,106.5213,0,1); // safe house cop car middle AddStaticVehicle2(V_COPCARLA,1358.7394,-618.5698,108.9018,105.6476,0,1); // safe house cop car south AddStaticVehicle2(V_COPBIKE,1360.5815,-622.1605,108.7038,106.0725,0,0); // safe house cop bike next to cop cars AddStaticVehicle2(V_COPBIKE,1555,-1609,12.9486,180,0,0); // police station bike 1 (north) AddStaticVehicle2(V_COPBIKE,1560,-1609,12.9486,180,0,0); // police station bike 2 AddStaticVehicle2(V_COPBIKE,1565,-1609,12.9474,180,0,0); // police station bike 3 AddStaticVehicle2(V_COPBIKE,1570,-1609,12.9557,180,0,0); // police station bike 4 AddStaticVehicle2(V_COPBIKE,1575,-1609,12.9540,180,0,0); // police station bike 5 (south) AddStaticVehicle2(V_ENFORCER,1601.7515,-1623.7999,13.6164,91.0440,0,1); // police station swat van 2 AddStaticVehicle2(V_ENFORCER,1601.8759,-1629.7356,13.6197,88.7999,0,1); // police station swat van 1 AddStaticVehicle2(V_SWATVAN,1534.5927,-1645.1713,5.6494,179.6766,1,1); // police station swat tank 1 (corner) AddStaticVehicle2(V_SWATVAN,1545.3734,-1655.2261,5.6494,270.4727,1,1); // police station swat tank 2 AddStaticVehicle2(V_COPCARLA,1544.4673,-1667.9943,5.6599,269.0485,0,1); // police station cop car indoors AddStaticVehicle2(V_COPCARLA,1529.6506,-1683.7926,5.6578,91.2372,0,1); // police station cop car indoors AddStaticVehicle2(V_COPCARLA,1544.2897,-1684.2386,5.6589,90.3812,0,1); // police station cop car indoors AddStaticVehicle2(V_COPCARLA,1558.9119,-1709.6991,5.6586,181.0041,0,1); // police station cop car indoors AddStaticVehicle2(V_COPCARLA,1591.4161,-1711.0702,5.6598,0.3255,0,1); // police station cop car indoors AddStaticVehicle2(V_COPCARLA,1601.5614,-1700.2463,5.6598,89.8913,0,1); // police station cop car indoors AddStaticVehicle2(V_COPCARRU,1585.3955,-1671.6195,6.0846,269.2602,0,1); // police station ranger AddStaticVehicle2(V_COPCARRU,1584.6819,-1667.6851,6.0791,269.2272,0,1); // police station ranger AddStaticVehicle2(V_COPCARRU,1601.9421,-1684.0054,6.0797,89.9971,0,1); // police station ranger AddStaticVehicle2(V_COPCARRU,1602.3267,-1691.9391,6.1032,91.0921,0,1); // police station ranger AddStaticVehicle2(V_COPCARRU,1603.4213,-1614.9706,13.6899,86.7397,0,1); // police station ranger outdoors AddStaticVehicle2(V_COPCARRU,1603.1095,-1604.8138,13.6777,89.8504,0,1); // police station ranger outdoors AddStaticVehicle2(V_AMBULAN,2021.3857,-1413.9185,16.9922,266.4618,-1,-1); //Ambulance AddStaticVehicle2(V_AMBULAN,2032.9591,-1433.4801,17.2008,181.1191,-1,-1); //Ambulance /* OLD TERRORIST SPAWN AddStaticVehicle2(V_PCJ600,1767.4407,-1689.3885,12.9402,180.4357,CarCol(),CarCol()); // terrorist bike 1 AddStaticVehicle2(V_PCJ600,1771.0730,-1688.7708,13.0141,181.8331,CarCol(),CarCol()); // terrorists bike 2 AddStaticVehicle2(V_HUNTLEY,1808.7601,-1715.5109,13.4829,180.1130,CarCol(),CarCol()); // terrorists huntley AddStaticVehicle2(V_HUNTLEY,1808.7458,-1707.0656,13.4865,180.0818,CarCol(),CarCol()); // terrorists huntley north AddStaticVehicle2(V_WAYFARER,1774.7974,-1688.7113,12.9956,176.7240,CarCol(),CarCol()); // terrorists bike 3 AddStaticVehicle2(V_WAYFARER,1778.2140,-1688.9255,12.9975,181.9484,CarCol(),CarCol()); // terrorists bike 4 AddStaticVehicle2(V_BENSON,1795.7860,-1691.3322,13.4844,181.4520,CarCol(),CarCol()); // terrorists van AddStaticVehicle2(V_BENSON,1805.5522,-1690.5121,13.5993,152.4614,CarCol(),CarCol()); // terrorists van corner AddStaticVehicle2(V_RANCHER,1766.9115,-1695.8004,13.5906,91.9755,CarCol(),CarCol()); // terrorists 4x4 AddStaticVehicle2(V_BURRITO,1767.4751,-1704.2063,13.6066,91.5783,CarCol(),CarCol()); // terrorists small van AddStaticVehicle2(V_GLENSHIT,1786.7887,-1689.5065,13.1861,89.9475,CarCol(),CarCol()); // terrorists old car AddStaticVehicle2(V_HUNTLEY,1808.7384,-1698.5176,13.4862,180.0169,-1,-1); // AddStaticVehicle2(V_HUNTLEY,1800.0474,-1690.5969,13.4410,178.3961,-1,-1); // AddStaticVehicle2(V_HUNTLEY,1787.1389,-1692.7755,13.3976,89.3455,-1,-1); // AddStaticVehicle2(V_PCJ600,1769.4333,-1688.9299,13.0055,184.8206,-1,-1); // AddStaticVehicle2(V_PCJ600,1773.4126,-1689.1147,13.0097,179.5487,-1,-1); // AddStaticVehicle2(V_WAYFARER,1776.5952,-1689.1486,12.9473,174.5531,-1,-1); // AddStaticVehicle2(V_WAYFARER,1779.6062,-1689.1764,12.9508,180.7781,-1,-1); // AddStaticVehicle2(V_WAYFARER,1781.3486,-1689.3826,12.9524,171.4159,-1,-1); // AddStaticVehicle2(V_BURRITO,1754.5945,-1712.3647,13.5771,180.9772,-1,-1); // AddStaticVehicle2(V_BURRITO,1735.4823,-1683.4484,13.6649,89.8953,-1,-1); // */ // new terrorist spawn AddStaticVehicle2(V_HUNTLEY,2783.7915,-1602.6122,11.0649,268.0349,-1,-1); // t big AddStaticVehicle2(V_HUNTLEY,2776.3411,-1602.3579,11.0681,268.0318,-1,-1); // t big AddStaticVehicle2(V_BENSON,2793.6848,-1623.7864,10.8578,346.6386,-1,-1); // benson AddStaticVehicle2(V_BURRITO,2781.8101,-1626.0529,10.8616,89.2409,-1,-1); // burrito AddStaticVehicle2(V_ELEGY,2821.4878,-1562.6649,10.8606,269.0218,-1,-1); // elegy AddStaticVehicle2(V_GLENSHIT,2822.1040,-1557.3737,10.8510,270.5379,-1,-1); // glenshit AddStaticVehicle2(V_RANCHER,2821.5530,-1541.4941,10.8506,1.9334,-1,-1); // rancher AddStaticVehicle2(V_RANCHER,2806.9922,-1539.7356,10.8584,1.2723,-1,-1); // rancher AddStaticVehicle2(V_BENSON,2796.7432,-1541.4360,10.8521,13.7492,-1,-1); // benson AddStaticVehicle2(V_WAYFARER,2796.6592,-1579,10.8568,91.9738,-1,-1); // wayfarer AddStaticVehicle2(V_WAYFARER,2796.6592,-1577,10.8568,91.9738,-1,-1); // wayfarer AddStaticVehicle2(V_WAYFARER,2796.6592,-1575,10.8568,91.9738,-1,-1); // wayfarer AddStaticVehicle2(V_WAYFARER,2796.6592,-1573,10.8568,91.9738,-1,-1); // wayfarer AddStaticVehicle2(V_WAYFARER,2796.6592,-1571,10.8568,91.9738,-1,-1); // wayfarer AddStaticVehicle2(V_PCJ600,2796.6592,-1568,10.8568,91.9738,-1,-1); AddStaticVehicle2(V_PCJ600,2796.6592,-1566,10.8568,91.9738,-1,-1); AddStaticVehicle2(V_PCJ600,2796.6592,-1564,10.8568,91.9738,-1,-1); AddStaticVehicle2(V_PCJ600,2796.6592,-1562,10.8568,91.9738,-1,-1); AddStaticVehicle2(V_STRATUM,2822.2832,-1553.0403,10.5804,269.5517,-1,-1); // stratum AddStaticVehicle2(V_ZR350,1465.7742,-899.0321,54.8603,3.2162,CarCol(),CarCol()); // posh house 1 AddStaticVehicle2(V_CHEETAH,1527.2067,-886.2890,61.1146,254.2985,CarCol(),CarCol()); // roof top AddStaticVehicle2(V_BULLET,1535.1796,-841.1790,64.8940,94.3109,CarCol(),CarCol()); // posh 3 AddStaticVehicle2(V_SUPERGT,1528.4613,-811.7554,71.8663,89.1012,CarCol(),CarCol()); // posh 4 AddStaticVehicle2(V_CHEETAH,1025.5624,-800.0936,101.8734,20.1116,CarCol(),CarCol()); // posh AddStaticVehicle2(V_ZR350,920.5785,-786.9205,114.3464,68.2807,CarCol(),CarCol()); // posh AddStaticVehicle2(V_BULLET,855.9669,-815.3113,87.7593,19.6388,CarCol(),CarCol()); // posh AddStaticVehicle2(V_BULLET,684.5640,-1074.3420,49.5645,60.4335,CarCol(),CarCol()); // posh AddStaticVehicle2(V_CHEETAH,404.5968,-1155.5228,77.6275,143.8123,CarCol(),CarCol()); // posh AddStaticVehicle2(V_BULLET,289.7317,-1167.9216,80.9028,220.8520,CarCol(),CarCol()); // very posh AddStaticVehicle2(V_BULLET,292.9161,-1162.0803,80.9022,220.1603,CarCol(),CarCol()); // very posh AddStaticVehicle2(V_SUPERGT,288.0584,-1327.9247,53.5295,218.3855,CarCol(),CarCol()); // posh AddStaticVehicle2(V_BULLET,1241.8268,-749.5003,94.2435,18.4917,CarCol(),CarCol()); // AddStaticVehicle2(V_CHEETAH,872.4854,-872.3334,77.2855,200.1391,CarCol(),CarCol()); // posh AddStaticVehicle2(V_ZR350,833.5978,-926.3884,54.9567,246.7931,CarCol(),CarCol()); // posh AddStaticVehicle2(V_ZR350,842.0680,-896.1290,68.4778,232.5096,CarCol(),CarCol()); // posh AddStaticVehicle2(V_SUPERGT,1086.8040,-637.7476,112.9547,5.5657,CarCol(),CarCol()); // posh AddStaticVehicle2(V_HUNTLEY,1528.2061,-800.0825,73.0617,90.4437,CarCol(),CarCol()); // posh 4b (V_RANCHER) AddStaticVehicle2(V_NRG500,1018.2570,-777.7994,102.6511,90.7938,CarCol(),CarCol()); // posh bike AddStaticVehicle2(V_HUNTLEY,848.0241,-818.4172,87.0807,22.0264,CarCol(),CarCol()); // posh rancher AddStaticVehicle2(V_NRG500,718.9101,-1001.8113,52.4130,148.8447,CarCol(),CarCol()); // posh bike AddStaticVehicle2(V_NRG500,278.7959,-1257.6844,73.9157,215.0338,CarCol(),CarCol()); // posh bike AddStaticVehicle2(V_PCJ600,337.6167,-1308.5352,54.2161,209.8673,CarCol(),CarCol()); // sanchez AddStaticVehicle2(V_PCJ600,346.4070,-1300.6411,54.2168,206.8296,CarCol(),CarCol()); // sanchez AddStaticVehicle2(V_PATRIOT,914.0649,-665.7319,116.7606,241.1865,CarCol(),CarCol()); // patriot AddStaticVehicle2(V_MONSTERA,946.1701,-705.2098,121.9152,29.1216,CarCol(),CarCol()); // bandito AddStaticVehicle2(V_HUNTLEY,940.8948,-695.8306,121.1879,29.9158,CarCol(),CarCol()); // sand king AddStaticVehicle2(V_HUNTLEY,1097.4353,-642.2601,112.5732,267.1823,CarCol(),CarCol()); // huntley //AddStaticVehicle2(V_RANCHER,1413.9097,-481.3066,42.9720,297.0425,CarCol(),CarCol()); // rancher AddStaticVehicle2(V_COMET,1659.2822,-1426.8878,13.3985,88.7621,CarCol(),CarCol()); // com AddStaticVehicle2(V_BANSHEE,1590.5114,-1317.7780,17.2589,49.2585,CarCol(),CarCol()); // com AddStaticVehicle2(V_STALLION,1809.2898,-1430.6573,13.1695,184.9688,CarCol(),CarCol()); // com AddStaticVehicle2(V_WINDSOR,1725.2581,-1217.3599,19.0807,2.3763,CarCol(),CarCol()); // com AddStaticVehicle2(V_COMET,1531.0547,-1066.9626,24.7978,90.4579,CarCol(),CarCol()); // com AddStaticVehicle2(V_ZR350,1451.6792,-1146.7477,23.7968,133.4617,CarCol(),CarCol()); // com AddStaticVehicle2(V_STALLION,1328.1886,-1188.7338,23.3185,176.1219,CarCol(),CarCol()); // com AddStaticVehicle2(V_WINDSOR,1252.2759,-1430.6191,13.2775,183.7629,CarCol(),CarCol()); // com AddStaticVehicle2(V_COMET,1357.4553,-1570.0588,13.2831,163.9771,CarCol(),CarCol()); // com AddStaticVehicle2(V_BANSHEE,1677.5549,-1680.1785,13.2813,182.6165,CarCol(),CarCol()); // com AddStaticVehicle2(V_STALLION,1462.1278,-1356.1224,13.6903,0.6286,CarCol(),CarCol()); // com AddStaticVehicle2(V_CHEETAH,1294.6667,-984.6381,32.8379,180.0905,CarCol(),CarCol()); // cheetah AddStaticVehicle2(V_STRATUM,1205.1552,-1070.0197,29.3908,178.9626,CarCol(),CarCol()); // res AddStaticVehicle2(V_CEMENT,1256.7892,-1261.7640,13.3957,272.3957,CarCol(),CarCol()); // ind AddStaticVehicle2(V_STALLION,1429.0876,-1408.5740,13.7150,179.6099,CarCol(),CarCol()); // com AddStaticVehicle2(V_STALLION,1479.4669,-1415.0720,12.0265,125.8019,CarCol(),CarCol()); // com AddStaticVehicle2(V_BLADE,1947.7089,-1055.4075,24.3895,261.2244,CarCol(),CarCol()); // low AddStaticVehicle2(V_WASHING,2149.6853,-1137.7899,25.6585,90.4148,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_ELEGY,2160.4878,-1192.2114,23.9636,272.4233,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_MERIT,2241.3850,-1317.9384,24.1282,269.8383,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_WASHING,2347.2151,-1274.0010,22.6479,272.8961,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_SAVANNA,2427.8301,-1241.7535,24.4136,273.2498,CarCol(),CarCol()); // lowrider AddStaticVehicle2(V_VOODOO,2413.4661,-1229.0675,24.5211,182.1959,CarCol(),CarCol()); // lowrider AddStaticVehicle2(V_PCJ600,2463.7815,-1424.0723,23.8932,83.3706,CarCol(),CarCol()); // slow bike AddStaticVehicle2(V_WASHING,2460.6946,-1551.0662,24.1444,273.1476,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_SAVANNA,2479.3372,-1748.7130,13.6900,180.5300,CarCol(),CarCol()); // lowrider AddStaticVehicle2(V_GLENSHIT,2393.3811,-1927.7556,13.5243,0.1380,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_BLADE,2390.0774,-1884.8796,13.6899,265.9858,CarCol(),CarCol()); // lowrider AddStaticVehicle2(V_GLENSHIT,2728.9060,-1970.3724,13.6880,269.7400,CarCol(),CarCol()); // saloon cheap AddStaticVehicle2(V_REGINA,976.4387,-1230.6876,17.0708,88.5852,41,41); // suv AddStaticVehicle2(V_FLATBED,834.1715,-1216.6764,17.0872,84.6204,41,41); // ind AddStaticVehicle2(V_TOWTRUCK,860.5280,-1285.6953,14.0937,182.9245,41,41); // ind AddStaticVehicle2(V_MERIT,920.2068,-1292.6371,13.8247,270.7137,41,41); // saloon AddStaticVehicle2(V_SOLAIR,1012.5267,-1346.8806,13.4797,267.5486,41,41); // suv AddStaticVehicle2(V_REGINA,1117.3052,-1378.9901,14.4011,89.1945,41,41); // suv AddStaticVehicle2(V_NRG500,1132.5653,-1614.6372,13.9194,85.6389,41,41); // fast bike in shopping centre AddStaticVehicle2(V_WINDSOR,1160.2629,-1770.1327,16.7116,359.6430,41,41); // com AddStaticVehicle2(V_BANSHEE,1284.9130,-1732.6017,13.6673,0.8082,41,41); // com AddStaticVehicle2(V_REGINA,974.6439,-1089.6545,24.2836,177.6930,CarCol(),CarCol()); // suv AddStaticVehicle2(V_ELEGY,785.2358,-1064.5126,24.9404,49.4555,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_COMET,922.8809,-996.1521,38.3117,97.5416,CarCol(),CarCol()); // com AddStaticVehicle2(V_STRATUM,1140.2466,-927.7980,43.3007,271.3280,CarCol(),CarCol()); // suv AddStaticVehicle2(V_GLENSHIT,1337.9901,-901.7728,36.4426,180.8606,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_SWEEPER,1646.3864,-1062.6378,24.0274,155.3884,CarCol(),CarCol()); // sweeper AddStaticVehicle2(V_BENSON,1649.0890,-1111.7745,24.0429,267.8602,CarCol(),CarCol()); // van AddStaticVehicle2(V_BURRITO,1657.3999,-1134.4487,24.0332,180.5504,CarCol(),CarCol()); // smallvan AddStaticVehicle2(V_FLATBED,1564.0852,-1019.3521,24.0372,81.4864,CarCol(),CarCol()); // flatbed AddStaticVehicle2(V_NRG500,1518.3389,-1257.1481,14.6713,180.1029,CarCol(),CarCol()); // fastbike AddStaticVehicle2(V_MERIT,1999.5741,-1445.1320,13.6917,217.9478,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_BLADE,2086.8411,-1327.5076,24.1078,0.7111,CarCol(),CarCol()); // low AddStaticVehicle2(V_WASHING,1993.6346,-1276.0702,23.9460,357.9409,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_SWEEPER,1816.7452,-1133.7300,24.2091,273.6008,CarCol(),CarCol()); // sweeper AddStaticVehicle2(V_COACH,1775.9677,-1022.6566,24.0901,333.2864,CarCol(),CarCol()); // coach AddStaticVehicle2(V_ELEGY,2051.7642,-1121.0273,24.7394,176.2412,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_SAVANNA,2080.0862,-1284.8212,24.0993,178.8542,CarCol(),CarCol()); // lowrider AddStaticVehicle2(V_VOODOO,2143.8416,-1422.6912,25.2155,89.4439,CarCol(),CarCol()); // low AddStaticVehicle2(V_PCJ600,2199.1309,-1497.6111,24.1060,275.7724,CarCol(),CarCol()); // slowbike AddStaticVehicle2(V_SOLAIR,2200.7722,-1660.7334,15.1396,164.7502,CarCol(),CarCol()); // sub AddStaticVehicle2(V_WAYFARER,2321.2974,-1756.2679,13.6757,273.8248,CarCol(),CarCol()); // V_WAYFARER AddStaticVehicle2(V_STRETCH,1460.0215,-1025.5533,23.5681,90.6347,22,1); // limo bingo AddStaticVehicle2(V_STRETCH,1439.1008,-1025.7854,23.5682,90.6346,22,1); // limo bingo AddStaticVehicle2(V_COACH,1567.8092,-1891.4109,13.7520,356.6625,CarCol(),CarCol()); // coach AddStaticVehicle2(V_STRATUM,1370.2388,-1889.9265,13.7022,359.3041,CarCol(),CarCol()); // suv AddStaticVehicle2(V_GLENSHIT,1206.1053,-1829.6782,13.5963,92.9658,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_BANSHEE,1022.5290,-1832.1632,13.8703,62.2289,CarCol(),CarCol()); // com AddStaticVehicle2(V_WINDSOR,860.6016,-1756.1599,13.7098,17.1219,CarCol(),CarCol()); // com AddStaticVehicle2(V_CHEETAH,721.0599,-1809.3398,12.5489,71.5726,CarCol(),CarCol()); // posh AddStaticVehicle2(V_SOLAIR,479.5703,-1765.3434,5.7271,87.6614,CarCol(),CarCol()); // suv AddStaticVehicle2(V_REGINA,266.6155,-1746.7922,4.5722,91.5479,CarCol(),CarCol()); // suv AddStaticVehicle2(V_COMET,276.7425,-1594.9742,33.2880,348.6675,CarCol(),CarCol()); // com AddStaticVehicle2(V_STALLION,425.1006,-1440.8821,31.4193,36.4924,CarCol(),CarCol()); // com AddStaticVehicle2(V_STRATUM,551.6909,-1505.2357,14.7316,182.8906,CarCol(),CarCol()); // suv AddStaticVehicle2(V_MERIT,649.7829,-1620.6465,15.2105,112.6496,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_NRG500,682.0504,-1259.6924,13.7628,106.4779,CarCol(),CarCol()); // bikefast AddStaticVehicle2(V_WAYFARER,2175.6335,-993.5605,63.1809,169.8002,CarCol(),CarCol()); // V_WAYFARER AddStaticVehicle2(V_RANCHER,2453.6128,-1016.0901,59.8982,177.5543,CarCol(),CarCol()); // rancher AddStaticVehicle2(V_WASHING,2536.1904,-1104.8235,59.8875,180.5492,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_BLADE,2328.6465,-1407.3834,24.1766,178.8325,CarCol(),CarCol()); // low AddStaticVehicle2(V_MONSTERA,2492.1194,-1663.3529,13.5302,82.4906,CarCol(),CarCol()); // monster AddStaticVehicle2(V_GLENSHIT,2066.3311,-1694.5254,13.7310,268.5239,CarCol(),CarCol()); // V_GLENSHIT AddStaticVehicle2(V_CEMENT,2054.1970,-1767.7522,13.7393,181.0835,CarCol(),CarCol()); // cement AddStaticVehicle2(V_FLATBED,1939.3959,-1815.7340,13.7385,77.9876,CarCol(),CarCol()); // flatbed AddStaticVehicle2(V_TOWTRUCK,1937.9028,-1939.7325,13.7375,89.1628,CarCol(),CarCol()); // towtruck AddStaticVehicle2(V_PCJ600,1941.1481,-2140.8420,13.7440,175.4044,CarCol(),CarCol()); // V_PCJ600 AddStaticVehicle2(V_SWEEPER,2125.8816,-2165.4050,13.7341,320.7342,CarCol(),CarCol()); // sweeper AddStaticVehicle2(V_PATRIOT,2076.9661,-1994.8885,13.7389,41.9139,CarCol(),CarCol()); // patriot AddStaticVehicle2(V_GLENSHIT,1502.1649,-2212.7788,13.3136,359.6183,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_STRATUM,1407.0730,-2261.8484,13.3164,180.3750,CarCol(),CarCol()); // suv AddStaticVehicle2(V_BANSHEE,1365.5696,-2365.7705,13.3159,90.6723,CarCol(),CarCol()); // com AddStaticVehicle2(V_BENSON,1789.8521,-2180.6389,13.3187,270.2510,CarCol(),CarCol()); // van AddStaticVehicle2(V_WASHING,1922.5924,-1605.3048,13.1082,269.9615,118,118); // saloon AddStaticVehicle2(V_WAYFARER,2070.1260,-1591.6121,13.0664,182.2131,118,118); // V_WAYFARER AddStaticVehicle2(V_MERIT,2705.9854,-1844.6924,9.8701,340.3920,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_SOLAIR,2813.2185,-1671.5564,10.3166,2.8114,CarCol(),CarCol()); // suv AddStaticVehicle2(V_SAVANNA,2644.6707,-2023.4589,13.9219,1.6210,CarCol(),CarCol()); // low AddStaticVehicle2(V_CEMENT,2743.6338,-2138.0737,11.5750,94.0439,CarCol(),CarCol()); // cement AddStaticVehicle2(V_FLATBED,2300.8748,-2043.2729,13.9219,93.1316,CarCol(),CarCol()); // flatbed AddStaticVehicle2(V_ELEGY,2241.5413,-2111.0176,13.9195,134.0082,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_NRG500,2228.4226,-1811.8547,13.8943,269.9799,CarCol(),CarCol()); // V_NRG500 AddStaticVehicle2(V_BLADE,2505.4697,-1235.4440,37.6099,356.9889,CarCol(),CarCol()); // lowr AddStaticVehicle2(V_BURRITO,2587.6326,-1322.8219,40.4727,91.7934,CarCol(),CarCol()); // smallvan AddStaticVehicle2(V_PCJ600,2527.5496,-1465.3361,24.3251,86.3631,CarCol(),CarCol()); // slowbike AddStaticVehicle2(V_MERIT,2698.6609,-1191.8911,69.7986,270.9197,CarCol(),CarCol()); // saloon AddStaticVehicle2(V_RANCHER,2706.4719,-1274.8931,58.4590,135.3378,CarCol(),CarCol()); // rancher AddStaticVehicle2(V_BANSHEE,894.8080,-1518.4893,12.8387,9.3645,CarCol(),CarCol()); // com //AddStaticVehicle2(V_RANCHER,1725.1200,-405.3828,45.0947,196.5883,CarCol(),CarCol()); // offroad //AddStaticVehicle2(V_RANCHER,1970.6564,-813.4561,129.1876,281.6888,CarCol(),CarCol()); // rancher //AddStaticVehicle2(V_RANCHER,2431.9832,-773.8238,113.2601,296.2740,CarCol(),CarCol()); // rancher //AddStaticVehicle2(V_RANCHER,2662.3218,-438.5351,59.7808,318.4588,CarCol(),CarCol()); // rancher AddStaticVehicle2(V_STRATUM,883.8334,-1669.2842,13.2677,179.1199,-1,-1); // suv AddStaticVehicle2(V_STRATUM,932.0258,-846.5217,93.5395,204.0052,-1,-1); // stratum AddStaticVehicle2(V_ELEGY,1515.5645,-694.6604,94.5642,92.3278,-1,-1); // zr350 AddStaticVehicle2(V_STRATUM,2799.5591,-1258.3878,47.0600,204.8639,-1,-1); // stratum AddStaticVehicle2(V_ELEGY,666.1675,-1420.3197,14.3140,182.4264,-1,-1); // stratum AddStaticVehicle2(V_BURRITO,1670.2103,-2111.6082,13.3595,271.8420,-1,-1); // burrito AddStaticVehicle2(V_STRATUM,1852.8041,-2104.9824,13.3596,270.4381,-1,-1); // stratum AddStaticVehicle2(V_SOLAIR,2257.3926,-1887.3085,13.1181,270.4228,-1,-1); // shit car AddStaticVehicle2(V_STRATUM,2257.3926,-1887.3085,13.1181,270.4244,-1,-1); // crap car AddStaticVehicle2(V_ELEGY,2795.7795,-1589.3219,10.5862,270.9865,-1,-1); // tspawn AddStaticVehicle2(V_GLENSHIT,2629.7607,-1097.9878,69.0963,84.7661,-1,-1); // crap car AddStaticVehicle2(V_SOLAIR,2452.0415,-2024.6608,13.2054,179.7856,-1,-1); // shit car AddStaticVehicle2(V_STRATUM,2272.9333,-1911.0579,13.2040,358.7230,-1,-1); // shit car AddStaticVehicle2(V_GLENSHIT,2171.2175,-1726.0149,13.1972,89.1969,-1,-1); // shit car AddStaticVehicle2(V_SOLAIR,1981.4486,-1658.5092,15.6288,91.2597,-1,-1); // shit car AddStaticVehicle2(V_SOLAIR,2408.9807,-1391.3481,24.1352,267.8494,-1,-1); // solair AddStaticVehicle2(V_WAYFARER,2327.3572,-1225.1285,27.8549,91.6161,-1,-1); // wayfarer AddStaticVehicle2(V_COMET,612.4523,-1349.6593,13.5771,101.3442,-1,-1); // comet AddStaticVehicle2(V_PCJ600,494.7574,-1359.1431,16.8249,117.3824,-1,-1); // pcj AddStaticVehicle2(V_ZR350,515.5775,-1611.4176,16.2628,181.5104,-1,-1); // zr350 AddStaticVehicle2(V_ELEGY,383.7121,-1599.5427,29.9967,270.5061,-1,-1); // elegy } LasVenturasVehicles() { AddStaticVehicle2(V_TURISMO, 2040.0520,1319.2799,10.3779,183.2439, -1,-1); AddStaticVehicle2(V_BANSHEE, 2040.5247,1359.2783,10.3516,177.1306, -1,-1); AddStaticVehicle2(V_WASHING, 2110.4102,1398.3672,10.7552,359.5964, -1,-1); AddStaticVehicle2(V_INFERNUS, 2074.9624,1479.2120,10.3990,359.6861, -1,-1); AddStaticVehicle2(V_ZR350, 2075.6038,1666.9750,10.4252,359.7507, -1,-1); AddStaticVehicle2(V_BULLET, 2119.5845,1938.5969,10.2967,181.9064, -1,-1); AddStaticVehicle2(V_BULLET, 1843.7881,1216.0122,10.4556,270.8793, -1,-1); AddStaticVehicle2(V_BUFFALO, 1944.1003,1344.7717,8.9411,0.8168, -1,-1); AddStaticVehicle2(V_BUFFALO, 1679.2278,1316.6287,10.6520,180.4150, -1,-1); AddStaticVehicle2(V_CHEETAH, 1685.4872,1751.9667,10.5990,268.1183, -1,-1); AddStaticVehicle2(V_INFERNUS, 2034.5016,1912.5874,11.9048,0.2909, -1,-1); AddStaticVehicle2(V_INFERNUS, 2172.1682,1988.8643,10.5474,89.9151, -1,-1); AddStaticVehicle2(V_BANSHEE, 2245.5759,2042.4166,10.5000,270.7350, -1,-1); AddStaticVehicle2(V_ZR350, 2361.1538,1993.9761,10.4260,178.3929, -1,-1); AddStaticVehicle2(V_SUNRISE, 2221.9946,1998.7787,9.6815,92.6188, -1,-1); AddStaticVehicle2(V_URANUS, 2243.3833,1952.4221,14.9761,359.4796, -1,-1); AddStaticVehicle2(V_EUROS, 2276.7085,1938.7263,31.5046,359.2321, -1,-1); AddStaticVehicle2(V_EUROS, 2602.7769,1853.0667,10.5468,91.4813, -1,-1); AddStaticVehicle2(V_PHOENIX, 2610.7600,1694.2588,10.6585,89.3303, -1,-1); AddStaticVehicle2(V_EUROS, 2635.2419,1075.7726,10.5472,89.9571, -1,-1); AddStaticVehicle2(V_ELEGY, 2577.2354,1038.8063,10.4777,181.7069, -1,-1); AddStaticVehicle2(V_ELEGY, 2394.1021,989.4888,10.4806,89.5080, -1,-1); AddStaticVehicle2(V_ELEGY, 1881.0510,957.2120,10.4789,270.4388, -1,-1); AddStaticVehicle2(V_SLAMVAN, 2039.1257,1545.0879,10.3481,359.6690, -1,-1); AddStaticVehicle2(V_SLAMVAN, 2009.8782,2411.7524,10.5828,178.9618, -1,-1); AddStaticVehicle2(V_BANSHEE, 2010.0841,2489.5510,10.5003,268.7720, -1,-1); AddStaticVehicle2(V_CHEETAH, 2076.4033,2468.7947,10.5923,359.9186, -1,-1); //AddStaticVehicle2(V_MAVERICK, 2093.2754,2414.9421,74.7556,89.0247, -1,-1); AddStaticVehicle2(V_SUPERGT, 2352.9026,2577.9768,10.5201,0.4091, -1,-1); AddStaticVehicle2(V_SUPERGT, 2166.6963,2741.0413,10.5245,89.7816, -1,-1); AddStaticVehicle2(V_INFERNUS, 1960.9989,2754.9072,10.5473,200.4316, -1,-1); AddStaticVehicle2(V_BANSHEE, 1919.5863,2760.7595,10.5079,100.0753, -1,-1); AddStaticVehicle2(V_CHEETAH, 1673.8038,2693.8044,10.5912,359.7903, -1,-1); AddStaticVehicle2(V_BUFFALO, 1591.0482,2746.3982,10.6519,172.5125, -1,-1); AddStaticVehicle2(V_PHOENIX, 1580.4537,2838.2886,10.6614,181.4573, -1,-1); AddStaticVehicle2(V_SUNRISE, 1555.2734,2750.5261,10.6388,91.7773, -1,-1); AddStaticVehicle2(V_SLAMVAN, 1455.9305,2878.5288,10.5837,181.0987, -1,-1); AddStaticVehicle2(V_ZR350, 1537.8425,2578.0525,10.5662,0.0650, -1,-1); AddStaticVehicle2(V_TURISMO, 1433.1594,2607.3762,10.3781,88.0013, -1,-1); AddStaticVehicle2(V_PHOENIX, 2223.5898,1288.1464,10.5104,182.0297, -1,-1); AddStaticVehicle2(V_URANUS, 2451.6707,1207.1179,10.4510,179.8960, -1,-1); AddStaticVehicle2(V_SUNRISE, 2461.7253,1357.9705,10.6389,180.2927, -1,-1); AddStaticVehicle2(V_URANUS, 2461.8162,1629.2268,10.4496,181.4625, -1,-1); AddStaticVehicle2(V_ZR350, 2395.7554,1658.9591,10.5740,359.7374, -1,-1); AddStaticVehicle2(V_PEREN, 1553.3696,1020.2884,10.5532,270.6825, -1,-1); AddStaticVehicle2(V_LANDSTAL, 1380.8304,1159.1782,10.9128,355.7117, -1,-1); AddStaticVehicle2(V_MOONBEAM, 1383.4630,1035.0420,10.9131,91.2515, -1,-1); AddStaticVehicle2(V_PEREN, 1445.4526,974.2831,10.5534,1.6213, -1,-1); AddStaticVehicle2(V_LANDSTAL, 1704.2365,940.1490,10.9127,91.9048, -1,-1); AddStaticVehicle2(V_PEREN, 1658.5463,1028.5432,10.5533,359.8419, -1,-1); AddStaticVehicle2(V_FCR900, 1677.6628,1040.1930,10.4136,178.7038, -1,-1); AddStaticVehicle2(V_FCR900, 1383.6959,1042.2114,10.4121,85.7269, -1,-1); AddStaticVehicle2(V_FCR900, 1064.2332,1215.4158,10.4157,177.2942, -1,-1); AddStaticVehicle2(V_FCR900, 1111.4536,1788.3893,10.4158,92.4627, -1,-1); AddStaticVehicle2(V_NRG500, 953.2818,1806.1392,8.2188,235.0706, -1,-1); AddStaticVehicle2(V_NRG500, 995.5328,1886.6055,10.5359,90.1048, -1,-1); AddStaticVehicle2(V_FCR900, 993.7083,2267.4133,11.0315,1.5610, -1,-1); AddStaticVehicle2(V_SLAMVAN, 1439.5662,1999.9822,10.5843,0.4194, -1,-1); AddStaticVehicle2(V_NRG500, 1430.2354,1999.0144,10.3896,352.0951, -1,-1); AddStaticVehicle2(V_NRG500, 2156.3540,2188.6572,10.2414,22.6504, -1,-1); //AddStaticVehicle2(V_COPCARVG, 2277.6846,2477.1096,10.5652,180.1090, -1,-1); //AddStaticVehicle2(V_COPCARVG, 2268.9888,2443.1697,10.5662,181.8062, -1,-1); //AddStaticVehicle2(V_COPCARVG, 2256.2891,2458.5110,10.5680,358.7335, -1,-1); //AddStaticVehicle2(V_COPCARVG, 2251.6921,2477.0205,10.5671,179.5244, -1,-1); //AddStaticVehicle2(V_COPBIKE, 2294.7305,2441.2651,10.3860,9.3764, -1,-1); //AddStaticVehicle2(V_COPBIKE, 2290.7268,2441.3323,10.3944,16.4594, -1,-1); AddStaticVehicle2(V_NRG500, 2476.7900,2532.2222,21.4416,0.5081, -1,-1); AddStaticVehicle2(V_NRG500, 2580.5320,2267.9595,10.3917,271.2372, -1,-1); AddStaticVehicle2(V_NRG500, 2814.4331,2364.6641,10.3907,89.6752, -1,-1); AddStaticVehicle2(V_SLAMVAN, 2827.4143,2345.6953,10.5768,270.0668, -1,-1); AddStaticVehicle2(V_FCR900, 1670.1089,1297.8322,10.3864,359.4936, -1,-1); //AddStaticVehicle2(V_MAVERICK, 1614.7153,1548.7513,11.2749,347.1516, -1,-1); //AddStaticVehicle2(V_MAVERICK, 1647.7902,1538.9934,11.2433,51.8071, -1,-1); //AddStaticVehicle2(V_MAVERICK, 1608.3851,1630.7268,11.2840,174.5517, -1,-1); //AddStaticVehicle2(V_RUSTLER, 1283.0006,1324.8849,9.5332,275.0468, -1,-1); //AddStaticVehicle2(V_RUSTLER, 1283.5107,1361.3171,9.5382,271.1684, -1,-1); //AddStaticVehicle2(V_RUSTLER, 1283.6847,1386.5137,11.5300,272.1003, -1,-1); //AddStaticVehicle2(V_RUSTLER, 1288.0499,1403.6605,11.5295,243.5028, -1,-1); AddStaticVehicle2(V_CHEETAH, 1319.1038,1279.1791,10.5931,0.9661, -1,-1); AddStaticVehicle2(V_FCR900, 1710.5763,1805.9275,10.3911,176.5028, -1,-1); AddStaticVehicle2(V_FCR900, 2805.1650,2027.0028,10.3920,357.5978, -1,-1); AddStaticVehicle2(V_SLAMVAN, 2822.3628,2240.3594,10.5812,89.7540, -1,-1); AddStaticVehicle2(V_FCR900, 2876.8013,2326.8418,10.3914,267.8946, -1,-1); AddStaticVehicle2(V_BANSHEE, 2842.0554,2637.0105,10.5000,182.2949, -1,-1); AddStaticVehicle2(V_TAMPA, 2494.4214,2813.9348,10.5172,316.9462, -1,-1); AddStaticVehicle2(V_TAMPA, 2327.6484,2787.7327,10.5174,179.5639, -1,-1); AddStaticVehicle2(V_TAMPA, 2142.6970,2806.6758,10.5176,89.8970, -1,-1); AddStaticVehicle2(V_FCR900, 2139.7012,2799.2114,10.3917,229.6327, -1,-1); AddStaticVehicle2(V_FCR900, 2104.9446,2658.1331,10.3834,82.2700, -1,-1); AddStaticVehicle2(V_FCR900, 1914.2322,2148.2590,10.3906,267.7297, -1,-1); AddStaticVehicle2(V_TAMPA, 1904.7527,2157.4312,10.5175,183.7728, -1,-1); AddStaticVehicle2(V_TAMPA, 1532.6139,2258.0173,10.5176,359.1516, -1,-1); AddStaticVehicle2(V_FCR900, 1534.3204,2202.8970,10.3644,4.9108, -1,-1); AddStaticVehicle2(V_TAMPA, 1613.1553,2200.2664,10.5176,89.6204, -1,-1); AddStaticVehicle2(V_LANDSTAL, 1552.1292,2341.7854,10.9126,274.0815, -1,-1); AddStaticVehicle2(V_PEREN, 1637.6285,2329.8774,10.5538,89.6408, -1,-1); AddStaticVehicle2(V_LANDSTAL, 1357.4165,2259.7158,10.9126,269.5567, -1,-1); AddStaticVehicle2(V_INFERNUS, 1281.7458,2571.6719,10.5472,270.6128, -1,-1); AddStaticVehicle2(V_NRG500, 1305.5295,2528.3076,10.3955,88.7249, -1,-1); AddStaticVehicle2(V_FCR900, 993.9020,2159.4194,10.3905,88.8805, -1,-1); AddStaticVehicle2(V_CHEETAH, 1512.7134,787.6931,10.5921,359.5796, -1,-1); AddStaticVehicle2(V_NRG500, 2299.5872,1469.7910,10.3815,258.4984, -1,-1); AddStaticVehicle2(V_NRG500, 2133.6428,1012.8537,10.3789,87.1290, -1,-1); AddStaticVehicle2(V_CHEETAH, 2266.7336,648.4756,11.0053,177.8517, -1,-1); AddStaticVehicle2(V_FCR900, 2404.6636,647.9255,10.7919,183.7688, -1,-1); AddStaticVehicle2(V_SUPERGT, 2628.1047,746.8704,10.5246,352.7574, -1,-1); AddStaticVehicle2(V_TAMPA, 2808.7822,900.1909,10.4548,182.4576, -1,-1); AddStaticVehicle2(V_ELEGY, 1919.8829,947.1886,10.4715,359.4453, -1,-1); AddStaticVehicle2(V_ELEGY, 1881.6346,1006.7653,10.4783,86.9967, -1,-1); AddStaticVehicle2(V_ELEGY, 2038.1044,1006.4022,10.4040,179.2641, -1,-1); AddStaticVehicle2(V_ELEGY, 2038.1614,1014.8566,10.4057,179.8665, -1,-1); AddStaticVehicle2(V_ELEGY, 2038.0966,1026.7987,10.4040,180.6107, -1,-1); //AddStaticVehicle2(V_BOBCAT, 9.1065,1165.5066,19.5855,2.1281, -1,-1); //AddStaticVehicle2(V_FREEWAY, 19.8059,1163.7103,19.1504,346.3326, -1,-1); //AddStaticVehicle2(V_FREEWAY, 12.5740,1232.2848,18.8822,121.8670, -1,-1); //AddStaticVehicle2(V_WAYFARER, 69.4633,1217.0189,18.3304,158.9345, -1,-1); //AddStaticVehicle2(V_WAYFARER, -199.4185,1223.0405,19.2624,176.7001, -1,-1); //AddStaticVehicle2(V_RUSTLER, 325.4121,2538.5999,17.5184,181.2964, -1,-1); //AddStaticVehicle2(V_RUSTLER, 291.0975,2540.0410,17.5276,182.7206, -1,-1); //AddStaticVehicle2(V_TORNADO, 384.2365,2602.1763,16.0926,192.4858, -1,-1); //AddStaticVehicle2(V_WAYFARER, 423.8012,2541.6870,15.9708,338.2426, -1,-1); //AddStaticVehicle2(V_WAYFARER, -244.0047,2724.5439,62.2077,51.5825, -1,-1); //AddStaticVehicle2(V_WAYFARER, -311.1414,2659.4329,62.4513,310.9601, -1,-1); //AddStaticVehicle2(V_SADLER, 596.8064,866.2578,-43.2617,186.8359, -1,-1); AddStaticVehicle2(V_SADLER, 835.0838,836.8370,11.8739,14.8920, -1,-1); AddStaticVehicle2(V_TAMPA, 843.1893,838.8093,12.5177,18.2348, -1,-1); //AddStaticVehicle2(V_LANDSTAL, -235.9767,1045.8623,19.8158,180.0806, -1,-1); //AddStaticVehicle2(V_COPCARRU, -211.5940,998.9857,19.8437,265.4935, -1,-1); //AddStaticVehicle2(V_BOBCAT, -304.0620,1024.1111,19.5714,94.1812, -1,-1); //AddStaticVehicle2(V_HOTDOG, -290.2229,1317.0276,54.1871,81.7529, -1,-1); //AddStaticVehicle2(V_TURISMO, -290.3145,1567.1534,75.0654,133.1694, -1,-1); //AddStaticVehicle2(V_PATRIOT, 280.4914,1945.6143,17.6317,310.3278, -1,-1); //AddStaticVehicle2(V_PATRIOT, 272.2862,1949.4713,17.6367,285.9714, -1,-1); //AddStaticVehicle2(V_PATRIOT, 271.6122,1961.2386,17.6373,251.9081, -1,-1); //AddStaticVehicle2(V_PATRIOT, 279.8705,1966.2362,17.6436,228.4709, -1,-1); //AddStaticVehicle2(V_BARRACKS, 277.6437,1985.7559,18.0772,270.4079, -1,-1); //AddStaticVehicle2(V_BARRACKS, 277.4477,1994.8329,18.0773,267.7378, -1,-1); //AddStaticVehicle2(V_BANDITO, -441.3438,2215.7026,42.2489,191.7953, -1,-1); //AddStaticVehicle2(V_BANDITO, -422.2956,2225.2612,42.2465,0.0616, -1,-1); //AddStaticVehicle2(V_BANDITO, -371.7973,2234.5527,42.3497,285.9481, -1,-1); //AddStaticVehicle2(V_BANDITO, -360.1159,2203.4272,42.3039,113.6446, -1,-1); //AddStaticVehicle2(V_SANCHEZ, -660.7385,2315.2642,138.3866,358.7643, -1,-1); //AddStaticVehicle2(V_SKIMMER, -1029.2648,2237.2217,42.2679,260.5732, -1,-1); //AddStaticVehicle2(V_ESPERANT, 95.0568,1056.5530,13.4068,192.1461, -1,-1); //AddStaticVehicle2(V_BANSHEE, 114.7416,1048.3517,13.2890,174.9752, -1,-1); //AddStaticVehicle2(V_INFERNUS, -290.0065,1759.4958,42.4154,89.7571, -1,-1); //AddStaticVehicle2(V_NRG500, -302.5649,1777.7349,42.2514,238.5039, -1,-1); //AddStaticVehicle2(V_NRG500, -302.9650,1776.1152,42.2588,239.9874, -1,-1); //AddStaticVehicle2(V_FELTZER, -301.0404,1750.8517,42.3966,268.7585, -1,-1); //AddStaticVehicle2(V_SLAMVAN, -866.1774,1557.2700,23.8319,269.3263, -1,-1); //AddStaticVehicle2(V_SUNRISE, -799.3062,1518.1556,26.7488,88.5295, -1,-1); //AddStaticVehicle2(V_FCR900, -749.9730,1589.8435,26.5311,125.6508, -1,-1); //AddStaticVehicle2(V_NRG500, -867.8612,1544.5282,22.5419,296.0923, -1,-1); //AddStaticVehicle2(V_YOSEMITE, -904.2978,1553.8269,25.9229,266.6985, -1,-1); //AddStaticVehicle2(V_FCR900, -944.2642,1424.1603,29.6783,148.5582, -1,-1); //AddStaticVehicle2(V_BANSHEE, -237.7157,2594.8804,62.3828,178.6802, -1,-1); //AddStaticVehicle2(V_FREEWAY, -196.3012,2774.4395,61.4775,303.8402, -1,-1); //AddStaticVehicle2(V_SHAMAL, -1341.1079,-254.3787,15.0701,321.6338, -1,-1); //AddStaticVehicle2(V_SHAMAL, -1371.1775,-232.3967,15.0676,315.6091, -1,-1); //AddStaticVehicle2(V_SHAMAL, 1642.9850,-2425.2063,14.4744,159.8745, -1,-1); //AddStaticVehicle2(V_SHAMAL, 1734.1311,-2426.7563,14.4734,172.2036, -1,-1); //AddStaticVehicle2(V_CHEETAH, -680.9882,955.4495,11.9032,84.2754, -1,-1); //AddStaticVehicle2(V_SKIMMER, -816.3951,2222.7375,43.0045,268.1861, -1,-1); //AddStaticVehicle2(V_SKIMMER, -94.6885,455.4018,1.5719,250.5473, -1,-1); //AddStaticVehicle2(V_SKIMMER, 1624.5901,565.8568,1.7817,200.5292, -1,-1); //AddStaticVehicle2(V_SKIMMER, 1639.3567,572.2720,1.5311,206.6160, -1,-1); //AddStaticVehicle2(V_SKIMMER, 2293.4219,517.5514,1.7537,270.7889, -1,-1); //AddStaticVehicle2(V_SKIMMER, 2354.4690,518.5284,1.7450,270.2214, -1,-1); //AddStaticVehicle2(V_SKIMMER, 772.4293,2912.5579,1.0753,69.6706, -1,-1); AddStaticVehicle2(V_SULTAN, 2133.0769,1019.2366,10.5259,90.5265, -1,-1); AddStaticVehicle2(V_SULTAN, 2142.4023,1408.5675,10.5258,0.3660, -1,-1); AddStaticVehicle2(V_SULTAN, 2196.3340,1856.8469,10.5257,179.8070, -1,-1); AddStaticVehicle2(V_SULTAN, 2103.4146,2069.1514,10.5249,270.1451, -1,-1); AddStaticVehicle2(V_SULTAN, 2361.8042,2210.9951,10.3848,178.7366, -1,-1); //AddStaticVehicle2(V_SULTAN, -1993.2465,241.5329,34.8774,310.0117, -1,-1); //AddStaticVehicle2(V_JESTER, -1989.3235,270.1447,34.8321,88.6822, -1,-1); //AddStaticVehicle2(V_JESTER, -1946.2416,273.2482,35.1302,126.4200, -1,-1); //AddStaticVehicle2(V_URANUS, -1956.8257,271.4941,35.0984,71.7499, -1,-1); //AddStaticVehicle2(V_ELEGY, -1952.8894,258.8604,40.7082,51.7172, -1,-1); //AddStaticVehicle2(V_INFERNUS, -1949.8689,266.5759,40.7776,216.4882, -1,-1); //AddStaticVehicle2(V_BANSHEE, -1988.0347,305.4242,34.8553,87.0725, -1,-1); //AddStaticVehicle2(V_JESTER, -1657.6660,1213.6195,6.9062,282.6953, -1,-1); //AddStaticVehicle2(V_SULTAN, -1658.3722,1213.2236,13.3806,37.9052, -1,-1); //AddStaticVehicle2(V_URANUS, -1660.8994,1210.7589,20.7875,317.6098, -1,-1); //AddStaticVehicle2(V_SUNRISE, -1645.2401,1303.9883,6.8482,133.6013, -1,-1); //AddStaticVehicle2(V_SKIMMER, -1333.1960,903.7660,1.5568,0.5095, -1,-1); //AddStaticVehicle2(V_INFERNUS, 113.8611,1068.6182,13.3395,177.1330, -1,-1); //AddStaticVehicle2(V_BANSHEE, 159.5199,1185.1160,14.7324,85.5769, -1,-1); //AddStaticVehicle2(V_INFERNUS, 612.4678,1694.4126,6.7192,302.5539, -1,-1); //AddStaticVehicle2(V_NRG500, 661.7609,1720.9894,6.5641,19.1231, -1,-1); //AddStaticVehicle2(V_NRG500, 660.0554,1719.1187,6.5642,12.7699, -1,-1); //AddStaticVehicle2(V_SAVANNA, 711.4207,1947.5208,5.4056,179.3810, -1,-1); AddStaticVehicle2(V_SAVANNA, 1031.8435,1920.3726,11.3369,89.4978, -1,-1); AddStaticVehicle2(V_SAVANNA, 1112.3754,1747.8737,10.6923,270.9278, -1,-1); AddStaticVehicle2(V_SAVANNA, 1641.6802,1299.2113,10.6869,271.4891, -1,-1); AddStaticVehicle2(V_SAVANNA, 2135.8757,1408.4512,10.6867,180.4562, -1,-1); AddStaticVehicle2(V_SAVANNA, 2262.2639,1469.2202,14.9177,91.1919, -1,-1); AddStaticVehicle2(V_SAVANNA, 2461.7380,1345.5385,10.6975,0.9317, -1,-1); AddStaticVehicle2(V_SAVANNA, 2804.4365,1332.5348,10.6283,271.7682, -1,-1); AddStaticVehicle2(V_SULTAN, 2805.1685,1361.4004,10.4548,270.2340, -1,-1); AddStaticVehicle2(V_SUPERGT, 2853.5378,1361.4677,10.5149,269.6648, -1,-1); AddStaticVehicle2(V_SAVANNA, 2633.9832,2205.7061,10.6868,180.0076, -1,-1); AddStaticVehicle2(V_SAVANNA, 2119.9751,2049.3127,10.5423,180.1963, -1,-1); //AddStaticVehicle2(V_SAVANNA, 2785.0261,-1835.0374,9.6874,226.9852, -1,-1); //AddStaticVehicle2(V_SAVANNA, 2787.8975,-1876.2583,9.6966,0.5804, -1,-1); //AddStaticVehicle2(V_INFERNUS, 2771.2993,-1841.5620,9.4870,20.7678, -1,-1); AddStaticVehicle2(V_TAXI, 1713.9319,1467.8354,10.5219,342.8006, -1,-1); AddStaticVehicle2(V_TAMPA,2513.8765,2368.1816,3.9390,85.5409,-1,-1); // tampa AddStaticVehicle2(V_SAVANNA,2510.8699,2397.8613,3.9283,7.0816,-1,-1); // savanna AddStaticVehicle2(V_SLAMVAN,2537.6511,2397.4429,3.9339,358.6610,-1,-1); // slamvan AddStaticVehicle2(V_LANDSTAL,2540.1926,2363.2505,3.9329,88.0596,-1,-1); // landstal AddStaticVehicle2(V_FBIRANCH,1716.6511,1387.6346,10.1719,195.3732,-1,-1); // fbiranch AddStaticVehicle2(V_FBIRANCH,1713.9792,1397.3528,10.1771,195.5063,-1,-1); // fbiranch AddStaticVehicle2(V_STRETCH,1711.7006,1405.5538,10.1757,195.4851,-1,-1); // limo AddStaticVehicle2(V_FBIRANCH,1708.9426,1416.8193,10.1718,192.9204,-1,-1); // fbiranch AddStaticVehicle2(V_NEWSVAN,1717.1743,1433.9290,10.2928,177.0596,-1,-1); // newsvan AddStaticVehicle2(V_COPBIKE,1718.0765,1380.7115,10.6894,195.7436,-1,-1); // cop bike AddStaticVehicle2(V_COPBIKE,1719.1389,1381.5099,10.0587,196.9333,-1,-1); // copbike AddStaticVehicle2(V_NRG500,2848.1685,915.0026,10.5222,99.9024,-1,-1); // nrg AddStaticVehicle2(V_FCR900,2853.1367,923.1398,10.5225,92.1160,-1,-1); // fcr AddStaticVehicle2(V_FCR900,2855.5422,929.4323,10.5203,86.2880,-1,-1); // fcr AddStaticVehicle2(V_BURRITO,2840.2390,960.1940,10.5213,173.6817,-1,-1); // huntley AddStaticVehicle2(V_BURRITO,2830.1165,963.1138,10.5229,5.9503,-1,-1); // huntley AddStaticVehicle2(V_SLAMVAN,2812.8147,965.9282,10.5222,92.2067,-1,-1); // van or something AddStaticVehicle2(V_BENSON,2826.4226,911.6951,10.5260,93.4742,-1,-1); // minivan AddStaticVehicle2(V_TAMPA,2802.0010,899.7051,10.5257,182.4596,-1,-1); // glenshit AddStaticVehicle2(V_TAMPA,2804.8748,899.9962,10.5228,187.1934,-1,-1); // glenshit AddStaticVehicle2(V_WAYFARER,2850.9485,936.1880,10.5229,359.2170,-1,-1); // wayfarer AddStaticVehicle2(V_WAYFARER,2850.9075,933.1924,10.5203,359.2168,-1,-1); // wayfarer AddStaticVehicle2(V_WAYFARER,2850.8469,928.7164,10.5197,359.2164,-1,-1); // wayfarer AddStaticVehicle2(V_SWATVAN,2223.5107,2453.2517,-7.8801,268.2045,-1,-1); // swat tank AddStaticVehicle2(V_SWATVAN,2227.1729,2462.8828,-7.8858,268.8480,-1,-1); // swat tank AddStaticVehicle2(V_COPCARVG,2314.9893,2460.0833,3.0197,268.9429,-1,-1); // cop car AddStaticVehicle2(V_COPCARVG,2314.5588,2470.2651,3.0193,271.6169,-1,-1); // AddStaticVehicle2(V_COPCARRU,2311.8721,2431.6428,3.0219,180.7283,-1,-1); // copcarru AddStaticVehicle2(V_COPCARRU,2303.3135,2431.7693,3.0199,180.1414,-1,-1); // AddStaticVehicle2(V_COPCARRU,2294.3782,2431.3086,3.0165,178.5332,-1,-1); // AddStaticVehicle2(V_COPCARVG,2277.0938,2430.8738,3.0175,358.4374,-1,-1); // copcar AddStaticVehicle2(V_COPCARVG,2255.1445,2431.7939,3.0171,358.1542,-1,-1); // copcar AddStaticVehicle2(V_COPCARVG,2314.0994,2484.8403,3.0163,271.4961,-1,-1); // copcar AddStaticVehicle2(V_ENFORCER,2286.2075,2474.7297,3.0213,357.8531,-1,-1); // cop van AddStaticVehicle2(V_ENFORCER,2277.2646,2474.8477,3.0187,357.6639,-1,-1); // AddStaticVehicle2(V_ENFORCER,2263.4182,2475.9897,3.4054,359.4711,-1,-1); // enforcer AddStaticVehicle2(V_COPBIKE, 295.5503,2455.9656,2.8444,272.6913, -1,-1); AddStaticVehicle2(V_COPBIKE,2297.9265,2448.2090,2.8325,256.5524,-1,-1); AddStaticVehicle2(V_COPBIKE,2297.2913,2464.0583,2.8477,311.1149,-1,-1); AddStaticVehicle2(V_FCR900,2856.2258,933.8096,10.7500,94.0911,-1,-1); // fcr AddStaticVehicle2(V_FCR900,2855.9255,938.6560,10.7500,85.3177,-1,-1); // fcr AddStaticVehicle2(V_WAYFARER,2846.3101,928.1447,10.7500,357.3498,-1,-1); // slow bike AddStaticVehicle2(V_WAYFARER,2846.3413,932.7408,10.7500,1.4232,-1,-1); // slow bike AddStaticVehicle2(V_WAYFARER,2845.9744,936.4430,10.7500,0.9252,-1,-1); // slow bike AddStaticVehicle2(V_NRG500,2545.5967,742.9938,10.3889,182.0201,-1,-1); // nrg AddStaticVehicle2(V_FCR900,1997.4865,2298.8430,10.8203,266.6409,-1,-1); // fcr AddStaticVehicle2(V_WAYFARER,1979.0238,2255.0264,27.1953,272.0834,-1,-1); // slow bike AddStaticVehicle2(V_FCR900,2541.8589,2020.6932,10.8150,180.6666,-1,-1); // fcr AddStaticVehicle2(V_FCR900,2613.6719,1389.7543,10.8203,88.4533,-1,-1); // fcr AddStaticVehicle2(V_CEMENT,2710.9368,823.6846,10.7319,356.2392,-1,-1); // cement AddStaticVehicle2(V_BENSON,2707.2192,877.3322,9.8438,178.7618,-1,-1); // truck AddStaticVehicle2(V_DFT30,1702.8733,752.7228,10.8203,176.4471,-1,-1); // flatbed AddStaticVehicle2(V_BENSON,1045.3615,2153.3630,10.8203,178.4094,-1,-1); // truck AddStaticVehicle2(V_AMBULAN,1614.5382,1839.8813,10.8203,358.3155,-1,-1); // ambulance AddStaticVehicle2(V_AMBULAN,1596.0594,1851.6489,10.8203,171.9366,-1,-1); // ambulance AddStaticVehicle2(V_BENSON,1745.9331,2235.1458,10.8203,87.1925,-1,-1); // truck AddStaticVehicle2(V_FIRETRUK,1754.3046,2073.4290,10.8203,175.6263,-1,-1); // firetruck AddStaticVehicle2(V_FIRETRUK,1766.3475,2073.1533,10.8203,180.3264,-1,-1); // firetruck AddStaticVehicle2(V_DFT30,1985.7671,2066.5872,10.8203,268.0074,-1,-1); // flatbed AddStaticVehicle2(V_CEMENT,2455.1008,1914.7067,10.8647,359.9929,-1,-1); // cement AddStaticVehicle2(V_BOXVILLE,2399.2078,1518.9467,10.8203,89.8420,-1,-1); // lorry AddStaticVehicle2(V_BENSON,2241.9043,2235.4993,10.7834,269.4017,-1,-1); // truck AddStaticVehicle2(V_SUNRISE,2834.3618,897.7526,10.7578,358.9492,-1,-1); // medium car AddStaticVehicle2(V_URANUS,2841.6228,896.5438,10.7578,355.5916,-1,-1); // medium car AddStaticVehicle2(V_EUROS,2847.9221,896.6416,10.7500,354.0812,-1,-1); // medium car AddStaticVehicle2(V_BUFFALO,2163.2354,778.4031,11.3520,88.6995,-1,-1); // medium car AddStaticVehicle2(V_WASHING,1852.8623,698.4745,11.1820,270.7062,-1,-1); // medium car AddStaticVehicle2(V_TAMPA,1905.1713,2575.4136,10.8203,353.6099,-1,-1); // car slow AddStaticVehicle2(V_SLAMVAN,1473.4617,1901.7454,11.1509,268.1785,-1,-1); // car medium AddStaticVehicle2(V_SULTAN,1568.5438,1904.8778,10.8203,357.6760,-1,-1); // car medium AddStaticVehicle2(V_SADLER,1647.6797,1943.2810,10.8203,265.9184,-1,-1); // car slow AddStaticVehicle2(V_SUNRISE,1603.6918,2087.9055,11.1319,269.9370,-1,-1); // medium car AddStaticVehicle2(V_URANUS,1848.1832,2245.0029,10.8203,353.1832,-1,-1); // car medium AddStaticVehicle2(V_WASHING,1895.4502,2245.7375,10.8203,358.1965,-1,-1); // car medium AddStaticVehicle2(V_SULTAN,1923.3781,2407.2771,10.8203,1.3979,-1,-1); // car medium AddStaticVehicle2(V_PEREN,1955.9355,2263.9260,22.7849,183.1015,-1,-1); // slow car AddStaticVehicle2(V_SULTAN,2339.5979,2109.5945,10.6793,180.9847,-1,-1); // sultan AddStaticVehicle2(V_BULLET,2360.4705,2101.3645,10.6719,179.1046,-1,-1); // fast car AddStaticVehicle2(V_PHOENIX,2340.3718,2173.3989,10.7202,0.5030,-1,-1); // fast car AddStaticVehicle2(V_EUROS,2467.1799,2337.0210,10.8203,89.1238,-1,-1); // medium car AddStaticVehicle2(V_TURISMO,2604.8398,2087.4294,10.8193,357.9221,-1,-1); // fast car AddStaticVehicle2(V_TAMPA,2578.9456,1967.3489,10.8203,1.0713,-1,-1); // slow car AddStaticVehicle2(V_BANSHEE,2562.8914,1754.9176,10.8203,355.3429,-1,-1); // fast car AddStaticVehicle2(V_TAMPA,2310.3855,1795.8695,10.8203,177.0800,-1,-1); // car slow AddStaticVehicle2(V_SLAMVAN,2520.5940,1449.7646,10.8203,359.6602,-1,-1); // car slow AddStaticVehicle2(V_CHEETAH,2609.4919,1430.0392,10.8203,180.8888,-1,-1); // car fast AddStaticVehicle2(V_PEREN,2538.7830,1222.1353,10.9586,177.4772,-1,-1); // car slow AddStaticVehicle2(V_INFERNUS,2461.8325,921.9180,10.8203,271.6954,-1,-1); // car fast AddStaticVehicle2(V_ZR350,2532.9211,923.4487,10.8280,89.4167,-1,-1); // car fast AddStaticVehicle2(V_CHEETAH,2075.0493,1160.3806,10.6719,179.5119,-1,-1); // car fast AddStaticVehicle2(V_TURISMO,2039.6614,1214.8975,10.6719,359.9566,-1,-1); // car fast AddStaticVehicle2(V_URANUS,2362.7856,728.6328,11.3205,180.5584,-1,-1); // car medium AddStaticVehicle2(V_TAMPA,2006.5060,657.9883,11.2493,1.0433,-1,-1); // car slow AddStaticVehicle2(V_BUFFALO,2104.6033,942.1170,10.8203,267.1487,-1,-1); // car medium AddStaticVehicle2(V_SLAMVAN,2231.0376,952.5665,10.8203,356.3398,-1,-1); // car slow AddStaticVehicle2(V_TAMPA,2446.0754,1123.5997,10.8203,89.2985,-1,-1); // car slow AddStaticVehicle2(V_SULTAN,2468.2139,1566.8163,10.8092,267.5183,-1,-1); // car medium AddStaticVehicle2(V_PEREN,2440.1716,1752.4663,10.8203,359.2478,-1,-1); // car slow AddStaticVehicle2(V_INFERNUS,2187.3416,1809.9685,10.8203,356.7759,-1,-1); // car fast AddStaticVehicle2(V_PHOENIX,2147.9761,1788.3610,10.8203,359.2826,-1,-1); // car fast AddStaticVehicle2(V_PHOENIX,2080.1755,1783.2009,10.6719,333.1432,-1,-1); // car fast AddStaticVehicle2(V_BULLET,2040.1539,1643.3982,10.6719,179.1316,-1,-1); // car fast AddStaticVehicle2(V_SULTAN,1509.3618,2101.7888,10.8203,93.4111,-1,-1); // car medium } public OnGameModeInit() { log_printf("--------------------------------------------------------------------------------"); log_printf("GameModeInit"); log_printf("--------------------------------------------------------------------------------"); SetGameModeText(mode_name); printf("\nLoaded \"%s\" mode.\n",mode_name); ShowPlayerMarkers(1); ShowNameTags(1); new hour,minute,second; gettime(hour,minute,second); SetWorldTime(hour); for (new i=0 ; i 0) { obj_current = random(obj_counter); obj_time_left = obj_time[obj_current]; } format(timer_string, sizeof timer_string, "%d:0%d",(round_time-round_timer_counter)/60,(round_time-round_timer_counter)%60); timer=TextDrawCreate(546,22,timer_string); TextDrawLetterSize(timer,0.6,2.2); TextDrawFont(timer,3); TextDrawSetOutline(timer,2); TextDrawShowForAll(timer); new File: transmap; transmap = fopen("userdb/transmap.txt",io_read); if (!transmap) { printf("ERROR: couldn't open file userdb/transmap.txt"); } else { for (new i=0 ; i=0) { strmid(transmap_nickname[i],line,0,space); strmid(transmap_username[i],line,space+1,sizeof line); } } fclose(transmap); } PrintMapContent(map); return 1; } PrintMapContent(map) { new File: file; new filename[25]; format(filename,sizeof filename,"map%02d.txt",map); file = fopen(filename,io_write); if (!file) { printf("ERROR: couldn't open file to write map content to "); return; } new text[256]; // safe zone if (safehouse_exists) { format(text,sizeof text,"dot %f %f %d rgba(255,0,0,50)\n",safehouse_x,safehouse_y,safehouse_exclusion*2); fwrite(file,text); } // objectives for (new i=0 ; i>>24; new green = (colour & 0x00FF0000)>>>16; new blue = (colour & 0x0000FF00)>>>8; for (new i=0 ; i 0) { GetPlayerName(playerid,text,sizeof text); log_printf("Connects: %d %s",playerid,text); format(text, sizeof text,"%s has joined the server.",text); SendClientMessageToAll(COLOUR_CONNECTION,text); } Motd(playerid); SetPlayerColor(playerid,0x606060AA); player_watching[playerid] = INVALID_PLAYER_ID; player_class[playerid] = INVALID_CLASS; player_class_requested[playerid] = INVALID_CLASS; player_pos_faked[playerid] = 0; player_already_voted[playerid] = 0; player_teamkills[playerid] = 0; player_teamkill_freeze_counter[playerid] = 0; player_vehicle_passenger[playerid] = 0; player_vehicle_driver[playerid] = 0; player_legal_minigun[playerid] = 0; player_legal_rocketlauncher[playerid] = 0; player_legal_heatseeker[playerid] = 0; player_map[playerid] = INVALID_MAP; player_speed_watch[playerid] = INVALID_PLAYER_ID; player_last_speed_warning[playerid] = -1; player_muted[playerid] = 0; player_query_target[playerid] = INVALID_PLAYER_ID; player_vote_muted[playerid] = 0; player_plots[playerid] = 0; player_mute_time[playerid] = 0; player_freeze_time[playerid] = 0; player_cam_active[playerid] = INVALID_CAMERA; player_controllable[playerid] = 1; player_world_bounds_min_x[playerid] = -100000; player_world_bounds_max_x[playerid] = 100000; player_world_bounds_min_y[playerid] = -100000; player_world_bounds_max_y[playerid] = 100000; player_dragging[playerid] = 0; player_repeat[playerid] = 0; if (playerid>=playerid_max) playerid_max = playerid+1; if (round_timer_counter == 0) { new real_name[MAX_USERNAME]; GetPlayerName(playerid,real_name,sizeof real_name); if (streq(transmap_nickname[playerid],real_name)) { player_username[playerid] = transmap_username[playerid]; if (!streq(player_username[playerid],"")) { printf("playerid %d automatically logs in as %s", playerid, player_username[playerid]); new username[MAX_USERNAME]; username=player_username[playerid]; // necessary because of a compiler bug log_printf("InheritLogin: %d %s as %s %d",playerid,real_name,username,IsPlayerOp(playerid)); } } } else { player_username[playerid] = ""; } return 1; } public OnPlayerRequestClass(playerid, classid) { if (!IsPlayerConnected(playerid)) { printf("ERROR: OnPlayerRequestClass(%d,%d) but not connected.\n",playerid, classid); return 1; } SetPlayerInterior(playerid, wardrobe_interior); SetPlayerPos2(playerid,wardrobe_player_x,wardrobe_player_y,wardrobe_player_z); SetPlayerFacingAngle(playerid, wardrobe_player_orientation); SetPlayerCameraPos(playerid,wardrobe_camera_x,wardrobe_camera_y,wardrobe_camera_z); SetPlayerCameraLookAt(playerid,wardrobe_player_x,wardrobe_player_y,wardrobe_player_z); player_class_requested[playerid] = classid; player_class[playerid] = INVALID_CLASS; if (VetoPlayerClass(classid, INVALID_CLASS) == classid) { new name[80]; GetTextFromTeam(name, class_team[classid]); new text[80]; format(text,sizeof text,"~w~%s",name); if (classid==class_terrorist_medic || classid==class_bodyguard_medic || classid==class_cop_medic) { format(text,sizeof text,"%s~n~(medic)",text); } GameTextForPlayer(playerid,text,1000,GAME_TEXT_STYLE_BIG); } else { new name[80]; GetTextFromTeam(name, class_team[classid]); new text[80]; format(text,80,"~w~%s ~n~ ~r~Not available",name); GameTextForPlayer(playerid,text,1500,GAME_TEXT_STYLE_BIG); } return 1; } Balancedness(proposedclassid, oldclassid, &dualpm, &toomanybg) { new team_players_count = 0; dualpm = 0; toomanybg = 0; new num_players[NUM_TEAMS]; for (new i=0 ; i1) dualpm = 1; if (team_players_count==0) return 0; // a bodyguard is worth 2 cops balancedness += 0.42 * (num_players[TEAM_BODYGUARD]); balancedness += 0.28 * num_players[TEAM_COP]; balancedness += -0.28 * num_players[TEAM_TERRORIST]; // psychos & pm do not affect balancedness // absolute value new Float:pain = (floatabs(balancedness)*100) / team_players_count; if ((num_players[TEAM_BODYGUARD]*100)/team_players_count > 30) toomanybg = 1; //new text[100]; //format(text,sizeof text,"balancedness: %d",pain2); //SendClientMessageToAll(0xFFFFFFAA,text); return floatround (pain); } VetoPlayerClass(classid, oldclassid) { new dualpm = 0, toomanybg = 0; new prebalancedness = Balancedness(INVALID_CLASS, INVALID_CLASS,dualpm, toomanybg); new postbalancedness = Balancedness(classid, oldclassid, dualpm, toomanybg); new players_count = 0; for (new i=0 ; i%d] (%d -> %d) %d %d",players_count,prebalancedness,postbalancedness,oldclassid,classid,dualpm,toomanybg); for (new i=0 ; i 0) { SetUpObjectiveCheckPoint(playerid); } if (class_team[player_class[playerid]]==TEAM_PRIMEMINISTER) { plan_active = 0; } if (class_team[player_class[playerid]]==TEAM_BODYGUARD || class_team[player_class[playerid]]==TEAM_COP) { if (plan_active) ShowPlan(playerid); } SetPlayerControllable(playerid,1); } return 1; } SetUpObjectiveCheckPoint(playerid) { if (obj_counter==0) { printf("ERROR: SetUpObjectiveCheckpoint when there are none"); return; } DisablePlayerCheckpoint(playerid); if (player_class[playerid]==INVALID_CLASS) { printf("ERROR: SetUpObjectiveCheckpoint without valid class"); return; } new team = class_team[player_class[playerid]]; if (team==TEAM_PSYCHO) return; new text[256]; format (text, sizeof text, "~b~PM Objective: ~w~%s~n~~b~Objectives left: %d", obj_desc[obj_current],obj_required-obj_completed); GameTextForPlayer(playerid,text,10000,GAME_TEXT_STYLE_SMALL); SetPlayerCheckpoint(playerid,obj_x[obj_current],obj_y[obj_current],obj_z[obj_current],obj_size[obj_current]); } ResetPlayerColour(playerid) { new colour = ClassColour(player_class[playerid]); SetPlayerColor(playerid,colour); } SetPlayerClass(playerid, class) { new team_name[80]; new text[80]; new player_name[80]; GetPlayerName(playerid,player_name,80); if (player_class[playerid]!=INVALID_CLASS) { GetTextFromTeam(team_name,class_team[player_class[playerid]]); format (text, sizeof text, "%s is nolonger %s.", player_name, team_name); if (connection_message_block != 1) { if (NumPlayersConnected()<=8 || class==class_primeminister) SendClientMessageToAll(ClassColour(player_class[playerid]),text); } } player_class[playerid] = class; if (class==INVALID_CLASS) return; log_printf("Class: %d %d %s",class,playerid,player_name); ResetPlayerColour(playerid); if (class >= 4 && class <=11) { SetPlayerTeam(playerid,0); } else if (class >= 12 && class <=28) { SetPlayerTeam(playerid,1); } else { SetPlayerTeam(playerid,NO_TEAM); } SetSpawnInfo(playerid,0, class_modelid[class], game_boundary_min_x+(game_boundary_max_x-game_boundary_min_x)/2,game_boundary_min_y+(game_boundary_max_y-game_boundary_min_y)/2,0,0, class_weapon1[class], class_weapon1_ammo[class], class_weapon2[class], class_weapon2_ammo[class], class_weapon3[class], class_weapon3_ammo[class]); GetTextFromTeam(team_name,class_team[class]); format (text, 80, "~y~You are %s~n~~w~/duty to get orders~n~ /reclass to change", team_name); GameTextForPlayer(playerid,text,7000,GAME_TEXT_STYLE_SMALL); format (text, 80, "%s is now %s.",player_name, team_name); if (NumPlayersConnected()<=8 || class==class_primeminister) SendClientMessageToAll(ClassColour(class),text); if (IsPlayerInAnyVehicle(playerid)) { // RemovePlayerFromVehicle(playerid); // doesnt fucking work SetPlayerPos2(playerid,game_boundary_min_x+(game_boundary_max_x-game_boundary_min_x)/2,game_boundary_min_y+(game_boundary_max_y-game_boundary_min_y)/2,0); new Float:x, Float:y, Float:z; GetPlayerPos(playerid,x,y,z); //SetPlayerPos2(playerid,game_boundary_min_x+(game_boundary_max_x-game_boundary_min_x)/2,game_boundary_min_y+(game_boundary_max_y-game_boundary_min_y)/2,0); SetPlayerPos2(playerid,x,y,z); } SpawnPlayer(playerid); } public OnPlayerDeath(playerid, killerid, reason) { if (!IsPlayerConnected(playerid)) { printf("ERROR: OnPlayerDeath(%d,%d,%d) but not connected.\n",playerid, killerid, reason); return 1; } if (player_class[playerid]==INVALID_CLASS) { printf("ERROR: OnPlayerDeath(%d,%d,%d) but victim has no class.\n",playerid, killerid, reason); return 1; } if (killerid!=INVALID_PLAYER_ID && player_class[killerid]==INVALID_CLASS) { printf("ERROR: OnPlayerDeath(%d,%d,%d) but killer has no class.\n",playerid, killerid, reason); return 1; } if (killerid!=INVALID_PLAYER_ID) { new score = GetPlayerScore(killerid); SetPlayerScore(killerid,score+1); } SendDeathMessage(killerid, playerid, reason); player_watching[playerid] = INVALID_PLAYER_ID; TogglePlayerSpectating(playerid,0); if (playerid!=killerid && killerid!=INVALID_PLAYER_ID) { new victimteam = class_team[player_class[playerid]]; new killerteam = class_team[player_class[killerid]]; if (MessagesGoTo(victimteam,killerteam)) { PlayerTeamKilled(killerid); } } if (killerid==INVALID_PLAYER_ID) killerid = playerid; new text[256]; GetPlayerName(playerid, text, sizeof text); log_printf("Died: %d %s", playerid, text); GetPlayerName(killerid, text, sizeof text); log_printf("CausedDeath: %d %s", killerid, text); if (class_team[player_class[playerid]]==TEAM_PRIMEMINISTER) { switch (class_team[player_class[killerid]]) { case TEAM_PRIMEMINISTER: GameTextForAll("The Prime Minister was killed in an accident!", 3000, GAME_TEXT_STYLE_SMALL); case TEAM_BODYGUARD: GameTextForAll("The Prime Minister was killed by his treacherous bodyguards", 3000, GAME_TEXT_STYLE_SMALL); case TEAM_COP: GameTextForAll("The Prime Minister was killed by the cops", 3000, GAME_TEXT_STYLE_SMALL); case TEAM_TERRORIST: GameTextForAll("The Prime Minister was killed by the terrorists", 3000, GAME_TEXT_STYLE_SMALL); case TEAM_PSYCHO: GameTextForAll("The Prime Minister was killed by a psychopath", 3000, GAME_TEXT_STYLE_SMALL); default: printf("ERROR: OnPlayerDeath (invalid team)\n"); } EveryoneViewsBody(killerid,playerid,GetPlayerInterior(playerid)); EndGameEvent(); } /* if(reason == 38) { //minigun death Ban(killerid); } */ return 1; } EndGameEvent() { MapVoteStore(); SetTimer("GameModeExitFunc", 3500, 0); MapVoteDisplayNextMap(); connection_message_block = 1; } PlayerTeamKilled(playerid) { player_teamkills[playerid]++; switch (player_teamkills[playerid]) { case 1: { // warning GameTextForPlayer(playerid,"~w~Do ~r~NOT~w~ team kill!~n~use /duty",7000,GAME_TEXT_STYLE_SMALL); } case 2: { // frozen for 7 seconds GameTextForPlayer(playerid,"~w~Do ~r~NOT~w~ team kill!~n~(frozen for 7 seconds)",7000,GAME_TEXT_STYLE_SMALL); SetPlayerControllable(playerid,0); player_teamkill_freeze_counter[playerid] = 7; } case 3: { // throw into air new Float:bx; new Float:by; new Float:bz; GetPlayerPos(playerid, bx, by, bz); SetPlayerPos2(playerid, bx, by, bz+1000); GameTextForPlayer(playerid,"~w~Team killing ~r~punishment",7000,GAME_TEXT_STYLE_SMALL); } case 4: { // reclass to psycho SetPlayerClass(playerid,class_psycho1 + random(NUM_PSYCHOS)); GameTextForPlayer(playerid,"~r~FINAL WARNING!",7000,GAME_TEXT_STYLE_SMALL); } case 5: { // final solution Kick(playerid); } } } EveryoneViewsBody(killerid,bodyplayerid,interiorid) { new Float:kx; new Float:ky; new Float:kz; GetPlayerPos(killerid, kx, ky, kz); new Float:bx; new Float:by; new Float:bz; GetPlayerPos(bodyplayerid, bx, by, bz); // from body to killer new Float:vx = kx - bx; new Float:vy = ky - by; new Float:vz = kz - bz; // distance new Float:d = floatsqroot(floatpower(vx,2) + floatpower(vy,2) + floatpower(vz,2)); if (d>5) { // normalise to unit vector, take distance of 5m and add 1.5 to height vx = vx / d * 5; vy = vy / d * 5; vz = vz / d * 5 + 1.5; } else { // if two players are on top of each other then just go 10m upwards vx = 0; vy = 0; vz = 10; } for (new i=0 ; i1 && round_timer_counter % onlyevery != 0) return; new Float:health; GetPlayerHealth(playerid,health); new Float:health2 = health + amount; if (health2>100) health2=100; if (health2<0) health2=0; if (health2!=health) { SetPlayerHealth(playerid,health2); } } public RoundTick() { new pm = GetPM(); round_timer_counter++; ticks_since_loc_update++; // GAME TIMER MESSAGE if (obj_counter==0 && round_timer_counter%150==0 && round_timer_counter>0 && round_timer_counter0 && round_timer_counter%150==10 && round_timer_counter>0 && round_timer_counter0) { player_teamkill_freeze_counter[i] = player_teamkill_freeze_counter[i] - 1; if (player_teamkill_freeze_counter[i]<=0) SetPlayerControllable(i,1); } } new terrorists_in_airport_now = 0; for (new i=0 ; i10) { terrorists_in_airport = terrorists_in_airport_now; if (terrorists_in_airport_now) { ticks_since_loc_update = 0; for (new i=0 ; i5) { pm_old_location = pml; ticks_since_loc_update = 0; new text[200]; LocationToText(pm,text,sizeof text); for (new i=0 ; i 0 && pm!=INVALID_PLAYER_ID && obj_completed!=obj_required) { new Float:x, Float:y, Float:z; GetPlayerPos(pm,x,y,z); new Float:d = floatsqroot(floatpower(x-obj_x[obj_current],2)+floatpower(y-obj_y[obj_current],2)); if (d <= obj_size[obj_current]/2 && z+1.0 > obj_z[obj_current]) { obj_time_left--; if (obj_time_left == 0) { obj_completed++; if (obj_completed == obj_required) { EveryoneViewsBody(pm,pm,GetPlayerInterior(pm)); GameTextForAll("The Prime Minister completed objectives!", 3000, GAME_TEXT_STYLE_SMALL); EndGameEvent(); } else { new next; do { next = random(obj_counter); } while (obj_counter>1 && next==obj_current); obj_current = next; obj_time_left = obj_time[obj_current]; obj_was_in = 0; for (new i=0 ; i 0) { if (player_weapon_data[i][7] == 35) { player_legal_minigun[i] = 0; player_legal_rocketlauncher[i] = 1; player_legal_heatseeker[i] = 0; } else if (player_weapon_data[i][7] == 36) { player_legal_minigun[i] = 0; player_legal_rocketlauncher[i] = 0; player_legal_heatseeker[i] = 1; } else if (player_weapon_data[i][7] == 38) { player_legal_minigun[i] = 1; player_legal_rocketlauncher[i] = 0; player_legal_heatseeker[i] = 0; } else { player_legal_minigun[i] = 0; player_legal_rocketlauncher[i] = 0; player_legal_heatseeker[i] = 0; } } else { player_legal_minigun[i] = 0; player_legal_rocketlauncher[i] = 0; player_legal_heatseeker[i] = 0; } } } // fix for the interior bug in the skyroof of jizzys new Float:x_pos,Float:y_pos,Float:z_pos; for(new i=0;i=-2664.2251 && x_pos<=-2658.3267 && y_pos>=1424.9188 && y_pos<=1434.9404 && z_pos>=23.5353 && z_pos<=26.5367) { SetPlayerInterior(i,0); } } if (round_timer_counter == 60) { GameTextForAll("~w~Don't forget to /mapvote~n~ for next round!", 4000, GAME_TEXT_STYLE_SMALL); } if (round_timer_counter%120==0) { ChangeWeather(); } if (pm_health_increase_check == 1) { GetPlayerHealth(pm, pm_health_increase_current); if (pm_health_increase_current > pm_health_increase_previous && !IsPlayerInAnyVehicle(pm)) { SetPlayerHealth(pm,pm_health_increase_previous); } GetPlayerHealth(pm,pm_health_increase_previous); } if ((round_time-round_timer_counter)/60 <= 0 && (round_time-round_timer_counter)%60 >= round_time) { format(timer_string, sizeof timer_string, "00:00"); } else if ((round_time-round_timer_counter)%60 <= 9 && (round_time-round_timer_counter)/60 <= 9) { format(timer_string, sizeof timer_string, "0%d:0%d",(round_time-round_timer_counter)/60,(round_time-round_timer_counter)%60); } else if ((round_time-round_timer_counter)%60 <= 9) { format(timer_string, sizeof timer_string, "%d:0%d",(round_time-round_timer_counter)/60,(round_time-round_timer_counter)%60); } else if ((round_time-round_timer_counter)/60 <= 9) { format(timer_string, sizeof timer_string, "0%d:%d",(round_time-round_timer_counter)/60,(round_time-round_timer_counter)%60); } else { format(timer_string, sizeof timer_string, "%d:%d",(round_time-round_timer_counter)/60,(round_time-round_timer_counter)%60); } TextDrawDestroy(timer); timer=TextDrawCreate(546,22,timer_string); TextDrawLetterSize(timer,0.6,2.2); TextDrawFont(timer,3); TextDrawSetOutline(timer,2); TextDrawShowForAll(timer); /* if (obj_counter > 0 && round_timer_counter == 20) { for (new i=0 ; i 0 && pm!=INVALID_PLAYER_ID && round_timer_counter % 30 == 0 && !obj_was_in) { for (new i=0 ; i0) { for (new i=0 ; i 0 && pm!=INVALID_PLAYER_ID) { new Float:x, Float:y, Float:z; GetPlayerPos(pm,x,y,z); for (new i=0 ; i100 ? 100.0 : pmh*2); SetPlayerArmour(pm, pma*2>100 ? 100.0 : pma *2); switch (task_type[i]) { case TASK_MINI: { SendClientMessageToAll(COLOUR_IMPORTANT,"The PM has discovered a small ammunition stash."); GivePlayerWeapon(pm,WEAPON_MINIGUN,30); player_legal_minigun[pm] = 1; } case TASK_HP_PENALTY: { SendClientMessageToAll(COLOUR_IMPORTANT,"It has been discovered that the terrorists have been drinking out-of-date"); SendClientMessageToAll(COLOUR_IMPORTANT,"beer from the Fleischberg brewery, as a result they have contracted an illness."); for (new j=0 ; j= round_time) round_timer_counter = round_time - 1; // finish early } case TASK_MEDIC: { SendClientMessageToAll(COLOUR_IMPORTANT,"The PM has learnt the skills of a medic."); pm_medic = 1; } case TASK_SAFEHOUSE: { SendClientMessageToAll(COLOUR_IMPORTANT,"The PM has enabled the SAM sites that guard the no-fly-zone."); safehouse_exists = 1; } case TASK_HP_BONUS: { SendClientMessageToAll(COLOUR_IMPORTANT,"The PM has discovered some medicinal herbs that allow him to regenerate faster."); pm_health_bonus = 3; } } } } } } for(new i=0; i < MAX_PLAYERS; i++){ if (IsPlayerConnected(i)){ if (player_mute_time[i]>0) { player_mute_time[i] --; if (player_mute_time[i] == 0 && player_muted[i] == 1) { GameTextForPlayer(i,"~g~You have been unmuted.",6000,GAME_TEXT_STYLE_SMALL); player_muted[i] = 0; player_repeat[i] = 0; } } if (player_freeze_time[i]>0) { player_freeze_time[i]--; if (player_freeze_time[i]==0){ GameTextForPlayer(i,"~g~You have been thawed.",6000,GAME_TEXT_STYLE_SMALL); SetPlayerControllable(i,1); } } } } if (pm_radar_time>0) { pm_radar_time--; if (pm_radar_time == 0) { SendClientMessageToAll(COLOUR_IMPORTANT,"The funding has now been used, the PM is once again"); SendClientMessageToAll(COLOUR_IMPORTANT,"visible to the terrorist and psychopathic forces."); ResetPlayerColour(pm); } } if (distance_display && pm!=INVALID_PLAYER_ID && round_timer_counter%distance_display_interval==0) { new Float:health; GetPlayerHealth(pm,health); new position[256]; new name[MAX_PLAYER_NAME]; GetPlayerName(pm,name,sizeof name); for (new i=0 ; i25) { format(position, sizeof position,"Distance to %s : %.2fm. His health is %.2f",name,DistanceFromPlayerToPlayer(i,pm),health); } else if (DistanceFromPlayerToPlayer(i,pm)<=25) { format(position, sizeof position,"Distance to %s : Less than 25m. His health is %.2f",name,health); } SendClientMessage(i,COLOUR_IMPORTANT,position); } } } } public OnPlayerDisconnect(playerid, reason) { if (connection_message_block != 1) { new text[256], reasontext[256]; GetPlayerName(playerid,text,sizeof text); log_printf("Disconnects: %d %s",playerid,text); if (reason == 0) { format(reasontext, sizeof reasontext,"timeout"); } else if (reason == 1) { format(reasontext, sizeof reasontext,"leaving"); } else if (reason == 2) { format(reasontext, sizeof reasontext,"kicked"); } format(text, sizeof text,"%s has left the server (%s).",text,reasontext); SendClientMessageToAll(COLOUR_CONNECTION,text); } if (!IsPlayerConnected(playerid)) { printf("ERROR: OnPlayerDisconnect(%d) but not connected.\n",playerid); return 1; } playerid_max = 0; for (new i=0 ; i=playerid_max) playerid_max = i+1; } if (player_watching[playerid] != INVALID_PLAYER_ID) { player_watching[playerid] = INVALID_PLAYER_ID; SetPlayerPosAtSelf(playerid); } for (new i=0 ; i %s",output,msg); SendClientMessage(playerid,COLOUR_QUERY,output); SendClientMessage(player_query_target[playerid],COLOUR_QUERY,output); } else { SendClientMessage(playerid,COLOUR_IMPORTANT,"No query established."); } return 0; } if (player_muted[playerid]) { SendClientMessage(playerid,COLOUR_PERSONAL,"You are muted."); return 0; } if (text[0]=='!') { if (player_class[playerid]==INVALID_CLASS) return 1; new myteam = class_team[player_class[playerid]]; for (new i=0 ; i1 && text[1]!='.') { for (new i=0 ; i=NUM_CLASSES) return 1; } else if (streq(rest,"cop") || streq(rest,"c")) { myclass = class_cop1 + random(NUM_COPS); } else if (streq(rest,"terrorist") || streq(rest,"t")) { myclass = class_terrorist1 + random(NUM_TERRORISTS); } else if (streq(rest,"bodyguard") || streq(rest,"b")) { myclass = class_bodyguard1 + random(NUM_BODYGUARDS); } else if (streq(rest,"psycho") || streq(rest,"p")) { myclass = class_psycho1 + random(NUM_PSYCHOS); } else if (streq(rest,"pm")) { myclass = class_primeminister; } else if (streq(rest,"tmedic") || streq(rest,"tm")) { myclass = class_terrorist_medic; } else if (streq(rest,"cmedic") || streq(rest,"cm")) { myclass = class_cop_medic; } else if (streq(rest,"bmedic") || streq(rest,"bm")) { myclass = class_bodyguard_medic; } else { SendClientMessage(playerid,COLOUR_PERSONAL,"No such class."); SendClientMessage(playerid,COLOUR_PERSONAL,"Usage: /reclass pm|terrorist|cop|bodyguard|psycho|tmedic|bmedic|cmedic"); return 1; } if (myclass==INVALID_CLASS) { SendClientMessage(playerid,COLOUR_PERSONAL,"Class not available."); return 1; } new veto = VetoPlayerClass(myclass,player_class[playerid]); if (veto==myclass) { SetPlayerClass(playerid,myclass); } else if (veto!=INVALID_CLASS) { new text[80]; GetTextFromTeam(text,class_team[veto]); format (text,sizeof text,"vetoed to %s",text); SendClientMessage(playerid,COLOUR_PERSONAL,text); CouldntSpawnAs(playerid,class_team[myclass]); } else { printf("VETO RETURNED INVALID_CLASS!\n"); } return 1; } else if (streq(cmd,"/swapclass")) { if (player_class[playerid]==INVALID_CLASS || class_team[player_class[playerid]]!=TEAM_PRIMEMINISTER) { SendClientMessage(playerid,COLOUR_PERSONAL,"You must be the Prime Minister to use this."); return 1; } new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) { SendClientMessage(playerid,COLOUR_PERSONAL,"Usage: /swapclass "); return 1; } new victim_class = player_class[id]; if (victim_class==INVALID_CLASS) { SendClientMessage(playerid,COLOUR_PERSONAL,"That person has not yet selected a class."); return 1; } if (id==playerid) { SendClientMessage(playerid,COLOUR_PERSONAL,"You are the Prime Minister."); return 1; } SetPlayerClass(playerid,INVALID_CLASS); SetPlayerClass(id,class_primeminister); // currently 2 pms running around but only the new one is recognised by the game code SetPlayerClass(playerid,victim_class); return 1; } else if (streq(cmd,"/duty")) { ExplainRole(playerid); return 1; } else if (streq(cmd,"/intel") || streq(cmd,"/int") || streq(cmd,"/i")) { TellPlayerIntel(playerid); return 1; } else if (streq(cmd,"/callvote")) { new suspecttext[256], reason[256]; parse_command(rest,suspecttext,reason); new suspectid=GetId(playerid,suspecttext); if (suspectid==INVALID_PLAYER_ID) return 1; for (new i=0; i 0) { format(text, sizeof text, "Players with minigun: %s",minigun); } else { format(text, sizeof text, "No players have the minigun."); } SendClientMessage(playerid, COLOUR_PERSONAL, text); if (rocketcounter > 0) { format(text, sizeof text, "Players with rocket launcher: %s",rocket); } else { format(text, sizeof text, "No players have the rocket launcher."); } SendClientMessage(playerid, COLOUR_PERSONAL, text); if (heatseekcounter > 0) { format(text, sizeof text, "Players with heat seeker: %s",heatseek); } else { format(text, sizeof text, "No players have the heat seeker."); } SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/motd")) { Motd(playerid); return 1; } else if (streq(cmd,"/pinfo")) { new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) { SendAllIdsFromName(playerid,rest); return 1; } new text[256]; GetPlayerName(id,text, sizeof text); new team[80]; GetTextFromTeam(team,class_team[player_class[id]]); new Float:x, Float:y, Float:z; GetPlayerPos(id,x,y,z); format(text,sizeof text, "name: %s [%d] (%s) cl:%d %s (%.2f,%.2f,%.2f) d:%.2f tk:%d %s", text, id, player_username[id], player_class[id], team, x,y,z, DistanceFromPlayerToPlayer(playerid,id),player_teamkills[id],((player_legal_minigun[id])?("mini"):("no_mini"))); if (IsPlayerInAnyVehicle(id)) { format(text,sizeof text, "%s {%d:%d}", text, GetPlayerVehicleID(id), vehicle_modelid[GetPlayerVehicleID(id)]); } SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/query")) { new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) return 1; new text[256]; GetPlayerName(id,text,sizeof text); format(text,sizeof text,"Query established with %s.",text); SendClientMessage(playerid, COLOUR_PERSONAL, text); player_query_target[playerid] = id; return 1; } else if (streq(cmd, "/unquery")) { player_query_target[playerid]=INVALID_PLAYER_ID; SendClientMessage(playerid,COLOUR_PERSONAL,"Query terminated."); return 1; } else if (streq(cmd,"/report")) { new suspectname[256], reason[256], playername[256], text[256]; parse_command(rest, suspectname, reason); new suspectid=GetId(playerid, suspectname); if (suspectid==INVALID_PLAYER_ID) return 1; if(reason[0] == 0){ SendClientMessage(playerid, COLOUR_PERSONAL, "Please add a reason to your report."); return 1; } GetPlayerName(playerid, playername, sizeof playername); GetPlayerName(suspectid, suspectname ,sizeof suspectname); if (player_class[suspectid] != INVALID_CLASS && player_class[playerid] != INVALID_CLASS) { new team[80]; GetTextFromTeam(team,class_team[player_class[playerid]]); new team2[80]; GetTextFromTeam(team2,class_team[player_class[suspectid]]); format(text, sizeof text,"Report by %s [%s]: %s (%d) [%s], %s.", playername, team, suspectname, suspectid, team2 , reason); } else { format(text, sizeof text,"Report by %s : %s (%d), %s.", playername, suspectname, suspectid , reason); } SendClientMessage(playerid, COLOUR_PERSONAL, "Thank you for your report."); for (new i=0 ; i "); return 1; } PlayerLogin(playerid,username,password); return 1; } else if (streq(cmd,"/disablelogin")) { new username[256], password[256]; parse_command(rest,username,password); if (strlen(username)==0 || strlen(password)==0) { SendClientMessage(playerid, COLOUR_PERSONAL, "usage: /disablelogin "); return 1; } PlayerDisableLogin(playerid,username,password); return 1; } else if (streq(cmd,"/logout")) { new username[256], password[256]; parse_command(rest,username,password); if (strlen(username)==0 || strlen(password)==0) { SendClientMessage(playerid, COLOUR_PERSONAL, "usage: /logout "); return 1; } if (player_username[playerid][0] == 0) { SendClientMessage(playerid, COLOUR_PERSONAL, "You are not logged in as anyone."); return 1; } PlayerLogout(playerid,username,password); return 1; } else if (streq(cmd,"/camoff")) { if (player_cam_active[playerid]==INVALID_CAMERA) { SendClientMessage(playerid,COLOUR_PERSONAL,"You are not in cam-view."); return 1; } player_cam_active[playerid] = INVALID_CAMERA; ResetPlayer(playerid); return 1; } else if (streq(cmd,"/kill")) { if (class_team[player_class[playerid]] == TEAM_PRIMEMINISTER) { SendClientMessage(playerid,COLOUR_PERSONAL,"The Prime Minister may not kill himself."); return 1; } if (!player_controllable[playerid]) { SendClientMessage(playerid,COLOUR_PERSONAL,"You cannot kill yourself while frozen."); return 1; } SetPlayerHealth(playerid,0.0); return 1; } else if (streq(cmd,"/cmds") || streq(cmd,"/help") || streq(cmd,"/show_commands") || streq(cmd,"/show_cmds")) { if(IsPlayerOp(playerid)) { SendClientMessage(playerid, COLOUR_PERSONAL, "/kick /ban /gethealth /sethealth /mute /unmute"); SendClientMessage(playerid, COLOUR_PERSONAL, "/watch /unwatch /whovote /barvote /unbarvote"); SendClientMessage(playerid, COLOUR_PERSONAL, "/force /tell /say /restart "); SendClientMessage(playerid, COLOUR_PERSONAL, "/freeze /thaw /tk /kph"); } SendClientMessage(playerid, COLOUR_PERSONAL, "/reclass (change class) /swapclass (for pm)"); SendClientMessage(playerid, COLOUR_PERSONAL, "/duty (get orders) /intel (get PM position) /pinfo"); SendClientMessage(playerid, COLOUR_PERSONAL, "/callvote /vote /endvote (votekick a cheater)"); SendClientMessage(playerid, COLOUR_PERSONAL, "/me /time /players /pinfo /h /heal /mapvote "); SendClientMessage(playerid, COLOUR_PERSONAL, "/ops /login /disablelogin "); SendClientMessage(playerid, COLOUR_PERSONAL, "/logout /camoff /plan /miniguns"); SendClientMessage(playerid, COLOUR_PERSONAL, "Messages starting with ! are team-only."); SendClientMessage(playerid, COLOUR_PERSONAL, "Messages starting with @ are PMs (use /query to initiate)."); return 1; } if (IsPlayerOp(playerid)) { if (streq(cmd,"/kick")) { new suspectname[256], reason[256], text[256], kicker[256]; parse_command(rest, suspectname, reason); new id=GetId(playerid,suspectname); if (id==INVALID_PLAYER_ID) return 1; GetPlayerName(id, suspectname, sizeof suspectname); GetPlayerName(playerid, kicker, sizeof kicker); format(text, sizeof text, "%s was kicked from the server by %s", suspectname,kicker); if(reason[0] != 0){ format(text,sizeof text, "%s (%s)", text, reason); } format(text,sizeof text, "%s.", text); SendClientMessageToAll(COLOUR_GLOBAL, text); Kick(id); return 1; } else if (streq(cmd,"/tk")) { new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) return 1; PlayerTeamKilled(id); new text[256]; GetPlayerName(id, text, sizeof text); format (text,sizeof text,"Sent warning to %s", text); SendClientMessage(playerid,COLOUR_PERSONAL,text); return 1; } else if (streq(cmd,"/setinterior")) { new playername[256], interiortext[256], text[256], interior; parse_command(rest,playername,interiortext); new id=GetId(playerid,playername); if (id==INVALID_PLAYER_ID) return 1; interior = strvalfixed(interiortext); GetPlayerName(id,text, sizeof text); format(text, sizeof text,"%s set to interior %d.",text,interior); SendClientMessage(playerid,COLOUR_PERSONAL,text); SetPlayerInterior(id,interior); return 1; } else if (streq(cmd,"/getinterior")) { new text[256]; new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) return 1; GetPlayerName(id,text, sizeof text); format(text, sizeof text,"%s is in interior %d.",text,GetPlayerInterior(id)); SendClientMessage(playerid,COLOUR_PERSONAL,text); return 1; } else if (streq(cmd,"/changeweather")) { ChangeWeather(); return 1; } else if (streq(cmd,"/thaw")) { new suspectname[256], text[256]; new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) return 1; GetPlayerName(id, suspectname ,sizeof suspectname); GameTextForPlayer(id,"~g~You were thawed by an admin.",6000,GAME_TEXT_STYLE_SMALL); SetPlayerControllable(id,1); format (text,sizeof text,"%s thawed.", suspectname); SendClientMessage(playerid,COLOUR_PERSONAL,text); return 1; } else if (streq(cmd,"/freeze")) { new suspectname[256], text[256], timeString[256], time; parse_command(rest, suspectname, timeString); new id=GetId(playerid,suspectname); time = strvalfixed(timeString); if (id==INVALID_PLAYER_ID) return 1; GetPlayerName(id, suspectname ,sizeof suspectname); if(time > 0){ player_freeze_time[id] = time; format (text,sizeof text,"%s frozen for %d seconds.", suspectname, time); SendClientMessage(playerid,COLOUR_PERSONAL,text); format (text,sizeof text,"~g~You were frozen by an admin for %d seconds.",time); GameTextForPlayer(id,text,6000,GAME_TEXT_STYLE_SMALL); }else{ player_freeze_time[id] = 0; format (text,sizeof text,"%s frozen.", suspectname); SendClientMessage(playerid,COLOUR_PERSONAL,text); format (text,sizeof text,"~g~You were frozen by an admin."); GameTextForPlayer(id,text,6000,GAME_TEXT_STYLE_SMALL); } SetPlayerControllable(id,0); return 1; } else if (streq(cmd,"/pwarp")) { new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) return 1; new Float:x, Float:y, Float:z; GetPlayerPos(id,x,y,z); SetPlayerPos2(playerid,x,y,z); SendClientMessage(playerid, COLOUR_PERSONAL, "Done."); return 1; } else if (streq(cmd,"/owarp")) { if (obj_counter==0) { SendClientMessage(playerid, COLOUR_PERSONAL, "This map has no objectives."); return 1; } new id=strvalfixed(rest); obj_current = id; obj_time_left = obj_time[obj_current]; for (new i=0 ; i 100) { SendClientMessage(playerid, COLOUR_PERSONAL, "Invalid health."); return 1; } SetPlayerHealth(id,health); new text[256]; format (text,sizeof text,"Health now: %f",health); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/vinfo")) { new vidtext[256], comment[256]; parse_command(rest,vidtext,comment); new vid=strvalfixed(vidtext); new text[256]; format(text,sizeof text,"vehicle {%d/%d}:%d is %f,%f,%f // %s",vid, vehicle_counter-1, vehicle_modelid[vid], vehicle_spawn_x[vid], vehicle_spawn_y[vid], vehicle_spawn_z[vid],comment); printf("%s\n",text); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/vwarp")) { new vid=strvalfixed(rest); SetPlayerPos2(playerid,vehicle_spawn_x[vid], vehicle_spawn_y[vid], vehicle_spawn_z[vid]+1.5); new text[256]; format (text,sizeof text,"Warped to vid %d",vid); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/wwarp")) { new pickupid=strvalfixed(rest); SetPlayerPos2(playerid,pickup_x[pickupid], pickup_y[pickupid], pickup_z[pickupid]+1.5); new text[256]; format (text,sizeof text,"Warped to pickupid %d",pickupid); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/disp")) { new playertext[256], xtext[256], ytext[256], ztext[256]; parse_command(rest,playertext,ztext); new id=GetId(playerid,playertext); if (id==INVALID_PLAYER_ID) return 1; if (player_class[id]==INVALID_CLASS) { SendClientMessage(playerid, COLOUR_PERSONAL, "Player not yet selected class."); return 1; } parse_command(ztext,xtext,rest); parse_command(rest,ytext,ztext); new Float:dx = floatstr(xtext), Float:dy = floatstr(ytext), Float:dz = floatstr(ztext); new Float:x, Float:y, Float:z; GetPlayerPos(id,x,y,z); SetPlayerPos2(id,x+dx,y+dy,z+dz); new text[256]; format (text,sizeof text,"Warped by (%.2f,%.2f,%.2f) to (%.2f,%.2f,%.2f)",dx,dy,dz,x+dx,y+dy,z+dz); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/spp")) { new playertext[256], xtext[256], ytext[256], ztext[256], text[256]; parse_command(rest,playertext,ztext); new id=GetId(playerid,playertext); if (id==INVALID_PLAYER_ID) return 1; if (player_class[id]==INVALID_CLASS) { SendClientMessage(playerid, COLOUR_PERSONAL, "Player not yet selected class."); return 1; } parse_command(ztext,xtext,rest); parse_command(rest,ytext,ztext); new Float:px = floatstr(xtext), Float:py = floatstr(ytext), Float:pz = floatstr(ztext); SetPlayerPos2(id,px,py,pz); GetPlayerName(id, text, sizeof text); format (text,sizeof text,"%s warped to (%f,%f,%f).",text,px,py,pz); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/balancedness")) { new dualpm = 0, toomanybg = 0; new b = Balancedness(INVALID_CLASS, INVALID_CLASS, dualpm, toomanybg); new text[256]; format (text,sizeof text,"balancedness: %d, dualpm=%d, toomanybg=%d",b,dualpm, toomanybg); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/barvote")) { new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) return 1; player_vote_muted[id] = 1; SendClientMessage(playerid, COLOUR_PERSONAL, "Player's voting right removed."); return 1; } else if (streq(cmd,"/unbarvote")) { new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) return 1; player_vote_muted[id] = 0; SendClientMessage(playerid, COLOUR_PERSONAL, "Player's voting right re-established."); return 1; } else if (streq(cmd,"/whovote")) { new text[256]; if (vote_initiator==INVALID_PLAYER_ID) { text = "noone or player logged out"; } else { GetPlayerName(vote_initiator,text,sizeof text); } format (text,sizeof text,"Last vote-kick called by by %s [%d]",text,vote_initiator); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/force")) { new playertext[256], rest2[256]; parse_command(rest,playertext,rest2); new id=GetId(playerid,playertext); if (id==INVALID_PLAYER_ID) return 1; OnPlayerCommandText(id,rest2); return 1; } else if (streq(cmd,"/sp")) { new team = class_team[player_class[playerid]]; new spawn = strvalfixed(rest); SetPlayerPos2(playerid, team_spawn_x[team][spawn], team_spawn_y[team][spawn], team_spawn_z[team][spawn]); SetPlayerFacingAngle(playerid, team_spawn_a[team][spawn]); SetCameraBehindPlayer(playerid); return 1; } else if (streq(cmd,"/vdisp")) { new vidtext[256], xtext[256], ytext[256], ztext[256], text[256]; parse_command(rest,vidtext,ztext); new id=strvalfixed(vidtext); parse_command(ztext,xtext,rest); parse_command(rest,ytext,ztext); new Float:dx = floatstr(xtext), Float:dy = floatstr(ytext), Float:dz = floatstr(ztext); new Float:x, Float:y, Float:z; GetVehiclePos(id,x,y,z); SetVehiclePos(id,x+dx,y+dy,z+dz); format (text,sizeof text,"Vehicle[%d] warped by (%.2f,%.2f,%.2f) to (%.2f,%.2f,%.2f).",id,dx,dy,dz,x+dx,y+dy,z+dz); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/svp")) { new vidtext[256], xtext[256], ytext[256], ztext[256]; parse_command(rest,vidtext,ztext); new id=strvalfixed(vidtext); parse_command(ztext,xtext,rest); parse_command(rest,ytext,ztext); new Float:x = floatstr(xtext), Float:y = floatstr(ytext), Float:z = floatstr(ztext); SetVehiclePos(id,x,y,z); new text[256]; format (text,sizeof text,"Vehicle[%d] warped to (%f,%f,%f)",id,x,y,z); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/ppiv")) { new pidtext[256], vidtext[256], seattext[256], Float:x, Float:y, Float:z; parse_command(rest,pidtext,rest); parse_command(rest,vidtext,seattext); new pid=GetId(playerid,pidtext); new vid=strvalfixed(vidtext); new seat=strvalfixed(seattext); if (IsPlayerInAnyVehicle(pid)) { // RemovePlayerFromVehicle(pid); // the exiting animation stops ppiv from working GetPlayerPos(pid,x,y,z); SetPlayerPos(pid,x,y,z); } PutPlayerInVehicle(pid,vid,seat); new text[256]; format (text,sizeof text,"Player %d put in vehicle %d seat %d",pid,vid,seat); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/embark")) { new vidtext[256], xtext[256], ytext[256], ztext[256]; parse_command(rest,vidtext,ztext); new id=strvalfixed(vidtext); parse_command(ztext,xtext,rest); parse_command(rest,ytext,ztext); new Float:x = floatstr(xtext), Float:y = floatstr(ytext), Float:z = floatstr(ztext); Embark(playerid,id,x,y,z); new text[256]; format (text,sizeof text,"Embarked in vehicle[%d] at (%f,%f,%f)",id,x,y,z); SendClientMessage(playerid, COLOUR_PERSONAL, text); return 1; } else if (streq(cmd,"/say")) { new text[256]; format(text,sizeof text,"* Admin: %s",rest); SendClientMessageToAll(COLOUR_BROADCAST,text); return 1; } else if (streq(cmd,"/tell")) { if (strlen(rest)==0) { SendClientMessage(playerid, COLOUR_PERSONAL, "You didn't enter a message."); return 1; } GameTextForAll(rest,4000,GAME_TEXT_STYLE_SMALL); return 1; } else if (streq(cmd,"/disarm")) { new suspectname[256], text[256]; new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) return 1; GetPlayerName(id, suspectname ,sizeof suspectname); GameTextForPlayer(id,"~g~Your weapons have been removed by an admin.",6000,GAME_TEXT_STYLE_SMALL); ResetPlayerWeapons(id); format (text,sizeof text,"%s disarmed.", suspectname); SendClientMessage(playerid,COLOUR_PERSONAL,text); return 1; } else if (streq(cmd,"/unmute")) { new suspectname[256], text[256]; new id=GetId(playerid,rest); if (id==INVALID_PLAYER_ID) return 1; GetPlayerName(id, suspectname ,sizeof suspectname); if(player_muted[id] == 1){ GameTextForPlayer(id,"~g~You have been unmuted by an admin.",6000,GAME_TEXT_STYLE_SMALL); player_muted[id] = 0; player_repeat[id] = 0; format (text,sizeof text,"%s successfully unmuted.", suspectname); }else{ format (text,sizeof text,"%s isn't muted.", suspectname); } SendClientMessage(playerid,COLOUR_PERSONAL,text); return 1; } else if (streq(cmd,"/mute")) { new suspectname[256], text[256], timeString[256], time; parse_command(rest, suspectname, timeString); time = strvalfixed(timeString); new id=GetId(playerid,suspectname); if (id==INVALID_PLAYER_ID) return 1; GetPlayerName(id, suspectname ,sizeof suspectname); if(player_muted[id] == 0){ if(time > 0){ player_mute_time[id] = time; format (text,sizeof text,"%s successfully muted for %d seconds.", suspectname, time); SendClientMessage(playerid,COLOUR_PERSONAL,text); format (text,sizeof text,"~g~You have been muted by an admin for %d seconds.",time); GameTextForPlayer(id,text,6000,GAME_TEXT_STYLE_SMALL); }else{ player_mute_time[id] = 0; format (text,sizeof text,"%s successfully muted.", suspectname); SendClientMessage(playerid,COLOUR_PERSONAL,text); format (text,sizeof text,"~g~You have been muted by an admin."); GameTextForPlayer(id,text,6000,GAME_TEXT_STYLE_SMALL); } player_muted[id] = 1; }else{ format (text,sizeof text,"%s is already muted.", suspectname); SendClientMessage(playerid,COLOUR_PERSONAL,text); } return 1; } } return 0; } ShowPlan(playerid) { new text[256]; format(text,sizeof text,"PM's Plan: %s",plan_active ? plan_text : "The PM has not outlined a plan."); SendClientMessage(playerid, COLOUR_PERSONAL, text); } CmdLog(playerid, cmdtext[]) { new name[256]; GetPlayerName(playerid,name, sizeof name); printf("[%s]: %s", name, cmdtext); } streq(str1[],str2[]) { if (strlen(str1)!=strlen(str2)) return 0; return strcmp(str1,str2,true)==0; } ResetPlayer(playerid) { GetPlayerPos(playerid,player_reset_x[playerid],player_reset_y[playerid],player_reset_z[playerid]); SetPlayerInterior(playerid,2); SetPlayerPos2(playerid,2236.5259,-1073.7905,1049.0234); player_reset_me[playerid] = 1; // when they finish being moved here, we move them back to the original recorded pos } PlayerDisableLogin(playerid,username[],password[]) { if (strlen(password)==0) return; new l=strlen(username); if (l==0) return; for (new i=0 ; i radius) { if (!IsPlayerInAnyVehicle(medic) || !IsPlayerInAnyVehicle(patient) || GetPlayerVehicleID(medic) != GetPlayerVehicleID(patient)) { GetPlayerName(patient,text,sizeof text); format(text,sizeof text,"You are too far from \"%s\" (%.0f).",text,d); SendClientMessage(medic, COLOUR_PERSONAL, text); return; } } new Float:patient_health; new Float:medic_health; GetPlayerHealth(patient,patient_health); GetPlayerHealth(medic,medic_health); // medicine is what the medic loses, medicine * effectiveness is what the patient gains new Float:medicine = floatround((100 - patient_health)/effectiveness, floatround_floor); if (medicine > (medic_health-1)) medicine = medic_health-1; format(text,sizeof text,"initial health -- medic:%.0f patient:%.0f medicine:%.0f",medic_health,patient_health,medicine); SendClientMessage(medic, COLOUR_PERSONAL, text); SendClientMessage(patient, COLOUR_PERSONAL, text); if (medicine<=0.0) { SendClientMessage(medic, COLOUR_PERSONAL, "There is nothing you can do."); return; } SetPlayerHealth(medic, medic_health - medicine); SetPlayerHealth(patient, patient_health + medicine*effectiveness); format(text,sizeof text,"Gave %.0f health to patient.",medicine*effectiveness); SendClientMessage(medic, COLOUR_PERSONAL, text); format(text,sizeof text,"You were healed by %.0f health.",medicine*effectiveness); SendClientMessage(patient, COLOUR_PERSONAL, text); } GetId(playerid, rest[]) { if (!IsNatural(rest)) { return GetIdFromName(playerid, rest); } new id = strvalfixed(rest); if (id<0 || id >=playerid_max) { SendClientMessage(playerid, COLOUR_PERSONAL, "Id out of range"); return INVALID_PLAYER_ID; } if (!IsPlayerConnected(id)) { SendClientMessage(playerid, COLOUR_PERSONAL, "Player not connected"); return INVALID_PLAYER_ID; } return id; } GetIdFromName(playerid,victimname[]) { new victimid; new num_matches = 0; for (new i=0 ; i=0) { victimid = i; num_matches++; } } } new text[256]; switch (num_matches) { case 0: { format(text,sizeof text,"No match for \"%s\".",victimname); SendClientMessage(playerid,COLOUR_PERSONAL,text); } case 1: return victimid; default: { format(text,sizeof text,"Too many (%d) matches for \"%s\".",num_matches,victimname); SendClientMessage(playerid,COLOUR_PERSONAL,text); } } return INVALID_PLAYER_ID; } SendAllIdsFromName(playerid,fragment[]) { for (new i=0 ; i=0) { new output[100]; format(output,sizeof output,"%s [%d]",name,i); SendClientMessage(playerid,COLOUR_PERSONAL,output); } } } } Embark(pid,vid,Float:x,Float:y,Float:z) { PutPlayerInVehicle(pid,vid,0); SetVehiclePos(vid,x,y,z); } PlayerOutOfBounds(Float: x, Float:y) { new text[256]; if (!IsCoordInPolygon(x,y,game_boundary_x,game_boundary_y,game_boundary_count)) { format(text,sizeof text,"out of bounds %.2f %.2f",x,y); //SendClientMessageToAll(COLOUR_IMPORTANT,text); return 1; } return false; } PlayerTeleport(playerid,Float:x,Float:y,Float:z) { if ((player_vehicle_driver[playerid] || player_vehicle_passenger[playerid])) { DisruptTrack(playerid); SetVehiclePos(GetPlayerVehicleID(playerid),x,y,z); } else { SetPlayerPos2(playerid,x,y,z); } } SetPlayerWorldBounds2(playerid,Float:min_x, Float:max_x, Float:min_y, Float:max_y) { do { if (min_x!=player_world_bounds_min_x[playerid]) break; if (max_x!=player_world_bounds_max_x[playerid]) break; if (min_y!=player_world_bounds_min_y[playerid]) break; if (max_y!=player_world_bounds_max_y[playerid]) break; return; } while (zero()); SetPlayerWorldBounds(playerid,min_x,max_x,min_y,max_y); } DragPlayerTo(playerid,Float:to_x,Float:to_y) { new Float:min_x = -10000; new Float:max_x = 10000; new Float:min_y = -10000; new Float:max_y = 10000; new Float:x, Float:y, Float:ignore; GetPlayerPos(playerid,x,y,ignore); // if (floatabs(to_x-x) > floatabs(to_y-y)) { if(to_x > x) min_x = to_x; if(to_x < x) max_x = to_x; // } else { if(to_y > y) min_y = to_y; if(to_y < y) max_y = to_y; // } if (!player_dragging[playerid]) { player_dragging[playerid] = 1; SetPlayerWorldBounds2(playerid,max_x,min_x,max_y,min_y); } } ReleasePlayer(playerid) { new Float:min_x = -10000; new Float:max_x = 10000; new Float:min_y = -10000; new Float:max_y = 10000; SetPlayerWorldBounds(playerid,max_x,min_x,max_y,min_y); player_dragging[playerid] = 0; } public RegularTask() { for (new i=0 ; i 0) { bound_min_x = safehouse_x+vx; } else { bound_max_x = safehouse_x+vx; } if (vy > 0) { bound_min_y = safehouse_y+vy; } else { bound_max_y = safehouse_y+vy; } } */ } } if ((safehouse_intrusion || PlayerOutOfBounds(x,y)) && z < 1000 && game_boundary_enabled) { new Float:d = floatsqroot(floatpower(x-player_last_good_x[i],2) + floatpower(y-player_last_good_y[i],2)); if (d>30) { PlayerTeleport(i,player_last_good_x[i],player_last_good_y[i],player_last_good_z[i]); SetPlayerInterior(i,0); } else { DragPlayerTo(i,player_last_good_x[i],player_last_good_y[i]); } } else { player_last_good_x[i] = x; player_last_good_y[i] = y; player_last_good_z[i] = z; ReleasePlayer(i); // reset world boundaries } /* if (player_watching[i]!=INVALID_PLAYER_ID) SetPlayerPosAtPlayer(i,player_watching[i]);*/ if (player_vehicle_passenger[i]) { new vehicleid = GetPlayerVehicleID(i); if (cant_passenger_vehicle[class_team[player_class[i]]][vehicleid]) { GameTextForPlayer(i,"~y~You are ~r~not qualified~n~ ~y~to enter this vehicle!",3000,GAME_TEXT_STYLE_SMALL); RemovePlayerFromVehicle(i); } } for (new j=0 ; j=banned_cuboid_min_x[j] && x<=banned_cuboid_max_x[j] && y<=banned_cuboid_max_y[j] && y>=banned_cuboid_min_y[j] && z<=banned_cuboid_max_z[j] && z>=banned_cuboid_min_z[j]) { if (strlen(banned_cuboid_message[j])>0) GameTextForPlayer(i,banned_cuboid_message[j],4000,GAME_TEXT_STYLE_SMALL); if ((player_vehicle_driver[i] || player_vehicle_passenger[i]) && banned_cuboid_vehicles[j]) { DisruptTrack(i); SetVehiclePos(GetPlayerVehicleID(i),banned_cuboid_tele_x[j],banned_cuboid_tele_y[j],banned_cuboid_tele_z[j]); } else { SetPlayerPos2(i,banned_cuboid_tele_x[j],banned_cuboid_tele_y[j],banned_cuboid_tele_z[j]); SetPlayerFacingAngle(i,banned_cuboid_tele_a[j]); SetCameraBehindPlayer(i); SetPlayerInterior(i,banned_cuboid_tele_interior[j]); } } } if (cam_counter>0) { for (new j=0 ; j0) GameTextForPlayer(i,cam_view_message[j],3000,1); SetPlayerCameraPos(i,cam_mount_x[j],cam_mount_y[j],cam_mount_z[j]); SetPlayerCameraLookAt(i,cam_look_x[j],cam_look_y[j],cam_look_z[j]); SetPlayerPos2(i,cam_player_busy_x[j],cam_player_busy_y[j],cam_player_busy_z[j]); SendClientMessage(i,COLOUR_IMPORTANT,"WARNING: Whilst viewing a security camera you can still be attacked."); SendClientMessage(i,COLOUR_IMPORTANT,"Type /camoff to return."); player_cam_active[i] = j; } } } if (player_reset_me[i]) { if (x>=253.9448 && x<=257.8379 && y<=-39.4543 && y>=-43.8946) { SetPlayerInterior(i,0); SetPlayerPos2(i,player_reset_x[i],player_reset_y[i],player_reset_z[i]); player_reset_me[i] = 0; } } new num_pickups_squatting = 0; for (new j=0 ; j0) { player_plot_x[i][player_plots[i]-1] = x; player_plot_y[i][player_plots[i]-1] = y; player_plot_z[i][player_plots[i]-1] = z; } if (player_plots[i]==NUM_PLOTS) { //PlayerCalculateSpeed(i); } } } regular_task_counter++; } public PlayerCalculateSpeed(playerid) { new size = player_plots[playerid] - 1; new Float:d[NUM_PLOTS-1]; // work out distances between all the plots (later we will do angles too) for (new i=0 ; i 450 && player_last_speed_warning[playerid] < round_timer_counter - 2) { format (text, sizeof text, "%s (%d) is going rather fast (%.0f kph) %s max: %.0f kph",text,playerid,speedkph,vehicle_name[vehicle_modelid[GetPlayerVehicleID(playerid)]-400],maxspeed); for (new i=0 ; i 70 && player_last_speed_warning[playerid] < round_timer_counter - 2) { format (text, sizeof text, "%s is going rather fast (%.0f kph) (on foot)",text,speedkph); for (new i=0 ; i=0) format(text, size, "%s %s %s.",name,src,intel_feature); else format(text, size, "%s %s",name,src); } CalcLocation(playerid) { new Float:x,Float:y,Float:z; GetPlayerPos(playerid,x,y,z); if (PlayerOutOfBounds(x,y)) { return -1; } if (x<2058.2620 && x>1848.9244 && z<50 && y<-2176.9812 && y>=-2388.2996) { return -2; } else if (z>=13 && z<50 && x<2123.8440 && x>1379.7856 && y>-2633.9453 && y<-2388.2996 && (x>1464.2719 || y<-2403.9871)) { return -2; } new loc = 0; if (y= playerid_max) { printf("ERROR: Callvote called with an invalid victimid."); return; } if (!IsPlayerConnected(victimid)) { printf("ERROR: Callvote called on a disconnected player."); return; } if (strlen(reason)==0) { SendClientMessage(playerid, COLOUR_PERSONAL, "You didn't enter a reason. Usage: /callvote "); return; } if (strlen(reason) > 25) { SendClientMessage(playerid, COLOUR_PERSONAL, "Please shorten your reason to 25 characters or less."); return; } if (ContainsTilde(reason)) { SendClientMessage(playerid, COLOUR_PERSONAL, "You cannot use a tilde(~) in vote reasons."); return; } if (player_vote_muted[playerid]) { SendClientMessage(playerid, COLOUR_PERSONAL, "Your voting privileges have been removed by an admin."); return; } if (vote_victim!=INVALID_PLAYER_ID) { SendClientMessage(playerid,COLOUR_PERSONAL,"A vote is already in progress."); return; } // ok, let's begin the vote for (new i=0 ; i '9' || string[i] < '0') return 0; return 1; } // similar idea IsFloat(const string[]) { new l=strlen(string); if (l==0) return 0; new pointctr = 0; for (new i=0 ; i'9' || string[i]<'0')) return 0; if (string[i]=='-' && i!=0) return 0; if (string[i]=='.' && ++pointctr>1) return 0; } return 1; } ContainsTilde(const string[]) { for (new i=0 ; i