Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* PEN:CroHerze /*
- Gamemode by:
- ZeeX,
- Zoran(Zerocoolos)
- Mapper's:
- M15hk0,
- Sebo_,
- ZeeX
- /* */
- /* INCLUDE-ovi */
- #include <a_samp>
- #include <core>
- #include <float>
- #include <time>
- #include <file>
- #include <streamer>
- #include <morphinc>
- #include <utils>
- #include <foreach>
- #include <MidoStream>
- static gTeam[MAX_PLAYERS];
- /* DEFINE-ovi */
- #define GPSF SendClientMessage
- #define SPG ShowPlayerDialog
- #define fGPS 500
- #define Fear 0xDB023EFF
- #define dialogv 9344
- #define VEHICLE_PARAMS_UNSET -1 //Ovo postavljate ako Korisstite prams
- #define VEHICLE_PARAMS_OFF 0 //Ovo postavljate kada su vasi pramsi ugaseni
- #define VEHICLE_PARAMS_ON 1 //Ovo postavljate kada su vasi pramsi upaljeni
- new engine,lights,alarm,doors,bonnet,boot,objective;
- #define CHECKPOINT_NONE 0
- #define CHECKPOINT_PICKUP 1
- #define CHECKPOINT_DROPOFF 2
- #define CHECKPOINT_SR1START 3
- #define CHECKPOINT_SRA 4
- #define CHECKPOINT_SRB 5
- #define CHECKPOINT_SRC 6
- #define CHECKPOINT_SRD 7
- #define CHECKPOINT_SRE 8
- #define CHECKPOINT_SRF 9
- #define CHECKPOINT_SRG 10
- #define CHECKPOINT_CARDROP 11
- #define CHECKPOINT_HOME 12
- #define CHECKPOINT_DM 13
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xFF6347AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- #define COLOR_PURPLE 0xC2A2DAAA
- #define COLOR_DBLUE 0x2641FEAA
- #define COLOR_ALLDEPT 0xFF8282AA
- #define TEAM_CYAN 1
- #define TEAM_BLUE 2
- #define TEAM_GREEN 3
- #define TEAM_ORANGE 4
- #define TEAM_BALLAS 5
- #define TEAM_GROVE 6
- #define TEAM_VAGOS 7
- #define TEAM_AZTECAS 8
- #define TEAM_NANG 9
- #define TEAM_RIFA 78
- #define TEAM_MAFIA 11
- #define TEAM_RMAFIA 12
- #define TEAM_TRIADS 13
- #define TEAM_BIKERS 14
- #define OBJECTIVE_COLOR 0x64000064
- #define TEAM_GREEN_COLOR 0xFFFFFFAA
- #define TEAM_BLUE_COLOR 0x8D8DFFAA
- #define COLOR_ADD 0x63FF60AA
- #define TEAM_CYAN_COLOR 0xFF8282AA
- #define TEAM_ORANGE_COLOR 0xFF8300C8
- #define TEAM_ORANGE1_COLOR 0xFF830099
- #define TEAM_ORANGE2_COLOR 0xFF830088
- #define TEAM_ORANGE3_COLOR 0xFF830077
- #define TEAM_ORANGE4_COLOR 0xFF830066
- #define TEAM_ORANGE5_COLOR 0xFF830055
- #define TEAM_ORANGE6_COLOR 0xFF830044
- #define TEAM_ORANGE7_COLOR 0xFF830033
- #define TEAM_ORANGE8_COLOR 0xFF830022
- #define TEAM_ORANGE9_COLOR 0xFF830011
- #define TEAM_ORANGE10_COLOR 0xFF830000
- #define TEAM_BALLAS_COLOR 0xD900D3C8
- #define TEAM_BALLAS1_COLOR 0xD900D399
- #define TEAM_BALLAS2_COLOR 0xD900D388
- #define TEAM_BALLAS3_COLOR 0xD900D377
- #define TEAM_BALLAS4_COLOR 0xD900D366
- #define TEAM_BALLAS5_COLOR 0xD900D355
- #define TEAM_BALLAS6_COLOR 0xD900D344
- #define TEAM_BALLAS7_COLOR 0xD900D333
- #define TEAM_BALLAS8_COLOR 0xD900D322
- #define TEAM_BALLAS9_COLOR 0xD900D311
- #define TEAM_BALLAS10_COLOR 0xD900D300
- #define TEAM_GROVE_COLOR 0x00D900C8
- #define TEAM_GROVE1_COLOR 0x00D90099
- #define TEAM_GROVE2_COLOR 0x00D90088
- #define TEAM_GROVE3_COLOR 0x00D90077
- #define TEAM_GROVE4_COLOR 0x00D90066
- #define TEAM_GROVE5_COLOR 0x00D90055
- #define TEAM_GROVE6_COLOR 0x00D90044
- #define TEAM_GROVE7_COLOR 0x00D90033
- #define TEAM_GROVE8_COLOR 0x00D90022
- #define TEAM_GROVE9_COLOR 0x00D90011
- #define TEAM_GROVE10_COLOR 0x00D90000
- #define TEAM_VAGOS_COLOR 0xFFC801C8
- #define TEAM_VAGOS1_COLOR 0xFFC80199
- #define TEAM_VAGOS2_COLOR 0xFFC80188
- #define TEAM_VAGOS3_COLOR 0xFFC80177
- #define TEAM_VAGOS4_COLOR 0xFFC80166
- #define TEAM_VAGOS5_COLOR 0xFFC80155
- #define TEAM_VAGOS6_COLOR 0xFFC80144
- #define TEAM_VAGOS7_COLOR 0xFFC80133
- #define TEAM_VAGOS8_COLOR 0xFFC80122
- #define TEAM_VAGOS9_COLOR 0xFFC80111
- #define TEAM_VAGOS10_COLOR 0xFFC80100
- #define TEAM_AZTECAS_COLOR 0x01FCFFC8
- #define TEAM_AZTECAS1_COLOR 0x01FCFF99
- #define TEAM_AZTECAS2_COLOR 0x01FCFF88
- #define TEAM_AZTECAS3_COLOR 0x01FCFF77
- #define TEAM_AZTECAS4_COLOR 0x01FCFF66
- #define TEAM_AZTECAS5_COLOR 0x01FCFF55
- #define TEAM_AZTECAS6_COLOR 0x01FCFF44
- #define TEAM_AZTECAS7_COLOR 0x01FCFF33
- #define TEAM_AZTECAS8_COLOR 0x01FCFF22
- #define TEAM_AZTECAS9_COLOR 0x01FCFF11
- #define TEAM_AZTECAS10_COLOR 0x01FCFF00
- #define COLOR_ONE 0xFF444499
- #define COLOR_TWO 0xFFFF22AA
- #define COLOR_THREE 0xFFCC2299
- #define TEAM_NANG_COLOR 0xBDCB92C8
- #define TEAM_NANG1_COLOR 0xBDCB9299
- #define TEAM_NANG2_COLOR 0xBDCB9288
- #define TEAM_NANG3_COLOR 0xBDCB9277
- #define TEAM_NANG4_COLOR 0xBDCB9266
- #define TEAM_NANG5_COLOR 0xBDCB9255
- #define TEAM_NANG6_COLOR 0xBDCB9244
- #define TEAM_NANG7_COLOR 0xBDCB9233
- #define TEAM_NANG8_COLOR 0xBDCB9222
- #define TEAM_NANG9_COLOR 0xBDCB9211
- #define TEAM_NANG10_COLOR 0xBDCB9200
- #define TEAM_RIFA_COLOR 0x000000C8
- #define TEAM_RIFA1_COLOR 0x00000099
- #define TEAM_RIFA2_COLOR 0x00000088
- #define TEAM_RIFA3_COLOR 0x00000077
- #define TEAM_RIFA4_COLOR 0x00000066
- #define TEAM_RIFA5_COLOR 0x00000055
- #define TEAM_RIFA6_COLOR 0x00000044
- #define TEAM_RIFA7_COLOR 0x00000033
- #define TEAM_RIFA8_COLOR 0x00000044
- #define TEAM_RIFA9_COLOR 0x00000055
- #define TEAM_RIFA10_COLOR 0x00000066
- #define TEAM_MAFIA_COLOR 0x9A9999C8
- #define TEAM_MAFIA1_COLOR 0x9A999999
- #define TEAM_MAFIA2_COLOR 0x9A999988
- #define TEAM_MAFIA3_COLOR 0x9A999977
- #define TEAM_MAFIA4_COLOR 0x9A999966
- #define TEAM_MAFIA5_COLOR 0x9A999955
- #define TEAM_MAFIA6_COLOR 0x9A999944
- #define TEAM_MAFIA7_COLOR 0x9A999933
- #define TEAM_MAFIA8_COLOR 0x9A999922
- #define TEAM_MAFIA9_COLOR 0x9A999911
- #define TEAM_MAFIA10_COLOR 0x9A999900
- #define TEAM_RMAFIA_COLOR 0x916600C8
- #define TEAM_RMAFIA1_COLOR 0x91660099
- #define TEAM_RMAFIA2_COLOR 0x91660088
- #define TEAM_RMAFIA3_COLOR 0x91660077
- #define TEAM_RMAFIA4_COLOR 0x91660066
- #define TEAM_RMAFIA5_COLOR 0x91660055
- #define TEAM_RMAFIA6_COLOR 0x91660044
- #define TEAM_RMAFIA7_COLOR 0x91660033
- #define TEAM_RMAFIA8_COLOR 0x91660022
- #define TEAM_RMAFIA9_COLOR 0x91660011
- #define TEAM_RMAFIA10_COLOR 0x91660000
- #define TEAM_TRIADS_COLOR 0x587B95C8
- #define TEAM_TRIADS1_COLOR 0x587B9599
- #define TEAM_TRIADS2_COLOR 0x587B9588
- #define TEAM_TRIADS3_COLOR 0x587B9577
- #define TEAM_TRIADS4_COLOR 0x587B9566
- #define TEAM_TRIADS5_COLOR 0x587B9555
- #define TEAM_TRIADS6_COLOR 0x587B9544
- #define TEAM_TRIADS7_COLOR 0x587B9533
- #define TEAM_TRIADS8_COLOR 0x587B9522
- #define TEAM_TRIADS9_COLOR 0x587B9511
- #define TEAM_TRIADS10_COLOR 0x587B9500
- #define TEAM_BIKERS_COLOR 0xA49A00C8
- #define TEAM_BIKERS1_COLOR 0xA49A0099
- #define TEAM_BIKERS2_COLOR 0xA49A0088
- #define TEAM_BIKERS3_COLOR 0xA49A0077
- #define TEAM_BIKERS4_COLOR 0xA49A0066
- #define TEAM_BIKERS5_COLOR 0xA49A0055
- #define TEAM_BIKERS6_COLOR 0xA49A0044
- #define TEAM_BIKERS7_COLOR 0xA49A0033
- #define TEAM_BIKERS8_COLOR 0xA49A0022
- #define TEAM_BIKERS9_COLOR 0xA49A0011
- #define TEAM_BIKERS10_COLOR 0xA49A0000
- #define ADMIN_SPEC_TYPE_NONE 0
- #define ADMIN_SPEC_TYPE_PLAYER 1
- #define ADMIN_SPEC_TYPE_VEHICLE 2
- #define COLOR_RED 0xAA3333AA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_orange 0xFF9900AA
- #define COLOR_LIME 0x10F441AA
- #define COLOR_MAGENTA 0xFF00FFFF
- #define COLOR_NAVY 0x000080AA
- #define COLOR_AQUA 0xF0F8FFAA
- #define COLOR_CRIMSON 0xDC143CAA
- #define COLOR_FLBLUE 0x6495EDAA
- #define COLOR_BISQUE 0xFFE4C4AA
- #define COLOR_BLACK 0x000000AA
- #define COLOR_CHARTREUSE 0x7FFF00AA
- #define COLOR_BROWN 0xA52A2AAA
- #define COLOR_CORAL 0xFF7F50AA
- #define COLOR_GOLD 0xB8860BAA
- #define COLOR_GREENYELLOW 0xADFF2FAA
- #define COLOR_INDIGO 0x4B00B0AA
- #define COLOR_IVORY 0xFFFF82AA
- #define COLOR_LAWNGREEN 0x7CFC00AA
- #define COLOR_LIMEGREEN 0x32CD32AA
- #define COLOR_MIDNIGHTBLUE 0x191970AA
- #define COLOR_MAROON 0x800000AA
- #define COLOR_OLIVE 0x808000AA
- #define COLOR_ORANGERED 0xFF4500AA
- #define COLOR_PINK 0xFFC0CBAA
- #define COLOR_SPRINGGREEN 0x00FF7FAA
- #define COLOR_TOMATO 0xFF6347AA
- #define COLOR_YELLOWGREEN 0x9ACD32AA
- #define COLOR_MEDIUMAQUA 0x83BFBFAA
- #define COLOR_MEDIUMMAGENTA 0x8B008BAA
- #define COLOR_BRIGHTRED 0xDC143CAA
- #define COLOR_SYSTEM 0xEFEFF7AA
- #define COLOR_BM 0x91FF22FF
- #define COLOR_GM 0x26FC07FF
- #define COLOR_RM 0xF4F400FF
- #define COLOR_FA 0x1768FFFF
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_LIGHTRED 0xFF6347AA
- #define COLOR_INVIS 0xAFAFAF00
- #define COLOR_SPEC 0xBFC0C200
- #define INACTIVE_PLAYER_ID 255
- #define CAR_AMOUNT 700 //Change to Your Vehicle Amount
- #define MAS 0xAA3333AA
- #define MATTMSG SendClientMessage
- #define SCM SendClientMessage
- #define SPD ShowPlayerDialog
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_YELLOW 0xFFFF00AA
- #define Price_Knife 120
- #define Price_BaseBall 170
- #define Price_Katana 260
- #define Price_Greneade 300
- #define Price_9mm 320
- #define Price_sdpistol 330
- #define Price_Deagle 660
- #define Price_Shotgun 1000
- #define Price_ShawnOff 3200
- #define Price_spaz12 12000
- #define Price_Uzi 1700
- #define Price_mp5 1950
- #define Price_ak47 17000
- #define Price_m4 16000
- #define Price_Tec9 2200
- #define Price_Rifle 5000
- #define Price_Sniper 20000
- /* FORWARD-ovi */
- forward OnPlayerUpdate(playerid);
- forward SetPlayerUnMute();
- forward One();
- forward Two();
- forward Three();
- forward Go();
- forward CountdownSpam();
- forward DollahScoreUpdate();
- forward WebSite();
- forward BanLog(string[]);
- forward SetPlayerRandomSpawn(playerid);
- forward SetPlayerNewMission();
- forward SetPlayerToTeamColor(playerid);
- forward SetupPlayerForClassSelection(playerid);
- forward SetPlayerTeamFromClass(playerid,classid);
- forward GameModeExitFunc();
- forward GameModeInitExitFunc();
- forward PrePlayerNewMission();
- forward SetPlayerNewMission();
- forward RaceDelay();
- forward RaceDelayr();
- forward RaceDelayg();
- forward OnPlayerDropCashBox(playerid);
- forward RewardCalc(playerid,min,max);
- forward CheckpointReset();
- forward SetAllPlayerCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num);
- forward SetAllCopCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi);
- forward OpenDoors();
- forward SetPlayerCriminal(playerid,declare,reason[],pe,flash);
- forward SetPlayerFree(playerid,declare,reason[],pe,flash);
- forward OffTheHook();
- forward SetPlayerWeapons(playerid);
- forward PrintPlayerWeapons(playerid,targetid);
- forward PrintPlayerprovjeri(playerid,targetid);
- forward GameModeInitExitFunc();
- forward LoadConfig();
- forward GetVal(string[]);
- forward SyncUp();
- forward SyncTime();
- forward PayDay();
- forward OnPlayerLogin(playerid,password[]);
- forward OnPlayerRegister(playerid, password[]);
- forward OnUpdatePlayer(playerid);
- forward BroadCast(color,const string[]);
- forward OOCOff(color,const string[]);
- forward PlaySoundAll(playerid, soundid, Float:psx ,Float:psy ,Float:psz);
- forward SendTeamMessage(team, color, string[]);
- forward SendAdminMessage(color, string[]);
- forward PlayerPlayMusic(playerid);
- forward StopMusic();
- forward Encript(string[]);
- forward Decript(string[]);
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
- forward ProxDetectorS(Float:radi, playerid, targetid);
- forward FixHour(hour);
- forward TestDistance(playerid,giveplayerid,Float:tarx,Float:tary,Float:tarz,Float:radi);
- forward PlayJailSound(sound , stopsound, duration, Float: jailx, Float: jaily, Float: jailz);
- forward GameTicks();
- forward ConvertTicks(ticks);
- forward CopScanner();
- forward Spectator();
- forward IsAPlane(carid);
- forward IsACopCar(carid);
- forward IsAnAmbulance(carid);
- forward IsATruck(carid);
- forward ClearCrime(playerid);
- forward BetWinner(playerid,contest);
- forward PayLog(string[]);
- forward CmdLog(string[]);
- forward RaceDebug(playerid);
- forward RaceEnd();
- forward DMDelay();
- forward DMDelayr();
- forward DMDelayg();
- forward DMDetect();
- forward DMEndCam(playerid,string[]);
- forward DMScoreCalc();
- forward JobGive(playerid);
- forward HireCost(carid);
- forward CarCheck();
- forward CarInit();
- forward CarTow(carid);
- forward CarRespawn(carid);
- forward LockCar(carid);
- forward UnLockCar(carid);
- forward TeamCarLockInit();
- forward TeamLockReset(carid);
- forward InitLockDoors(playerid);
- forward TeamLockDoors(playerid);
- forward DebugPrint(string[],value1,value2,type);
- forward CellPhoneTimer();
- forward SetPlayerFlash();
- forward SetPlayerFlashRev ();
- forward RingToner();
- forward RingTonerRev();
- forward SetPlayerUnjail();
- forward VoteKickTimer();
- forward ClearVote(kickedid);
- forward PrintSBizInfo(playerid,targetid);
- forward PrintBizInfo(playerid,targetid);
- forward SetPlayerToTeamColorFlash(playerid);
- forward SaveRace(playerid,name[]);
- forward BestTime(name[]);
- forward LoadTmp();
- forward LoadRace(playerid,name[]);
- forward LoadProperty ();
- forward LoadDM(playerid,name[]);
- forward SaveDM(playerid,name[]);
- forward LoadRaceList(playerid,name[]);
- forward SaveRaceList(playerid,name[]);
- forward LoadBizz();
- forward LoadSBizz();
- forward SkyDive();
- forward Production();
- forward DateProp(playerid);
- forward Checkprop();
- forward DelPrint(string1[]);
- forward LoadPlayer(loaderid,const string[]);
- forward SavePlayer(loaderid,const string[]);
- forward ini_GetKey(line[]);
- forward ini_GetValue(line[]);
- forward CopCheck(playerid);
- forward MedCheck(playerid);
- forward OnPlayerRename (name[],string[],playerid);
- forward OnPropUpdate();
- forward ABroadCast(color,const string[],level);
- forward SendTeamBeepMessage(team, color, string[]);
- forward SendEnemyMessage(color, string[]);
- forward PlayerFixRadio(playerid);
- forward PlayerFixRadio2(playerid);
- forward StopJail();
- forward HouseLevel(playerid);
- forward CHouseLevel(houseid);
- forward CrimInRange(Float:radi, playerid,copid);
- forward CrimProxDetector(Float:radi, playerid,col1,col2,col3,col4,col5,col6,col7,col8,col9,col10);
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- forward PlayerInArea();
- forward PlayerInArena();
- forward SendRadioMessage(member, color, string[]);
- forward PenInArea();
- forward CustomPickups();
- forward IdleKick();
- forward AntiCamp();
- forward AntiTeleport ();
- forward RaceSpec(playerid);
- forward BestPlayer(playerid);
- forward PenDelay(playerid);
- forward SpeedDelay(playerid);
- forward DMPlayer(playerid);
- forward InHouse();
- forward IsStringAName(string[]);
- forward GetPlayerID(string[]);
- forward SetCamBack(playerid);
- forward InfiniteLife();
- forward AddsOn();
- forward SetAllPlayerRaceCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num);
- forward RaceCheckpointReset();
- /* NEW-ovi */
- new gPlayerCheckpointStatus[MAX_PLAYERS];
- new SlowmotionPickup[MAX_PLAYERS];
- new GodTimer;
- new HidePM[MAX_PLAYERS];
- new BMK;
- new RMK;
- new GMK;
- new FAK;
- new bool:openclose[MAX_PLAYERS]=true;
- new bool:openclose1[MAX_PLAYERS]=false;
- new bool:openclose2[MAX_PLAYERS]=false;
- new bool:openclose3[MAX_PLAYERS]=false;
- new bool:openclose4[MAX_PLAYERS]=false;
- new God[MAX_PLAYERS];
- new gPlayerLapStatus[MAX_PLAYERS];
- new gPlayerLogged[MAX_PLAYERS];
- new gPlayerSpawned[MAX_PLAYERS];
- new gPlayerLogTries[MAX_PLAYERS];
- new gActivePlayers[MAX_PLAYERS];
- new Text:Textdraw0;
- new Text:Textdraw1;
- new Text:Textdraw2;
- new Event1;
- new Event2;
- new Event3;
- new Event4;
- new Event5;
- new Event6;
- new Event7;
- new Event8;
- new Event9;
- new AdminDuty[MAX_PLAYERS];
- new Text3D:label[MAX_PLAYERS];
- new Text3D:utisan[MAX_PLAYERS];
- new FA;
- new GM;
- new RUS;
- new BM;
- new unmutetimer;
- new gSpectateID[MAX_PLAYERS];
- new gSpectateType[MAX_PLAYERS];
- new specplayerid, idx;
- new RandomPoslovice[][] =
- {
- //---------------------------Narodne-----------------------------------------
- "{99CCDD}*Izreka dana: Ljudi se doèekuju prema odjeæi, a ispraæaju prema znanju.",
- "{99CCDD}*Izreka dana: Gvožðe se kuje dok je vruæe.",
- "{99CCDD}*Izreka dana: Bogat je onaj koji toliko posjeduje da ništa više ne želi.",
- "{99CCDD}*Izreka dana: Ljudi se najviše muèe zbog hljeba i ljubavi.",
- "{99CCDD}*Izreka dana: Ko ima silu uzima silom, ko nema silu uzima pameæu.",
- "{99CCDD}*Izreka dana: Ne obara se svako drvo prvim udarcem.",
- "{99CCDD}*Izreka dana: Onaj koji pita ispadne budala pet minuta, ali onaj koji ne pita ostane budala cijeli život.",
- "{99CCDD}*Izreka dana: U trenutku uspjeha ne zaboravljaj svoje neuspjehe.",
- "{99CCDD}*Izreka dana: Uèitelji otvaraju vrata, ali vi morate uæi sami.",
- "{99CCDD}*Izreka dana: Ko prestane biti prijatelj, prijatelj nikada nije ni bio.",
- "{99CCDD}*Izreka dana: Mudrac sve svoje sa sobom nosi.",
- "{99CCDD}*Izreka dana: Èesto cijeli grad mora platiti grijeh jednog zlobnika.",
- "{99CCDD}*Izreka dana: Èovjek je smrtan, ali njegovo ime može postati besmrtno.",
- "{99CCDD}*Izreka dana: Pametan èovjek naæi æe vodu i u pustinji, a budala æe kraj rijeke umrijeti od žeði.",
- "{99CCDD}*Izreka dana: Siromašan nema slobodnog vremena.",
- "{99CCDD}*Izreka dana: Velike nesreæe nastaju iz malih uzroka.",
- "{99CCDD}*Izreka dana: Onoga ko marljivo radi ni nebo ne može uèiniti prosjakom.",
- "{99CCDD}*Izreka dana: Boj ne bije zladano oružje, ved srce u junaka.",
- "{99CCDD}*Izreka dana: Blago onom ko ima prijatelje, teško onome ko ih treba.",
- "{99CCDD}*Izreka dana: Bolje je zdravom u sirotinji, nego li bogatom u bolesti.",
- "{99CCDD}*Izreka dana: Èovjek se mora u znoju kupati, da ne gleda iz tude ruke.",
- "{99CCDD}*Izreka dana: Pare kad odlaze imaju stotinu nogu, a kad dolaze samo dvije.",
- "{99CCDD}*Izreka dana: U složnu porodicu sreæa sama od sebe dolazi.",
- "{99CCDD}*Izreka dana: Vrana vrani oèi ne vadi.",
- //---------------------------Poznati---------------------------------
- "{99CCDD}*Izreka dana: Sreæu æete postiæi kad budete riješili da se za nju borite (Darvill).",
- "{99CCDD}*Izreka dana: Lakše je razbiti atom, nego predrasude (Albert Einstein).",
- "{99CCDD}*Izreka dana: Nijedno uže ne vuèe tako snažno i ne povezuje tako èvrsto kao tanka nit ljubavi (Robert Burton).",
- "{99CCDD}*Izreka dana: Lud je samo onaj èija se ludost ne poklapa s ludošæu veæine (S.Beckett).",
- "{99CCDD}*Izreka dana: Zivot poznaje samo jednu istinsku zabrinutost, a to je smrt (Dumas).",
- "{99CCDD}*Izreka dana: Uspjeh je samo stvar srece, pitaj koga god ko nije uspio (Earl Wilson)."
- };
- new gLastCar[301];
- new gOoc[MAX_PLAYERS];
- new BigEar[MAX_PLAYERS];
- new Spectate[MAX_PLAYERS];
- new FlashTime[MAX_PLAYERS];
- new CellTime[MAX_PLAYERS];
- new JailTime[MAX_PLAYERS];
- new StartTime[MAX_PLAYERS];
- new RaceTime[MAX_PLAYERS];
- new Contract[MAX_PLAYERS];
- new KickVote[MAX_PLAYERS];
- new VoteKick[MAX_PLAYERS];
- new LastVote[MAX_PLAYERS];
- new HireCar[MAX_PLAYERS];
- new SafeTime[MAX_PLAYERS];
- /*new HidePM[MAX_PLAYERS];*/
- new gDice[MAX_PLAYERS];
- new gSkyDive[MAX_PLAYERS];
- new gSpeedo[MAX_PLAYERS];
- new gSpentCash[MAX_PLAYERS];
- new FirstSpawn[MAX_PLAYERS];
- new gPlayerFighter[MAX_PLAYERS];
- new DmScore[MAX_PLAYERS];
- new LapCount[MAX_PLAYERS];
- new SwitchKey[MAX_PLAYERS];
- new TVMode[MAX_PLAYERS];
- new Fixr[MAX_PLAYERS];
- new Hidden[MAX_PLAYERS];
- new Locator[MAX_PLAYERS];
- new PLicence[MAX_PLAYERS];
- new DmHiScore;
- new DmHiPlayer = 255;
- new Speeder;
- new gFighters;
- new pos1time;
- new pos2time;
- new pos3time;
- new cmins,csecs,cmils;
- new Mobile[MAX_PLAYERS];
- new RingTone[MAX_PLAYERS];
- new CallCost[MAX_PLAYERS];
- new Mute[MAX_PLAYERS];
- new gPlayerAccount[MAX_PLAYERS];
- new gRaceGuy[MAX_PLAYERS];
- new gPlayerMission[MAX_PLAYERS];
- new gPhoneBook[MAX_PLAYERS];
- new gLastDriver[302];
- new gTeamCarLock[265];
- new gCarLock[265];
- new gPublicEnemy = INVALID_PLAYER_ID;
- new gSuperCop = INVALID_PLAYER_ID;
- new gRaceLeader;
- new gFightLeader;
- new gRaceFin;
- new gRaceMid;
- new gRaceMid2;
- new gRaceEnd;
- new LevScoreOld;
- new MissionActive;
- new DropOff;
- new noooc;
- new racelist = 1;
- new dmlist = 1;
- new automission = 1;
- new adds = 1;
- new addtimer = 60000;
- new raceendtimer;
- new dmweapon;
- new RetVal;
- new specflick;
- new Float:rx, Float:ry, Float:rz;
- new Float:cwx, Float:cwy, Float:cwz;
- new Float: scx, Float: scy, Float: scz;
- new Float:rsx, Float:rsy, Float:rsz;
- new Float:rmx, Float:rmy, Float:rmz;
- new Float:rm2x, Float:rm2y, Float:rm2z;
- new Float:rex, Float:rey, Float:rez;
- new Float: jailxt, Float: jailyt, Float: jailzt;
- new stopsoundt;
- new carselect[15];
- new objstore[128];
- new cbjstore[128];
- new motd[256];
- new CurrentRace[256];
- new stealcar = 0;
- new stealcardest = 0;
- new rccounter = 0;
- new racedelay = 60000;
- new RNext;
- new RNext2;
- new REnd;
- new Float:radardist = 1000.0;
- new radarfreq = 1000;
- new ghour = 0;
- new gminute = 0;
- new gsecond = 0;
- new reward = 0;
- new mediccharge = 1000;
- new preward = 0;
- new numplayers = 0;
- new dollah = 1000; // Amount player recieves on spawn.
- new realtime = 1;
- new wtime = 15;
- new hotwire = 1;
- new cashbox = 1;
- new streetrace = 1;
- new deathmatch = 1;
- new levelcost = 10000;
- new deathcost = 500;
- new paycheck = 10000;
- new jobdelay = 20000;
- new petime = 180000; //3 minuites
- new jailtime = 20000; //20 seconds
- new callcost = 10; //20 seconds
- new forceteam = 0;
- new realchat = 1;
- new fow = 1;
- new timeshift = 0;
- new stats = 0;
- new gdebug = 1;
- new shifthour;
- new synctimer;
- new newmistimer;
- new unjailtimer;
- new playertimer;
- new dmtimer;
- new cartimer;
- new lastkiller;
- new celltimer;
- new intrate = 1;
- new teamcarlock = 0;
- new levelexp = 2;
- new nocasino = 0;
- new idletime = 1800000; //30 mins
- new dmtime = 240; //4 mins
- new accountplay = 1;
- new civnokill =1;
- new basedcost = 1000;
- new suecost = 1000;
- new cchargetime = 10;
- new txtcost = 1;
- new offhook;
- new pickups;
- new randomrace = 0;
- new nocarcash = 0;
- new skydivecount = 60;
- new Gtickcount;
- new gLaps;
- new ChosenSkin[MAX_PLAYERS];
- new SelectChar[MAX_PLAYERS];
- new SelectCharID[MAX_PLAYERS];
- new SelectCharPlace[MAX_PLAYERS];
- new CIV[] = {7,19,20,23,73,101,122};
- new MedicBill[MAX_PLAYERS];
- new Float:ChangePos[MAX_PLAYERS][3];
- new ChangePos2[MAX_PLAYERS][2];
- new blockspam[MAX_PLAYERS];
- new Float:PlayerPos[MAX_PLAYERS][6];
- new Float:DmeCam[6];
- new Float:TeleportDest[MAX_PLAYERS][3];
- new Float:CarTracking[MAX_PLAYERS][4];
- new Float:TelePos[MAX_PLAYERS][6];
- new Float:PenPos[3];
- new BetRace[MAX_PLAYERS][2];
- new BetDm[MAX_PLAYERS][2];
- new Races[54][128] = {
- {"LS2LV2LS"},
- {"Downhill"},
- {"Docks"},
- {"StormDrain"},
- {"Rectang"},
- {"RampTime"},
- {"VineDrive"},
- {"RiverDieR"},
- {"aero"},
- {"AirportDrag"},
- {"AirportParking"},
- {"AirportRunway"},
- {"AirportUnderground"},
- {"Square"},
- {"CrazyMtChillad"},
- {"CupCakeCorner"},
- {"Drift"},
- {"grovesfjump"},
- {"HillRun"},
- {"Insanity"},
- {"Jumper"},
- {"LSDual"},
- {"LSMainStreet"},
- {"LSOrbital"},
- {"OverHill_4X4"},
- {"LAEastbound"},
- {"StadiumLoop"},
- {"TourDeSA"},
- {"Tracker"},
- {"Vinal"},
- {"4x4DirtLoop"},
- {"4x4OverTrack"},
- {"4x4LSSouth"},
- {"4x4DirtLoop"},
- {"HillRun"},
- {"BigWater"},
- {"BlueFarm"},
- {"BlueRed"},
- {"Coastal"},
- {"Countryloop"},
- {"DesertGas"},
- {"DesertRamp"},
- {"FarmersLoop"},
- {"JimsRing"},
- {"ScorpGo"},
- {"RiverRun"},
- {"HarbourLoop"},
- {"MoonRaker"},
- {"VineDrive"},
- {"DesertDiver"},
- {"DriftHell"},
- {"PierPressure"},
- {"Mental"},
- {"BeachTwist"}
- };
- new DmGun[12] = {31,30,32,26,28,24,27,25,29,22,23,0};
- new DeathMatches[36][128] = {
- {"Area52"},
- {"Atlantis"},
- {"Baseball"},
- {"Construction"},
- {"Quarry"},
- {"Refinery"},
- {"RodsOffice"},
- {"RodsCastle"},
- {"Carrier"},
- {"TheBoat"},
- {"Ruins"},
- {"RodsCampus"},
- {"Ruins"},
- {"Urban"},
- {"Ruins"},
- {"TheCage"},
- {"TheFarm"},
- {"WildWest"},
- {"Suburb"},
- {"TruckYard"},
- {"OpenWarII"},
- {"MastaTrailer"},
- {"EstateOfHate"},
- {"OpenWar"},
- {"HellSite"},
- {"BigEars"},
- {"PirateView"},
- {"CabinFever"},
- {"BatesMotel"},
- {"Woods"},
- {"SleepyHallow"},
- {"WangView"},
- {"DeathWay"},
- {"TrainHouse"},
- {"Glen"},
- {"Abandon"}
- };
- new Float:gRandomPlayerSpawns[1][3] = {
- {2231.9514,-1179.6395,29.7971} // sp1
- };
- /*
- {1094.4218,-1098.2269,25.2422},
- {1101.2023,-1085.7203,26.1813},
- {1096.1254,-1064.2736,29.1876},
- {1103.8142,-1026.3247,32.0990},
- {1142.7146,-1026.3687,32.0073},
- {291.8222,-1336.9775,53.4404},
- {246.7791,-1354.0120,53.1094},
- {161.7426,-1342.1641,69.6395},
- {419.9783,-1264.4738,51.5809},
- {398.8884,-1270.2999,50.0198},
- {2241.2683,-1241.4480,25.3971},
- {2221.3689,-1237.8572,24.8427},
- {2144.9207,-1245.7646,24.9917},
- {2104.0166,-1245.5676,25.2678},
- {2191.5950,-1277.3251,25.0362}
- };
- */
- new Float:gRandomDMSpawns[21][3] = {
- {-2414.0,1551.8,2.1}, // 1
- {-2406.9,1555.2,2.1}, // 2
- {-2392.8,1550.4,2.1}, // 3
- {-2406.6,1545.1,2.1}, // 4
- {-2391.9,1539.2,2.1}, // 5
- {-2379.7,1541.8,2.1}, // 6
- {-2366.9,1539.6,2.1}, // 7
- {-2426.6,1537.4,2.1}, // 8
- {-2473.5,1550.1,33.2}, // 9
- {-2474.2,1546.8,23.6}, // 10
- {-2464.2,1530.9,17.3}, // 11
- {-2437.5,1559.0,17.3}, // 12
- {-2416.3,1554.3,26.0}, // 13
- {-2424.7,1542.5,26.0}, // 14
- {-2410.5,1532.4,26.0}, // 15
- {-2403.5,1546.5,26.0}, // 16
- {-2389.2,1550.7,26.0}, // 17
- {-2368.0,1556.7,17.3}, // 18
- {-2351.5,1551.1,23.1}, // 19
- {-2313.7,1546.4,18.7}, // 20
- {-2313.7,1546.4,18.7} // 21
- };
- new Float:gDMWbounds[4] = {0.0,0.0,0.0,0.0};
- new Float:gCopPlayerSpawns[2][3] = {
- {2224.2603,-1142.8453,1025.7969},
- {2224.2603,-1142.8453,1025.7969}
- //{614.8,-608.2,17.2},
- //{611.5,-607.8,17.2}
- };
- new Float:gMedPlayerSpawns[2][3] = {
- {2224.2603,-1142.8453,1025.7969},
- {2224.2603,-1142.8453,1025.7969}
- };
- new Float:gRaceCheckpoints[5][3] = {
- {144.869800 ,-1564.952000,10.716340},
- {1370.314000,-939.442600,34.187500},
- {2865.989000,-1657.180000,10.875000},
- {2123.180000,-2665.730000,13.375000},
- {1350.4,-1400.2,13.3}//ls
- };
- /*
- {1699.2, 1435.1, 10.7},
- {1457.7,-1160.6,23.4},
- {1454.2,-1439.2,13.1},
- {1711.3,-1439.7,13.1},
- {1710.7,-1163.6,23.4},
- {1711.3,-1439.7,13.1},
- {-1417.0,-295.8,14.1},
- {-1945.2,606.4,35.0},//sf
- {-2262.5,2310.1,4.8},
- {-795.5,2421.2,157.0},
- {310.1,1946.2,17.6},
- {2349.5,2142.5,10.6},//lv
- {1350.4,-1400.2,13.3}//ls
- };
- */
- new Float:gCBdropoff[37][3] = {
- {2217.2,-1179.7,29.7},
- {1098.1,-1428.0,22.7},
- {2484.2,-1961.8,16.7},
- {733.2,-1357.9,23.5},
- {1411.6,-1455.1,20.4},
- {1080.6,-1605.0,20.4},
- {382.0,-2058.7,10.7},
- {656.1,-1646.6,15.4},
- {816.2,-1380.5,23.5},
- {853.3,-1388.2,-0.5},
- {915.4,-1235.1,17.2},
- {1153.7,-1180.4,32.8},
- {1183.9,-1257.3,18.8},
- {1441.3,-926.8,39.6},
- {1527.5,-893.5,57.6},
- {1342.1,-1624.3,17.7},
- {1292.1,-770.7,95.9},
- {1907.9,-1318.6,14.1},
- {1971.7,-1284.5,28.4},
- {2687.1,-1144.6,71.3},
- {2654.1,-1317.5,58.9},
- {2771.0,-1388.5,27.1},
- {2793.3,-1945.0,17.3},
- {197.9,-1206.0,78.3},
- {2447.5,-2209.8,26.6},
- {2512.4,-2072.9,26.5},
- {2171.6,-1732.1,17.2},
- {2175.4,-1836.1,16.1},
- {2399.5,-1550.7,28.0},
- {2109.2,-1010.2,63.8},
- {1409.9,-1274.5,33.4},
- {1279.8,-1439.0,20.4},
- {2234.0,-2269.3,17.8},
- {2025.8,-2133.1,19.8},
- {811.2,-1098.2,25.9},
- {818.2,-944.2,55.2},
- {1976.8,-1779.4,17.3}
- };
- enum pSpec
- {
- Float:sPx,
- Float:sPy,
- Float:sPz,
- sPint,
- sLocal,
- sCam,
- };
- new Unspec[MAX_PLAYERS][pSpec];
- enum eCars
- {
- model_id,
- Float:pos_x,
- Float:pos_y,
- Float:pos_z,
- Float:z_angle
- };
- enum pInfo
- {
- pKey[128],
- pCash,
- pAccount,
- pAdmin,
- pLevel,
- pExp,
- gPupgrade,
- pKills,
- pCB,
- pHW,
- pSR,
- pWA,
- pTut,
- pPEN,
- pGun1,
- pGun2,
- pGun3,
- pGun4,
- pGun5,
- pGun6,
- pAmmo1,
- pAmmo2,
- pAmmo3,
- pAmmo4,
- pAmmo5,
- pAmmo6,
- pCHBodovi,
- pGameSage,
- pJailed,
- pJailTime,
- Float:pSHealth,
- Float:pHealth,
- Float:pPos_x,
- Float:pPos_y,
- Float:pPos_z,
- pInt,
- pLocal,
- pTeam,
- pLeader,
- pMember,
- pFMember,
- pRank,
- pChar,
- pModel,
- pWarns,
- pPhousekey,
- pPbiskey,
- pTVec,
- pReg,
- pSex,
- pOrigin,
- pPnumber,
- pMuteTime,
- pMuted,
- pMotokey,
- };
- new PlayerInfo[MAX_PLAYERS][pInfo];
- enum plInfo
- {
- plKey[128],
- plCash,
- plAccount,
- plAdmin,
- plLevel,
- plExp,
- glPupgrade,
- plKills,
- plCB,
- plHW,
- plSR,
- plWA,
- plPEN,
- plGun1,
- plGun2,
- plGun3,
- plGun4,
- plGun5,
- plGun6,
- plAmmo1,
- plAmmo2,
- plAmmo3,
- plAmmo4,
- plAmmo5,
- plAmmo6,
- Float:plSHealth,
- Float:plHealth,
- Float:plPos_x,
- Float:plPos_y,
- Float:plPos_z,
- plInt,
- plLocal,
- plTeam,
- plLeader,
- plMember,
- plFMember,
- plRank,
- plChar,
- plModel,
- plWarns,
- plPnumber,
- plPhousekey,
- plPbiskey,
- plTVec,
- plReg,
- };
- new PLlayerInfo[MAX_PLAYERS][plInfo];
- enum hInfo
- {
- Float:hEntrancex,
- Float:hEntrancey,
- Float:hEntrancez,
- Float:hExitx,
- Float:hExity,
- Float:hExitz,
- hHealthx,
- hHealthy,
- hHealthz,
- hArmourx,
- hArmoury,
- hArmourz,
- hOwner[MAX_PLAYER_NAME],
- hDiscription[MAX_PLAYER_NAME],
- hValue,
- hHel,
- hArm,
- hInt,
- hLock,
- hOwned,
- hRooms,
- hRent,
- hRentabil,
- hTakings,
- hVec,
- hVcol1,
- hVcol2,
- hDate,
- hLevel,
- hWorld,
- };
- new HouseInfo[61][hInfo];
- enum bInfo
- {
- Float:bEntrancex,
- Float:bEntrancey,
- Float:bEntrancez,
- Float:bExitx,
- Float:bExity,
- Float:bExitz,
- bHealthx,
- bHealthy,
- bHealthz,
- bArmourx,
- bArmoury,
- bArmourz,
- bOwner[MAX_PLAYER_NAME],
- bDiscription[64],
- bValue,
- bHel,
- bArm,
- bInt,
- bLock,
- bOwned,
- bEntcost,
- bTakings,
- bDate,
- bLevel,
- bProd,
- bProdCap,
- bComp,
- bCompCap,
- bProdCost,
- bPayComp,
- bPriceMod,
- };
- new Float:gInviteSpawns[10][4] = {
- {1663.8649,-1243.1665,233.3750,267.7425},
- {1663.8649,-1243.1665,233.3750,267.7425},
- {1663.8649,-1243.1665,233.3750,267.7425},
- {1663.8649,-1243.1665,233.3750,267.7425},
- {1663.8649,-1243.1665,233.3750,267.7425},
- {1663.8649,-1243.1665,233.3750,267.7425},
- {1663.8649,-1243.1665,233.3750,267.7425},
- {1663.8649,-1243.1665,233.3750,267.7425},
- {1663.8649,-1243.1665,233.3750,267.7425},
- {1663.8649,-1243.1665,233.3750,267.7425}
- };
- new BizzInfo[13][bInfo];
- enum sbInfo
- {
- Float:sbEntrancex,
- Float:sbEntrancey,
- Float:sbEntrancez,
- sbOwner[MAX_PLAYER_NAME],
- sbDiscription[64],
- sbValue,
- sbHel,
- sbArm,
- sbInt,
- sbLock,
- sbOwned,
- sbEntcost,
- sbTakings,
- sbDate,
- sbLevel,
- sbProd,
- sbProdCap,
- sbComp,
- sbCompCap,
- sbProdCost,
- sbPayComp,
- };
- new SBizzInfo[14][sbInfo];
- enum pHaul
- {
- pCapasity,
- pLoad,
- };
- new PlayerHaul[115][pHaul];
- enum pCrime
- {
- pBplayer[32],
- pAccusing[32],
- pAccusedof[32],
- pVictim[32],
- };
- new PlayerCrime[MAX_PLAYERS][pCrime];
- enum pTele
- {
- Float:pTmpposx,
- Float:pTmpposy,
- Float:pTmpposz,
- pTmpint,
- };
- new Teletmp[255][pTele];
- enum rInfo
- {
- Float:rStartx,
- Float:rStarty,
- Float:rStartz,
- Float:rMidx,
- Float:rMidy,
- Float:rMidz,
- Float:rMid2x,
- Float:rMid2y,
- Float:rMid2z,
- Float:rEndx,
- Float:rEndy,
- Float:rEndz,
- rName[MAX_PLAYER_NAME],
- rBest[MAX_PLAYER_NAME],
- rBestm,
- rBests,
- rBestms,
- rLaps,
- };
- new RaceInfo[rInfo];
- /*
- enum pPickup
- {
- pID,
- pType,
- Float:pPx,
- Float:pPy,
- Float:pPz,
- };
- new PickUps[MAX_PLAYERS][pPickup];
- */
- //--------------------------------------skinovi bandi
- new JoinPed[52][1] = {
- {280},//POLICE_FORCE skinovi
- {281},
- {282},
- {283},
- {284},
- {285},
- {288},
- {71},
- {166},
- {295},
- {148},
- {116},//FBI/ATF
- {29},
- {47},
- {127},//NATIONAL_GUARD
- {115},
- {70},//FIRE/AMBULANCE
- {274},
- {275},
- {276},
- {277},
- {278},
- {279},
- {105},//GM
- {106},
- {107},
- {270},
- {269},
- {271},
- {270},
- {168},
- {280},//FA
- {281},
- {282},
- {283},
- {284},
- {285},
- {288},
- {112},//
- {125},
- {124},
- {113},
- {112},
- {127},//RUS
- {115},
- {116},
- {117},
- {201},
- {116},//BM
- {29},
- {47},
- {115}
- };
- new GunPrice[30][1] = {
- {500}, //parachute
- {400}, //golfclub
- {300}, //nightstick
- {200}, //knife
- {700}, //baseballbat
- {300}, //shovel
- {100}, //poolcue
- {400}, //purpledildo
- {780}, //whitedildo
- {560}, //longwhitedildo
- {530}, //whitedildo2
- {200}, //flowers
- {600}, //cane
- {500}, //sdpistol
- {1000}, //colt45
- {1500}, //deagle
- {2000}, //Tec9
- {300}, //uzi
- {2500}, //mp5
- {100}, //shotgun
- {2000}, //spas12
- {400}, //sawnoff
- {2000}, //ak47
- {2500}, //m4
- {1000}, //rifle
- {1}, //pistolammo
- {10}, //shotgunammo
- {2}, //smgammo
- {20}, //assaultammo
- {50} //rifle
- };
- new Peds[276][1] = {
- {264},
- {102},//TEAM_BALLAS
- {103},
- {104},
- {105},//TEAM_GROVE
- {106},
- {107},
- {108},//TEAM_VAGOS
- {109},
- {110},
- {114},//TEAM_AZTECAS
- {115},
- {116},
- {121},// TEAM_NANG
- {122},
- {123},
- {124},//TEAM_MAFIA
- {125},
- {126},
- {127},
- {111},//TEAM_RMAFIA
- {112},
- {113},
- {117},//TEAM_TRIADS
- {118},
- {120},
- {247},//TEAM_BIKERS
- {248},
- {100},
- {256},
- {263},
- {262},
- {261},
- {260},
- {259},
- {258},
- {257},
- {256},
- {255},
- {253},
- {252},
- {251},
- {250},
- {249},
- {246},
- {245},
- {244},
- {243},
- {242},
- {241},
- {240},
- {239},
- {238},
- {237},
- {236},
- {235},
- {234},
- {233},
- {232},
- {231},
- {230},
- {229},
- {228},
- {227},
- {226},
- {225},
- {173},
- {174},
- {175},
- {224},
- {223},
- {222},
- {221},
- {220},
- {219},
- {218},
- {217},
- {216},
- {215},
- {214},
- {213},
- {212},
- {211},
- {210},
- {209},// {208},
- {207},
- {206},
- {205},
- {204},
- {203},
- {202},
- {201},
- {200},
- {199},
- {198},
- {197},
- {196},
- {195},
- {194},
- {193},
- {192},
- {191},
- {190},
- {189},
- {188},
- {187},
- {186},
- {185},
- {184},
- {183},
- {182},
- {181},
- {180},
- {179},
- {178},
- {177},
- {176},
- {172},
- {171},
- {170},
- {169},
- {168},
- {167},// {166},// {165},// {164},// {163},
- {162},
- {161},
- {160},
- {159},
- {158},
- {157},
- {156},
- {155},
- {154},
- {153},
- {152},
- {151},
- {150},// {149},
- {148},
- {147},
- {146},
- {145},
- {144},
- {143},
- {142},
- {141},
- {140},
- {139},
- {138},
- {137},
- {136},
- {135},
- {134},
- {133},
- {132},
- {131},
- {130},
- {129},
- {128},
- {101},
- {254},
- {99},
- {98},
- {97},
- {96},
- {95},
- {94},
- {93},
- {92},
- {91},
- {90},
- {89},
- {88},
- {87},// {86},
- {85},
- {84},
- {83},
- {82},
- {81},
- {80},
- {79},
- {78},
- {77},
- {76},
- {75},// {74},
- {73},
- {72},
- {69},
- {68},
- {67},
- {66},// {65},
- {64},
- {63},
- {62},
- {61},
- {60},
- {59},
- {58},
- {57},
- {56},
- {55},
- {54},
- {53},
- {52},
- {51},
- {50},
- {49},
- {48},
- {47},
- {46},
- {45},
- {44},
- {43},// {42},
- {41},
- {40},
- {39},
- {38},
- {37},
- {36},
- {35},
- {34},
- {33},
- {32},
- {31},
- {30},
- {29},
- {28},
- {27},
- {26},
- {25},
- {24},
- {23},
- {22},
- {21},
- {20},
- {19},
- {18},
- {17},
- {16},
- {15},
- {14},
- {13},
- {12},
- {11},
- {10},
- {1},//TRUTH
- {2},//MACCER
- {290},//ROSE
- {291},//PAUL
- {292},//CESAR
- {293},//OGLOC
- {294},//WUZIMU
- {187},
- {296},//JIZZY
- {297},//MADDOGG
- {298},//CAT
- {299},//ZERO
- {71}, //=255 amb
- {70},
- {274},
- {275},
- {276}, //==259
- {163}, //=260
- {164},
- {165},
- {166},
- {295},//TORINO
- {246},
- {186},
- {147},
- {288},
- {286},
- {285},
- {284},
- {283},
- {282},
- {281},
- {280} //276
- };
- new Float:HouseCarSpawns[61][4] = {
- {2570.3308,-1030.3450,69.6770,176.0972},//kuca1
- {2064.4,-1694.4,13.1,271.1561},//kuca2
- {1426.4908,-1843.3597,13.6397,1.2280},//kuca3
- {1109.8,-968.0,42.7,0.0},//kuca4
- {2497.6274,-2025.6306,13.2521,355.4281}, //kuca5
- {2645.0,-1990.8,13.1,180.0},//kuca6
- {2014.3370,-1737.3616,13.6555,91.3651},//kuca7
- {1910.5149,-1120.5304,25.4493,177.8350},//kuca8
- {828.8,-887.0,68.5,230.7095},//kuca9
- {2149.6,-1610.9,14.0,90.7904},//kuca10
- {760.1,-1687.8,4.3,180.6},//kuca11
- {645.5,-1616.1,14.9,0.0},//kuca12
- {1827.5034,-1131.3844,24.0384,357.9818},//kuca13
- {1786.2279,-1247.9313,13.8759,180.7606},//kuca14
- {959.5864,-901.0845,45.8584,177.3087},//kuca15
- {2445.8,-1326.8,23.6,18.4},//kuca16
- {2845.9,-1286.8,18.9,90.0},//kuca17
- {2159.8,-1803.9,13.3,271.4}, //kuca18
- {2558.6531,-1192.2732,61.7176,358.2988},//kuca19
- {1997.6174,-1322.7277,23.1580,178.3294},//kuca20
- {1514.0,-694.6,94.5,90.0},//kuca21
- {1246.7,-1107.6,25.5,266.4},//kuca22
- {831.7,-857.5,69.9,180.0},//kuca23
- {1007.9,-659.4,121.1,130.6194},//kuca24
- {1110.0,-726.4,100.1,90.0},//kuca25
- {259.7,-1221.0,74.7,202.0011},//kuca26
- {1463.7,-901.7,55.8,359.0},//kuca27
- {1440.1,-890.6,51.2,0.0},//kuca28
- {406.0442,-1152.0826,77.1410,146.0967},//kuca29
- {480.0394,-1088.5070,82.5806,356.6047}, //kuca30
- {565.2898,-1066.8906,73.5781,25.6265},//kuca31
- {1543.1456,-1111.2860,24.1712,266.2091},//kuca32
- {1357.6392,-617.2240,109.2269,17.5451}, //kuca33
- {2802.9663,-1365.3806,24.1150,0.1761},//kuca34
- {2340.7600,-1045.9474,52.8750,182.2373},//kuca35
- {2200.3867,-1000.5089,62.4167,161.6690},//kuca36
- {2148.3235,-1241.7354,24.7602,2.0559},//kuca37
- {2222.3464,-1792.7914,13.6553,182.7350},//kuca38
- {2274.9780,-1887.4041,13.6497,274.1642},//kuca39
- {1524.3821,-1845.7561,13.6427,267.9578},//kuca40
- {2515.1340,-1671.2317,13.8280,66.8111},//kuca41
- {2479.8867,-1655.3881,13.4142,92.9400},//kuca42
- {1424.4817,-1615.2051,13.5551,180.7668},//kuca43
- {1388.3593,-1568.0165,13.6874,167.7168},//kuca44
- {1423.2032,-1546.6154,13.6369,288.2094},//kuca45
- {904.7038,-1455.2830,13.2620,269.3845},//kuca46
- {1585.8068,-1343.0056,16.5800,358.1951},//kuca47
- {1642.9683,-1240.3959,14.9158,137.1670},//kuca48
- {1246.4939,-1067.5963,29.2354,268.1023},//kuca49
- {2637.1160,-1089.4600,69.6253,180.6909},//kuca50
- {1760.4464,-1664.3433,13.6511,90.9067},//kuca51
- {1530.7472,-813.2767,72.0815,91.1937},//kuca52
- {1515.4642,-766.1096,80.2489,138.1644},//kuca53
- {1487.3591,-1133.0774,24.0834,178.2520},//kuca54
- {1028.7550,-808.4080,101.9534,22.6329},//kuca55
- {796.3849,-842.4902,60.7371,189.5750},//kuca56
- {1541.1622,-1156.6521,24.0823,88.2149},//kuca57
- {1534.9507,-841.7390,65.0473,87.9309},//kuca58
- {1089.2421,-640.2809,113.2098,358.8640},//kuca59
- {1036.1404,-639.9645,120.2122,291.1449},//kuca60
- {952.2419,-919.5269,44.8119,185.6716}//kuca61
- };
- new CarSpawns[98][eCars] = {
- {402,2228.6736,-1166.4703,25.5872,89.4868},//carid 90
- {422,2228.5745,-1170.0745,25.7285,90.1785},
- {429,2228.8042,-1173.6991,25.4129,89.5996},
- {458,2228.0178,-1177.3232,25.6052,90.3109},
- {463,2216.9429,-1170.4664,25.2665,267.1122},
- {468,2216.6335,-1166.2650,25.3948,269.5559},
- {475,2205.6516,-1161.2788,25.5368,270.8189},//------------
- {461,2205.8943,-1164.9865,25.3060,87.7591},
- {419,2206.0576,-1172.9923,25.5239,90.1406},
- {422,2217.4753,-1157.8187,25.7182,91.2736},
- {424,2205.6755,-1157.1921,25.5179,89.3138},
- {423,1716.8999,-1006.3013,23.9371,172.5884},
- {426,1721.5217,-1007.0438,23.6562,173.7676},
- {436,1726.7056,-1007.7334,23.6933,167.8351},
- {439,1731.4093,-1008.4234,23.8394,166.8945},
- {496,1735.3982,-1009.3354,23.6729,167.1773},
- {445,1740.0858,-1010.4761,23.8245,167.0463},
- {458,1744.3707,-1011.7243,23.8400,170.0390},
- {470,1748.6119,-1011.8051,23.9540,168.1070},
- {475,1753.0280,-1013.3723,23.7633,167.1010},//20
- {477,1762.0610,-1061.0719,23.7139,180.5811},
- {479,1766.2883,-1061.5975,23.7542,178.8137},
- {560,1770.4873,-1060.9888,23.6661,179.2749},
- {496,1775.5125,-1070.2048,23.6776,1.0437},
- {500,1658.7804,-1089.2800,24.0214,89.3291},
- {507,1659.0393,-1093.4810,23.7279,91.2268},
- {516,1620.9692,-1107.4758,23.7399,269.2864},
- {517,1620.8823,-1098.4928,23.7611,88.5031},
- {517,1629.3066,-1084.9418,23.7612,270.6913},
- {550,1294.9124,-1379.1422,13.6076,179.4090},
- {550,1325.2274,-1379.0754,13.6889,179.2200},//------------
- {419,991.7128,-1371.7124,12.9786,182.4223},
- {421,783.4034,-1358.6694,13.1638,3.1081},
- {422,748.1205,-1160.4824,21.3319,127.2800},
- {423,668.9861,-1259.6940,13.0840,179.7925},
- {424,598.0946,-1508.0479,14.7326,90.9652},
- {426,868.6852,-1315.0549,13.0927,270.0761},
- {436,956.4866,-1089.7889,23.8796,2.5590},
- {439,1021.5768,-1051.0980,31.2251,267.1626},
- {445,1137.9980,-1026.8053,31.5477,356.7703},//40
- {458,1228.0676,-916.6047,42.5267,7.7081},
- {470,1173.6230,-917.2872,42.9716,277.6426},
- {475,1192.4987,-924.0895,42.7218,277.1275},
- {477,1123.6554,-926.0062,42.9023,89.4629},
- {479,983.5388,-926.8416,41.4302,88.2568},
- {496,979.8858,-940.3534,40.8528,176.3092},
- {500,762.9413,-1033.6790,23.5787,182.9254},
- {507,405.7613,-1327.0398,14.4827,207.6227},
- {516,295.2629,-1633.3835,32.8605,263.8446},
- {517,488.1183,-1792.5354,5.6861,266.9080},//50
- {527,1076.8075,-1772.6667,12.9747,269.9429},
- {542,1098.7853,-1769.8842,12.9716,269.5833},
- {546,1098.1765,-1757.9127,12.9767,90.1483},
- {547,1244.0161,-1720.3248,13.1726,267.9560},
- {550,1359.6571,-1753.7496,12.9860,180.4511},
- {558,1656.2014,-1739.5886,13.1704,268.6647},
- {559,1804.2429,-1716.1101,13.1626,354.2278},
- {562,1802.8481,-1907.1221,13.0243,269.9057},
- {550,1777.0061,-1918.2114,13.0118,271.5803},
- {547,2065.6873,-1904.7106,13.1713,0.7149},//60
- {565,2237.3118,-1739.6681,13.1699,270.6755},
- {565,2481.9873,-1745.3567,13.1737,0.3584},//------------
- {482,438.9431,-1625.4088,25.7951,0.1850},
- {547,453.3896,-1494.3240,30.7917,7.7513},
- {550,487.6469,-1516.2312,20.0235,185.5384},
- {551,-2564.1069,-142.5454,8.9584,183.9273},
- {560,-2593.6523,-100.5040,4.0458,268.1333},
- {566,2528.8904,129.0498,26.2968,1.0578},
- {405,598.9131,-1519.1414,14.8214,180.4083},
- {554,593.2022,-1519.3578,14.9461,181.5466},
- {426,-158.7873,-230.6272,1.1657,275.3830},
- {445,-230.4969,-228.3704,1.1654,355.0959},
- {492,2447.9260,11.3427,26.3065,270.5659},
- {507,2418.0374,-45.1556,26.9728,180.1859},
- {545,-144.7556,-57.0579,2.8606,71.6712},
- {482,888.1506,-1659.2727,13.3296,1.2414},
- {547,-2665.2734,267.6269,4.0779,182.6415},
- {550,888.0242,-1678.5981,13.3294,358.4990},
- {551,-2586.3401,328.7358,4.5945,268.8039},
- {560,-2591.2981,485.0661,14.3576,317.0099},//80
- {566,157.0310,-163.7258,1.3215,270.0280},
- {405,189.4823,-7.5417,1.3216,357.2232},
- {554,1081.8948,-1629.9564,13.4064,90.0880},
- {426,981.7941,-1523.5115,13.3379,267.2751},
- {445,64.1504,-227.8065,1.3155,89.1540},
- {492,2684.6,-1990.2,13.3,180.0931},
- {507,2451.9990,1345.9336,10.4269,0.1026},
- {545,1096.1,-1379.9,13.3,270.1909},
- {540,2350.5596,70.9094,26.3024,178.4437},
- {482,1182.2568,-1219.2407,18.4163,0.5578},
- {547,2350.0979,53.9388,26.3038,178.4447},
- {550,2328.6436,195.9171,27.1615,91.4369},
- {551,1284.8755,-1525.5013,13.3451,269.4388},
- {560,1279.1887,-1539.2032,13.3201,94.8070},
- {566,1275.9120,-1646.7448,13.3273,267.2669},
- {405,1318.2792,-1785.7821,13.2429,182.4215},
- {554,1253.9153,-1833.3832,13.1734,175.3692},
- {551,2794.8552,1295.3450,10.3622,0.7839}//80
- };
- new hotwires[MAX_VEHICLES];
- // new Float:gJailPlayerSpawns[1][3] = {
- // {264.395200,77.564040,1001.039000}
- // };
- //Round code stolen from mike's Manhunt :P
- new gRoundTime = 3600000; // Round time - 1 hour
- //new gRoundTime = 1200000; // Round time - 20 mins
- //new gRoundTime = 900000; // Round time - 15 mins
- //new gRoundTime = 600000; // Round time - 10 mins
- //new gRoundTime = 300000; // Round time - 5 mins
- //new gRoundTime = 120000; // Round time - 2 mins
- //new gRoundTime = 60000; // Round time - 1 min
- main()
- {
- print(" ");
- print(" ");
- print("|_________________CroHerze Good Old Times Deathmatch_____________________|");
- print(" ");
- }
- /* PUBLIC-ovi */
- public DollahScoreUpdate()
- {
- new LevScore;
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- LevScore = PlayerInfo[i][pLevel];
- SetPlayerScore(i, LevScore);
- if (LevScore > LevScoreOld)
- {
- LevScoreOld = LevScore;
- }
- }
- }
- return 1;
- }
- public GameTicks()
- {
- Gtickcount = Gtickcount+500;
- }
- public ConvertTicks(ticks)
- {
- csecs = 0;
- cmils = 0;
- cmins = 0;
- new tempcsecs = ticks / 1000;//61.59
- cmins = ticks / 60000;//1.0265
- csecs = (ticks - cmins*60000)/1000;
- cmils = (ticks - tempcsecs*1000)/10;
- }
- public CopScanner()
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i) && gTeam[i] >= 4 && gPublicEnemy != i && gSuperCop != i && Hidden[i] !=1)
- {
- if(gTeam[i] == 4)
- {
- CrimProxDetector(radardist, i,TEAM_ORANGE1_COLOR,TEAM_ORANGE2_COLOR,TEAM_ORANGE3_COLOR,TEAM_ORANGE4_COLOR,TEAM_ORANGE5_COLOR,TEAM_ORANGE6_COLOR,TEAM_ORANGE7_COLOR,TEAM_ORANGE8_COLOR,TEAM_ORANGE9_COLOR,TEAM_ORANGE10_COLOR);
- }
- if(gTeam[i] == 6)
- {
- CrimProxDetector(radardist, i,TEAM_GROVE1_COLOR,TEAM_GROVE2_COLOR,TEAM_GROVE3_COLOR,TEAM_GROVE4_COLOR,TEAM_GROVE5_COLOR,TEAM_GROVE6_COLOR,TEAM_GROVE7_COLOR,TEAM_GROVE8_COLOR,TEAM_GROVE9_COLOR,TEAM_GROVE10_COLOR);
- }
- if(gTeam[i] == 7)
- {
- CrimProxDetector(radardist, i,TEAM_VAGOS1_COLOR,TEAM_VAGOS2_COLOR,TEAM_VAGOS3_COLOR,TEAM_VAGOS4_COLOR,TEAM_VAGOS5_COLOR,TEAM_VAGOS6_COLOR,TEAM_VAGOS7_COLOR,TEAM_VAGOS8_COLOR,TEAM_VAGOS9_COLOR,TEAM_VAGOS10_COLOR);
- }
- if(gTeam[i] == 8)
- {
- CrimProxDetector(radardist, i,TEAM_AZTECAS1_COLOR,TEAM_AZTECAS2_COLOR,TEAM_AZTECAS3_COLOR,TEAM_AZTECAS4_COLOR,TEAM_AZTECAS5_COLOR,TEAM_AZTECAS6_COLOR,TEAM_AZTECAS7_COLOR,TEAM_AZTECAS8_COLOR,TEAM_AZTECAS9_COLOR,TEAM_AZTECAS10_COLOR);
- }
- if(gTeam[i] == 9)
- {
- CrimProxDetector(radardist, i,TEAM_NANG1_COLOR,TEAM_NANG2_COLOR,TEAM_NANG3_COLOR,TEAM_NANG4_COLOR,TEAM_NANG5_COLOR,TEAM_NANG6_COLOR,TEAM_NANG7_COLOR,TEAM_NANG8_COLOR,TEAM_NANG9_COLOR,TEAM_NANG10_COLOR);
- }
- if(gTeam[i] == 78)
- {
- CrimProxDetector(radardist, i,TEAM_RIFA1_COLOR,TEAM_RIFA2_COLOR,TEAM_RIFA3_COLOR,TEAM_RIFA4_COLOR,TEAM_RIFA5_COLOR,TEAM_RIFA6_COLOR,TEAM_RIFA7_COLOR,TEAM_RIFA8_COLOR,TEAM_RIFA9_COLOR,TEAM_RIFA10_COLOR);
- }
- if(gTeam[i] == 11)
- {
- CrimProxDetector(radardist, i,TEAM_MAFIA1_COLOR,TEAM_MAFIA2_COLOR,TEAM_MAFIA3_COLOR,TEAM_MAFIA4_COLOR,TEAM_MAFIA5_COLOR,TEAM_MAFIA6_COLOR,TEAM_MAFIA7_COLOR,TEAM_MAFIA8_COLOR,TEAM_MAFIA9_COLOR,TEAM_MAFIA10_COLOR);
- }
- if(gTeam[i] == 12)
- {
- CrimProxDetector(radardist, i,TEAM_RMAFIA1_COLOR,TEAM_RMAFIA2_COLOR,TEAM_RMAFIA3_COLOR,TEAM_RMAFIA4_COLOR,TEAM_RMAFIA5_COLOR,TEAM_RMAFIA6_COLOR,TEAM_RMAFIA7_COLOR,TEAM_RMAFIA8_COLOR,TEAM_RMAFIA9_COLOR,TEAM_RMAFIA10_COLOR);
- }
- if(gTeam[i] == 13)
- {
- CrimProxDetector(radardist, i,TEAM_TRIADS1_COLOR,TEAM_TRIADS2_COLOR,TEAM_TRIADS3_COLOR,TEAM_TRIADS4_COLOR,TEAM_TRIADS5_COLOR,TEAM_TRIADS6_COLOR,TEAM_TRIADS7_COLOR,TEAM_TRIADS8_COLOR,TEAM_TRIADS9_COLOR,TEAM_TRIADS10_COLOR);
- }
- if(gTeam[i] == 14)
- {
- CrimProxDetector(radardist, i,TEAM_BIKERS1_COLOR,TEAM_BIKERS2_COLOR,TEAM_BIKERS3_COLOR,TEAM_BIKERS4_COLOR,TEAM_BIKERS5_COLOR,TEAM_BIKERS6_COLOR,TEAM_BIKERS7_COLOR,TEAM_BIKERS8_COLOR,TEAM_BIKERS9_COLOR,TEAM_BIKERS10_COLOR);
- }
- }
- }
- }
- public Spectator()
- {
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- if(TVMode[i] >= 1 && TVMode[i] <= 5)
- {
- Unspec[i][sCam] = 2;
- TVMode[i]++;
- BestPlayer(i);
- }
- if(TVMode[i] >= 6 && TVMode[i] <= 9)
- {
- Unspec[i][sCam] = 3;
- TVMode[i]++;
- BestPlayer(i);
- }
- if(TVMode[i] == 10)
- {
- TVMode[i] = 1;
- BestPlayer(i);
- Unspec[i][sCam] = random(4);
- }
- if(TVMode[i] >= 11 && TVMode[i] <= 15)
- {
- DMPlayer(i);
- Unspec[i][sCam] = 2;
- TVMode[i]++;
- }
- if(TVMode[i] >= 16 && TVMode[i] <= 19)
- {
- DMPlayer(i);
- Unspec[i][sCam] = 3;
- TVMode[i]++;
- }
- if(TVMode[i] == 20)
- {
- DMPlayer(i);
- TVMode[i] = 11;
- Unspec[i][sCam] = random(4);
- }
- if(TVMode[i] >= 21 && TVMode[i] <= 25)
- {
- RaceSpec(i);
- Unspec[i][sCam] = 2;
- TVMode[i]++;
- }
- if(TVMode[i] >= 26 && TVMode[i] <= 29)
- {
- RaceSpec(i);
- Unspec[i][sCam] = 3;
- TVMode[i]++;
- }
- if(TVMode[i] == 30)
- {
- RaceSpec(i);
- TVMode[i] = 21;
- Unspec[i][sCam] = random(4);
- }
- if(TVMode[i] >= 31 && TVMode[i] <= 35)
- {
- PenDelay(i);
- Unspec[i][sCam] = 2;
- TVMode[i]++;
- }
- if(TVMode[i] >= 36 && TVMode[i] <= 39)
- {
- PenDelay(i);
- Unspec[i][sCam] = 3;
- TVMode[i]++;
- }
- if(TVMode[i] == 40)
- {
- PenDelay(i);
- TVMode[i] = 31;
- Unspec[i][sCam] = random(4);
- }
- if(TVMode[i] >= 41 && TVMode[i] <= 45)
- {
- SpeedDelay(i);
- Unspec[i][sCam] = 2;
- TVMode[i]++;
- }
- if(TVMode[i] >= 46 && TVMode[i] <= 49)
- {
- SpeedDelay(i);
- Unspec[i][sCam] = 3;
- TVMode[i]++;
- }
- if(TVMode[i] == 50)
- {
- SpeedDelay(i);
- TVMode[i] = 41;
- Unspec[i][sCam] = random(4);
- }
- if(Spectate[i] < 253 && Spectate[i] != 255)
- {
- SetPlayerColor(i,COLOR_SPEC);
- TogglePlayerControllable(i, 0);
- new hight;
- new targetid = Spectate[i];
- new Float:px, Float:py, Float:pz, Float:pa;
- if(specflick == 1)
- {
- GetPlayerPos(targetid, CarTracking[i][0], CarTracking[i][1], CarTracking[i][2]);
- }
- px = CarTracking[i][0];py = CarTracking[i][1];pz = CarTracking[i][2];
- if(PlayerInfo[targetid][pInt] == 0)
- {
- SetPlayerInterior(i,0);
- }
- if(PlayerInfo[targetid][pInt] > 0)
- {
- SetPlayerInterior(i,PlayerInfo[targetid][pInt]);
- }
- if(pz > 530.0 && PlayerInfo[targetid][pInt] == 0) //the highest land point in sa = 526.8
- {
- SetPlayerInterior(i,0);
- }
- if(Unspec[i][sCam] <= 1 && Unspec[i][sCam] != 10)
- {
- if(GetPlayerState(targetid) != 1)
- {
- SetPlayerCameraPos(i,px,py,pz+40);
- }
- else
- {
- SetPlayerCameraPos(i,px,py,pz+10);
- }
- SetPlayerPos(i, px, py, pz+110);
- }
- else if(Unspec[i][sCam] >= 2 && Unspec[i][sCam] <= 3)
- {
- new dist;
- if(Unspec[i][sCam] == 2)
- {
- if(GetPlayerState(targetid) != 1)
- {
- dist = 6;
- hight = 2;
- }
- else
- {
- dist = 6;
- hight = 1;
- }
- }
- if(Unspec[i][sCam] == 3)
- {
- if(GetPlayerState(targetid) != 1)
- {
- dist = -50;
- hight = 4;
- }
- else
- {
- dist = -10;
- hight = 2;
- }
- }
- if(GetPlayerState(targetid) != 1)
- {
- if(specflick == 2)
- {
- new Float:px2, Float:py2, Float:pz2, Float:tpx,Float:tpy;
- GetPlayerPos(targetid, px2, py2, pz2);
- if(py2 > py && px2 > px)
- {
- tpx = px2-px;
- tpy = py2-py;
- if(tpy > tpx)
- {
- if(tpy-tpx > 10.0)
- {
- CarTracking[i][3] = 0.0;
- }
- else
- {
- CarTracking[i][3] = 315.0;
- }
- }
- if(tpy < tpx)
- {
- if(tpx-tpy > 10.0)
- {
- CarTracking[i][3] = 270.0;
- }
- else
- {
- CarTracking[i][3] = 315.0;
- }
- }
- }
- if(py2 < py && px2 > px)
- {
- tpx = px2-px;
- tpy = py-py2;
- if(tpy > tpx)
- {
- if(tpy-tpx > 10.0)
- {
- CarTracking[i][3] = 180.0;
- }
- else
- {
- CarTracking[i][3] = 225.0;
- }
- }
- if(tpy < tpx)
- {
- if(tpx-tpy > 10.0)
- {
- CarTracking[i][3] = 270.0;
- }
- else
- {
- CarTracking[i][3] = 225.0;
- }
- }
- }
- if(py2 < py && px2 < px)
- {
- tpx = px-px2;
- tpy = py-py2;
- if(tpy > tpx)
- {
- if(tpy-tpx > 10.0)
- {
- CarTracking[i][3] = 180.0;
- }
- else
- {
- CarTracking[i][3] = 135.0;
- }
- }
- if(tpy < tpx)
- {
- if(tpx-tpy > 10.0)
- {
- CarTracking[i][3] = 90.0;
- }
- else
- {
- CarTracking[i][3] = 135.0;
- }
- }
- }
- if(py2 > py && px2 < px)
- {
- tpx = px-px2;
- tpy = py2-py;
- if(tpy > tpx)
- {
- if(tpy-tpx > 10.0)
- {
- CarTracking[i][3] = 0.0;
- }
- else
- {
- CarTracking[i][3] = 45.0;
- }
- }
- if(tpy < tpx)
- {
- if(tpx-tpy > 10.0)
- {
- CarTracking[i][3] = 90.0;
- }
- else
- {
- CarTracking[i][3] = 45.0;
- }
- }
- }
- specflick = 0;
- }
- pa = CarTracking[i][3];
- // new formated[256];
- // format(formated, sizeof(formated), "Debug:CarAngle (%f)",CarTracking[i][3]);
- // SendClientMessageToAll(COLOR_WHITE, formated);
- }
- else
- {
- GetPlayerFacingAngle(targetid,pa);
- }
- if(pa >= 0.0 && pa <= 22.5) //n1
- {
- SetPlayerCameraPos(i, px, py-(dist), pz+hight);
- }
- if(pa >= 332.5 && pa < 0.0) //n2
- {
- SetPlayerCameraPos(i, px, py-(dist), pz+hight);
- }
- if(pa >= 22.5 && pa <= 67.5) //nw
- {
- SetPlayerCameraPos(i, px+(dist/2), py-(dist/2), pz+hight);
- }
- if(pa >= 67.5 && pa <= 112.5) //w
- {
- SetPlayerCameraPos(i, px+(dist), py, pz+hight);
- }
- if(pa >= 112.5 && pa <= 157.5) //sw
- {
- SetPlayerCameraPos(i, px+(dist/2), py+(dist/2), pz+hight);
- }
- if(pa >= 157.5 && pa <= 202.5) //s
- {
- SetPlayerCameraPos(i, px, py+(dist), pz+hight);
- }
- if(pa >= 202.5 && pa <= 247.5)//se
- {
- SetPlayerCameraPos(i, px-(dist/2), py+(dist/2), pz+hight);
- }
- if(pa >= 247.5 && pa <= 292.5)//e
- {
- SetPlayerCameraPos(i, px-(dist), py, pz+hight);
- }
- if(pa >= 292.5 && pa <= 332.5)//e
- {
- SetPlayerCameraPos(i, px-(dist/2), py-(dist/2), pz+hight);
- }
- SetPlayerPos(i, px, py, pz+110);
- }
- else if(Unspec[i][sCam] == 5)
- {
- SetPlayerPos(i, px, py, pz+40);
- }
- else if(Unspec[i][sCam] == 6)
- {
- SetPlayerPos(i, rsx, rsy, rsz+100);
- SetPlayerCameraPos(i, rsx, rsy+4, rsz+2);
- }
- else if(Unspec[i][sCam] == 7)
- {
- SetPlayerPos(i, rmx, rmy, rmz+100);
- SetPlayerCameraPos(i, rmx, rmy+4, rmz+2);
- }
- else if(Unspec[i][sCam] == 8)
- {
- SetPlayerPos(i, rm2x, rm2y, rm2z+100);
- SetPlayerCameraPos(i, rm2x, rm2y+4, rm2z+2);
- }
- else if(Unspec[i][sCam] == 9)
- {
- SetPlayerPos(i, rex, rey, rez+100);
- SetPlayerCameraPos(i, rex, rey+4, rez+2);
- }
- else if(Unspec[i][sCam] == 10)
- {
- new house = Unspec[i][sLocal];
- SetPlayerPos(i,HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]+100);
- SetPlayerCameraPos(i, HouseInfo[house][hEntrancex], HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez]+2.0);
- SetPlayerInterior(i,0);
- }
- SetPlayerCameraLookAt(i,px,py,pz);
- }
- if(Spectate[i] == 253)
- {
- TogglePlayerControllable(i, 1);
- SetPlayerInterior(i,Unspec[i][sPint]);
- PlayerInfo[i][pInt] = Unspec[i][sPint];
- PlayerInfo[i][pLocal] = Unspec[i][sLocal];
- Unspec[i][sLocal] = 255;
- SetSpawnInfo(i, 1, PlayerInfo[i][pModel], Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]-1.0, 1.0, -1, -1, -1, -1, -1, -1);
- //SetPlayerPos(i, Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]);
- gTeam[i] = PlayerInfo[i][pTeam];
- SetPlayerToTeamColor(i);
- SpawnPlayer(i);
- Spectate[i] = 255;
- }
- if(Spectate[i] == 254)
- {
- TogglePlayerControllable(i, 1);
- SetPlayerInterior(i,Unspec[i][sPint]);
- PlayerInfo[i][pInt] = Unspec[i][sPint];
- PlayerInfo[i][pLocal] = Unspec[i][sLocal];
- SetPlayerPos(i, Unspec[i][sPx], Unspec[i][sPy], Unspec[i][sPz]);
- SetPlayerToTeamColor(i);
- Spectate[i] = 255;
- }
- if(Spectate[i] == 256)
- {
- SetPlayerToTeamColor(i);
- Spectate[i] = 255;
- }
- if(Spectate[i] == 257)
- {
- Spectate[i] = 254;
- }
- }
- }
- if(specflick < 2)
- {
- specflick++;
- }
- else
- {
- specflick = 0;
- }
- }
- public Three()
- {
- GameTextForAll("~w~3",3000,4);
- return true;
- }
- public Two()
- {
- GameTextForAll("~w~2",3000,4);
- return true;
- }
- public One()
- {
- GameTextForAll("~w~1",3000,4);
- return true;
- }
- public Go()
- {
- GameTextForAll("~r~GO GO GO!!!",3000,4);
- return true;
- }
- public CountdownSpam()
- {
- new playerid;
- blockspam[playerid]=0;
- return true;
- }
- //---------------------------------
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if (gdebug >= 1){printf("DEBUG OnPlayerEnterVehicle(%d, %d, %d)", playerid, vehicleid, ispassenger);}
- if(gTeam[playerid] == TEAM_GREEN)
- {
- if (IsACopCar(vehicleid) && !ispassenger)
- {
- SetPlayerCriminal(playerid,255, "Krade policijsko vozilo",0,0);
- if(FlashTime[playerid] == 0){FlashTime[playerid] = 10;}
- }
- if (IsAnAmbulance(vehicleid) && !ispassenger)
- {
- SetPlayerCriminal(playerid,255, "Krade vozilo hitne pomoci",0,0);
- if(FlashTime[playerid] == 0){FlashTime[playerid] = 10;}
- }
- }
- new string[400];
- if (PlayerInfo[playerid][pAdmin] >= 1337)
- {
- format(string, sizeof(string), "Ulazis u vozilo %d",gLastCar[playerid]);
- SendClientMessage(playerid,COLOR_WHITE, string);
- }
- new carid;
- carid = PlayerInfo[playerid][pPhousekey]+1;
- if(PlayerInfo[playerid][pPhousekey] == carid-1)
- {
- //-------------- Wheels Arch Angels (ALL ALIEN STUFF)-------------------------
- if(GetVehicleModel(vehicleid) == 560)// SULTAN
- {
- if(PlayerInfo[playerid][pTVec] == 560)
- {
- AddVehicleComponent(vehicleid,1026);//lsideskirt
- AddVehicleComponent(vehicleid,1027);//rsideskirt
- AddVehicleComponent(vehicleid,1028);//exhaust
- AddVehicleComponent(vehicleid,1032);//roof vent
- AddVehicleComponent(vehicleid,1138);//spoiler
- AddVehicleComponent(vehicleid,1141);//rbumper
- AddVehicleComponent(vehicleid,1141);//fbumper
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1010);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- if(GetVehicleModel(vehicleid) == 562)// ELEGY
- {
- if(PlayerInfo[playerid][pTVec] == 562)
- {
- AddVehicleComponent(vehicleid,1036);//lsideskirt
- AddVehicleComponent(vehicleid,1040);//rsideskirt
- AddVehicleComponent(vehicleid,1034);//exhaust
- AddVehicleComponent(vehicleid,1038);//roof vent
- AddVehicleComponent(vehicleid,1147);//spoiler
- AddVehicleComponent(vehicleid,1149);//rbumper
- AddVehicleComponent(vehicleid,1171);//fbumper
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1010);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- if(GetVehicleModel(vehicleid) == 565)// FLASH
- {
- if(PlayerInfo[playerid][pTVec] == 565)
- {
- AddVehicleComponent(vehicleid,1047);//lsideskirt
- AddVehicleComponent(vehicleid,1051);//rsideskirt
- AddVehicleComponent(vehicleid,1046);//exhaust
- AddVehicleComponent(vehicleid,1054);//roof vent
- AddVehicleComponent(vehicleid,1049);//spoiler
- AddVehicleComponent(vehicleid,1150);//rbumper
- AddVehicleComponent(vehicleid,1153);//fbumper
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1010);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- if(GetVehicleModel(vehicleid) == 561)// STRATUM
- {
- if(PlayerInfo[playerid][pTVec] == 561)
- {
- AddVehicleComponent(vehicleid,1056);//lsideskirt
- AddVehicleComponent(vehicleid,1062);//rsideskirt
- AddVehicleComponent(vehicleid,1064);//exhaust
- AddVehicleComponent(vehicleid,1055);//roof vent
- AddVehicleComponent(vehicleid,1058);//spoiler
- AddVehicleComponent(vehicleid,1154);//rbumper
- AddVehicleComponent(vehicleid,1155);//fbumper
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1010);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- if(GetVehicleModel(vehicleid) == 559)// JESTER
- {
- if(PlayerInfo[playerid][pTVec] == 559)
- {
- AddVehicleComponent(vehicleid,1069);//lsideskirt
- AddVehicleComponent(vehicleid,1071);//rsideskirt
- AddVehicleComponent(vehicleid,1065);//exhaust
- AddVehicleComponent(vehicleid,1067);//roof vent
- AddVehicleComponent(vehicleid,1162);//spoiler
- AddVehicleComponent(vehicleid,1159);//rbumper
- AddVehicleComponent(vehicleid,1160);//fbumper
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1010);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- if(GetVehicleModel(vehicleid) == 558)// URANUS
- {
- if(PlayerInfo[playerid][pTVec] == 558)
- {
- AddVehicleComponent(vehicleid,1090);//lsideskirt
- AddVehicleComponent(vehicleid,1094);//rsideskirt
- AddVehicleComponent(vehicleid,1092);//exhaust
- AddVehicleComponent(vehicleid,1088);//roof vent
- AddVehicleComponent(vehicleid,1164);//spoiler
- AddVehicleComponent(vehicleid,1168);//rbumper
- AddVehicleComponent(vehicleid,1166);//fbumper
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1010);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- //-------- Loco Low-Co---------------------------------------------
- if(GetVehicleModel(vehicleid) == 575)// BROADWAY
- {
- if(PlayerInfo[playerid][pTVec] == 575)
- {
- AddVehicleComponent(vehicleid,1042);//lsideskirt
- AddVehicleComponent(vehicleid,1099);//rsideskirt
- AddVehicleComponent(vehicleid,1044);//exhaust chromer
- AddVehicleComponent(vehicleid,1176);//rbumper chromer
- AddVehicleComponent(vehicleid,1174);//fbumperchromer
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1086);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- if(GetVehicleModel(vehicleid) == 534)// REMINGTON
- {
- if(PlayerInfo[playerid][pTVec] == 534)
- {
- AddVehicleComponent(vehicleid,1122);//lsideskirt flame
- AddVehicleComponent(vehicleid,1101);//rsideskirt flame
- AddVehicleComponent(vehicleid,1126);//exhaust chromer
- AddVehicleComponent(vehicleid,1123);//bullbar chrome bars
- AddVehicleComponent(vehicleid,1180);//rbumper
- AddVehicleComponent(vehicleid,1179);//fbumper
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1086);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- if(GetVehicleModel(vehicleid) == 567)// SAVANNA
- {
- if(PlayerInfo[playerid][pTVec] == 567)
- {
- AddVehicleComponent(vehicleid,1133);//lsideskirt chromestrip
- AddVehicleComponent(vehicleid,1102);//rsideskirt chromestrip
- AddVehicleComponent(vehicleid,1129);//exhaust chromer
- AddVehicleComponent(vehicleid,1130);//roof hardtop
- AddVehicleComponent(vehicleid,1187);//rbumper chromer
- AddVehicleComponent(vehicleid,1189);//fbumper chromer
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1086);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- if(GetVehicleModel(vehicleid) == 536)// BLADE
- {
- if(PlayerInfo[playerid][pTVec] == 536)
- {
- AddVehicleComponent(vehicleid,1108);//lsideskirt chromestrip
- AddVehicleComponent(vehicleid,1107);//rsideskirt chromestrip
- AddVehicleComponent(vehicleid,1104);//exhaust chromer
- AddVehicleComponent(vehicleid,1128);//roof vinyl hardtop
- AddVehicleComponent(vehicleid,1184);//rbumper chromer
- AddVehicleComponent(vehicleid,1182);//fbumper chromer
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1086);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- if(GetVehicleModel(vehicleid) == 576)// TORNADO
- {
- if(PlayerInfo[playerid][pTVec] == 576)
- {
- AddVehicleComponent(vehicleid,1134);//lsideskirt chromestrip
- AddVehicleComponent(vehicleid,1137);//rsideskirt chromestrip
- AddVehicleComponent(vehicleid,1136);//exhaust chromer
- AddVehicleComponent(vehicleid,1190);//rbumper chromer
- AddVehicleComponent(vehicleid,1191);//fbumper chromer
- AddVehicleComponent(vehicleid,1087);//hydrolics
- AddVehicleComponent(vehicleid,1086);//nitro x10
- ChangeVehiclePaintjob(vehicleid,0);
- }
- }
- }
- return 1;
- }
- public IsAPlane(carid)
- {
- if((carid >= 93 && carid <=98) || carid == 87)
- {
- return 1;
- }
- return 0;
- }
- public IsACopCar(carid)
- {
- if((carid >= 62) && (carid <= 87))
- {
- return 1;
- }
- return 0;
- }
- public IsAnAmbulance(carid)
- {
- if((carid >= 88) && (carid <= 90))
- {
- return 1;
- }
- return 0;
- }
- public IsATruck(carid)
- {
- if(carid >= 105 && carid <= 108)
- {
- return 1;
- }
- return 0;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerConnect(playerid)
- {
- SendDeathMessage(INVALID_PLAYER_ID,playerid,200);
- if (gdebug >= 1){printf("DEBUG OnPlayerConnect(%d)", playerid);}
- gActivePlayers[playerid]++;
- numplayers++;
- new plname[128];
- new playaname[128];
- new string[128];
- //TelePos[playerid][0] = 0;
- //TelePos[playerid][1] = 0;
- //TelePos[playerid][2] = 0;
- SafeTime[playerid] = 60;
- BetRace[playerid][0] = 255;
- BetRace[playerid][1] = 0;
- BetDm[playerid][0] = 255;
- BetDm[playerid][1] = 0;
- //HidePM[playerid] = 0;
- gPlayerFighter[playerid] = 0;
- DmScore[playerid] = 0;
- Mobile[playerid] = 255;
- Spectate[playerid] = 255;
- Unspec[playerid][sLocal] = 255;
- gSkyDive[playerid] = 0;
- TVMode[playerid] = 0;
- gLastCar[playerid] = 0;
- FirstSpawn[playerid] = 0;
- gPlayerLapStatus[playerid] = 0;
- gOoc[playerid] = 0;
- BigEar[playerid] = 0;
- FlashTime[playerid] = 0;
- gDice[playerid] = 0;
- HidePM[playerid] = 0;
- gSpeedo[playerid] = 0;
- gPlayerLogged[playerid] = 0;
- gPlayerAccount[playerid] = 0;
- gPlayerSpawned[playerid] = 0;
- LapCount[playerid] = 0;
- Mute[playerid] = 0;
- StartTime[playerid] = 0;
- gRaceGuy[playerid] = 0;
- Contract[playerid] = 0;
- gPlayerMission[playerid] = 0;
- PlayerInfo[playerid][pCash] = dollah;
- KickVote[playerid] = 0;
- VoteKick[playerid] = 0;
- LastVote[playerid] = 255;
- HireCar[playerid] = 299;
- Hidden[playerid] = 0;
- Locator[playerid] = 0;
- PLicence[playerid] = 0;
- gPhoneBook[playerid] = 0;
- //PlayerPos[playerid][3] = 1.0;
- //PlayerPos[playerid][4] = 1.0;
- //PlayerPos[playerid][5] = 1.0;
- GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
- PlayerInfo[playerid][pAccount] = 0;
- PlayerInfo[playerid][pAdmin] = 0;
- PlayerInfo[playerid][pCHBodovi] = 0;
- PlayerInfo[playerid][pGameSage] = 0;
- PlayerInfo[playerid][pLevel] = 1;
- PlayerInfo[playerid][pExp] = 0;
- PlayerInfo[playerid][gPupgrade] = 0;
- PlayerInfo[playerid][pKills] = 0;
- PlayerInfo[playerid][pCB] = 0;
- PlayerInfo[playerid][pHW] = 0;
- PlayerInfo[playerid][pSR] = 0;
- PlayerInfo[playerid][pWA] = 0;
- PlayerInfo[playerid][pPEN] = 0;
- PlayerInfo[playerid][pGun1] = 0;
- PlayerInfo[playerid][pGun2] = 0;
- PlayerInfo[playerid][pGun3] = 0;
- PlayerInfo[playerid][pGun4] = 0;
- PlayerInfo[playerid][pGun5] = 0;
- PlayerInfo[playerid][pGun6] = 0;
- PlayerInfo[playerid][pLeader] = 0;
- PlayerInfo[playerid][pMember] = 0;
- PlayerInfo[playerid][pFMember] = 255;
- PlayerInfo[playerid][pRank] = 0;
- PlayerInfo[playerid][pChar] = 0;
- PlayerInfo[playerid][pAmmo1] = 200;
- PlayerInfo[playerid][pAmmo2] = 8;
- PlayerInfo[playerid][pAmmo3] = 30;
- PlayerInfo[playerid][pAmmo4] = 30;
- PlayerInfo[playerid][pAmmo5] = 10;
- PlayerInfo[playerid][pAmmo6] = 10;
- PlayerInfo[playerid][pSHealth] = 0.0;
- PlayerInfo[playerid][pHealth] = 50.0;
- PlayerInfo[playerid][pPos_x] = 2246.6;
- PlayerInfo[playerid][pPos_y] = -1161.9;
- PlayerInfo[playerid][pPos_z] = 1029.7;
- PlayerInfo[playerid][pInt] = 15;
- PlayerInfo[playerid][pLocal] = 255;
- PlayerInfo[playerid][pTeam] = 1;
- PlayerInfo[playerid][pModel] = 29;
- PlayerInfo[playerid][pMuteTime] = 0;
- PlayerInfo[playerid][pMuted] = 0;
- PlayerInfo[playerid][pWarns] = 0;
- new randphone = 1000 + random(8999);//minimum 1000 max 9999 //giving one at the start
- PlayerInfo[playerid][pPnumber] = randphone;
- PlayerInfo[playerid][pPhousekey] = 255;
- PlayerInfo[playerid][pPbiskey] = 255;
- PlayerInfo[playerid][pTVec] = 0;
- PlayerInfo[playerid][pReg] = 0;
- ClearCrime(playerid);
- //------------text servera
- Textdraw0 = TextDrawCreate(551.000000, 408.000000, "CroHerze");
- TextDrawBackgroundColor(Textdraw0, 255);
- TextDrawFont(Textdraw0, 3);
- TextDrawLetterSize(Textdraw0, 0.380000, 1.100000);
- TextDrawColor(Textdraw0, 865717503);
- TextDrawSetOutline(Textdraw0, 0);
- TextDrawSetProportional(Textdraw0, 1);
- TextDrawSetShadow(Textdraw0, 1);
- TextDrawShowForPlayer(playerid, Text:Textdraw0);
- Textdraw1 = TextDrawCreate(541.000000, 420.000000, "DEATHMATCH");
- TextDrawBackgroundColor(Textdraw1, 255);
- TextDrawFont(Textdraw1, 3);
- TextDrawLetterSize(Textdraw1, 0.380000, 1.400000);
- TextDrawColor(Textdraw1, -1);
- TextDrawSetOutline(Textdraw1, 0);
- TextDrawSetProportional(Textdraw1, 1);
- TextDrawSetShadow(Textdraw1, 1);
- TextDrawShowForPlayer(playerid, Text:Textdraw1);
- //---------------------------
- printf("Player Connecting as (%d)", playerid);
- SetPlayerColor(playerid,COLOR_GRAD2);
- SetPlayerToTeamColor(playerid);
- GetPlayerName(playerid, plname, sizeof(plname));
- GetPlayerName(playerid, playaname, sizeof(playaname));
- //SetPlayerCameraPos(playerid,1460.0, -1324.0, 287.2);
- //SetPlayerCameraLookAt(playerid,1374.5, -1291.1, 239.0);
- format(playaname,sizeof(playaname)," ",playaname);
- if (PlayerInfo[playerid][pAdmin] >= 1339)
- SendAdminMessage(COLOR_GRAD3,playaname);
- format(string, sizeof(string), "%s.ini", plname);
- if(fexist(string))
- {
- gPlayerAccount[playerid] = 1;
- new loginstring[400];
- new loginname[64];
- GetPlayerName(playerid,loginname,sizeof(loginname));
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- format(loginstring,sizeof(loginstring),"{33BBFF}___________________________________________\n\n{FFFFFF}Dobrodosao na CroHerze DeathMatch Server\n\n{33BBFF}%s\n{FFFFFF}Tvoj korisnicki racun je pronadjen!\n\nMolimo upisi svoju lozinku da udjes na server:\n{33BBFF}___________________________________________",loginname);
- ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"{FFFFFF}Logiranje",loginstring,"Logiraj","Odustani");
- return 1;
- }
- else
- {
- gPlayerAccount[playerid] = 0;
- new regstring[400];
- new regname[64];
- GetPlayerName(playerid,regname,sizeof(regname));
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- SendClientMessage(playerid, COLOR_WHITE, " ");
- format(regstring,sizeof(regstring),"{FFFFFF}Dobrodosli na pocetak registracije \n{33BBFF}%s\n{FFFFFF}Vas racun nije registriran, molimo upisite zeljenu lozinku:",regname);
- ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{33BBFF}Registracija",regstring,"Registriraj","Odustani");
- return 1;
- }
- }
- public ClearCrime(playerid)
- {
- if (gdebug >= 1){printf("DEBUG ClearCrime(%d)", playerid);}
- new string[MAX_PLAYER_NAME];
- format(string, sizeof(string), "********");
- strmid(PlayerCrime[playerid][pBplayer], string, 0, strlen(string), 255);
- strmid(PlayerCrime[playerid][pVictim], string, 0, strlen(string), 255);
- strmid(PlayerCrime[playerid][pAccusing], string, 0, strlen(string), 255);
- strmid(PlayerCrime[playerid][pAccusedof], string, 0, strlen(string), 255);
- return 1;
- }
- public BetWinner(playerid,contest)
- {
- new winname[MAX_PLAYER_NAME];
- new better[MAX_PLAYER_NAME];
- new string[256];
- GetPlayerName(playerid, winname, sizeof(winname));
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- if(contest == 1)
- {
- if(BetRace[i][0] == playerid)
- {
- GivePlayerMoney(i,BetRace[i][1]*2);
- BizzInfo[5][bTakings] -= (BetRace[i][1]*2);
- format(string, sizeof(string), "______-= %s =-_______", BizzInfo[5][bDiscription]);
- SendClientMessage(i, TEAM_VAGOS_COLOR,string);
- format(string, sizeof(string), " Osvojio si $%d na %s na ulicnoj trci", BetRace[i][1]*2, winname);
- SendClientMessage(i, COLOR_WHITE, string);
- SendClientMessage(i, TEAM_VAGOS_COLOR,"_______________________________________");
- PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
- GetPlayerName(i, better, sizeof(better));
- format(string, sizeof(string), "%s won $%d on %s", better, BetRace[i][1]*2, winname);
- printf("%s", string);
- PayLog(string);
- }
- BetRace[i][0] = 255;
- BetRace[i][1] = 0;
- }
- if(contest == 2)
- {
- if(BetDm[i][0] == playerid)
- {
- GivePlayerMoney(i,BetDm[i][1]*2);
- BizzInfo[5][bTakings] -= (BetDm[i][1]*2);
- format(string, sizeof(string), "______-= %s =-_______", BizzInfo[5][bDiscription]);
- SendClientMessage(i, TEAM_VAGOS_COLOR,string);
- format(string, sizeof(string), " Osvojio si $%d na %s na deathmatch-u", BetDm[i][1]*2, winname);
- SendClientMessage(i, COLOR_WHITE, string);
- SendClientMessage(i, TEAM_VAGOS_COLOR,"_______________________________________");
- PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
- GetPlayerName(i, better, sizeof(better));
- format(string, sizeof(string), "%s won $%d on %s", better, BetDm[i][1]*2, winname);
- printf("%s", string);
- PayLog(string);
- }
- BetDm[i][0] = 255;
- BetDm[i][1] = 0;
- }
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerDisconnect(playerid,reason)
- {
- SendDeathMessage(INVALID_PLAYER_ID,playerid,201);
- MidoStreamDisconnect(playerid);
- TextDrawDestroy(Textdraw0);
- printf("DEBUG OnPlayerDisconnect(%d)1", playerid);
- gActivePlayers[playerid]--;
- numplayers--;
- SendLeaveMessage(playerid, reason);
- if (DmHiPlayer == playerid)
- {
- DmHiPlayer = INVALID_PLAYER_ID;
- new tmp1;
- new tmp2;
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(DmScore[i] > tmp1 && IsPlayerConnected(i) == 1)
- {
- DmScore[i] = tmp1;
- i = tmp2;
- }
- }
- if(DmHiPlayer != 255)
- {
- DmHiPlayer = tmp2;
- new dmname[MAX_PLAYER_NAME];
- new string[256];
- GetPlayerName(DmHiPlayer, dmname, sizeof(dmname));
- DmHiScore = DmScore[DmHiPlayer];
- format(string, sizeof(string), "DM Vijesti | %s vodi s: %d ", dmname,DmHiScore);
- BroadCast(COLOR_WHITE, string);
- }
- }
- if (gPublicEnemy == playerid)
- {
- gPublicEnemy = INVALID_PLAYER_ID;
- GivePlayerMoney(playerid, -reward);
- KillTimer(offhook);
- }
- OnUpdatePlayer(playerid);
- printf("DEBUG OnPlayerDisconnect(%d)2", playerid);
- printf("DEBUG OnPlayerDisconnect(%d)3", playerid);
- if(HireCar[playerid] != 299)
- {
- gLastDriver[HireCar[playerid]] = 300;
- gCarLock[HireCar[playerid]] = 0;
- UnLockCar(HireCar[playerid]);
- }
- if (gLastCar[playerid] > 0)
- {
- gLastDriver[gLastCar[playerid]] = 300;
- if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
- {
- gCarLock[gLastCar[playerid]] = 0;
- UnLockCar(gLastCar[playerid]);
- }
- }
- printf("DEBUG OnPlayerDisconnect(%d)4", playerid);
- if (gPlayerCheckpointStatus[playerid] == CHECKPOINT_DROPOFF)
- {
- DisablePlayerCheckpoint(playerid);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
- MissionActive = 0;
- if (gdebug){print("DEBUG MissionActive = 0;");}
- }
- if (gSuperCop == playerid)
- {
- gSuperCop = INVALID_PLAYER_ID;
- }
- if (PlayerInfo[playerid][pAdmin] >= 2)
- SendClientMessageToAll(COLOR_ORANGE,"| ZeroASL | Prebacujem na full mod zastite servera...");
- }
- public SetPlayerRandomSpawn(playerid)
- {
- new rand;
- new playername[32];
- new house = PlayerInfo[playerid][pPhousekey];
- GetPlayerName(playerid, playername, sizeof(playername));
- if(gPlayerFighter[playerid] == 1)
- {
- new string[256];
- gTeam[playerid] = 4;
- rand = random(sizeof(gRandomDMSpawns)-2)+1;
- SetPlayerPos(playerid, gRandomDMSpawns[rand][0], gRandomDMSpawns[rand][1], gRandomDMSpawns[rand][2]); // Warp the player
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- format(string, sizeof(string), " ~r~%d~w~|~g~%d",DmScore[playerid],DmHiScore);
- GameTextForPlayer(playerid, string, 5000, 6);
- if(gFightLeader < 1000)
- {
- TogglePlayerControllable(playerid, 0);
- }
- if (gdebug >=0){printf("DEBUG SPAWNED: Playerid:%d Team:%d DMPoint:%d", playerid, gTeam[playerid], rand);}
- return 1;
- }
- if(house !=255)
- {
- /*
- if(gTeam[playerid] <= 2 && strcmp(playername, HouseInfo[house][hOwner], true) == 0 || gTeam[playerid] > 2)
- {
- */
- SetPlayerToTeamColor(playerid);
- SetPlayerInterior(playerid,HouseInfo[house][hInt]);
- SetPlayerPos(playerid, HouseInfo[house][hExitx], HouseInfo[house][hExity],HouseInfo[house][hExitz]); // Warp the player
- PlayerInfo[playerid][pLocal] = house;
- PlayerInfo[playerid][pInt] = HouseInfo[house][hInt];
- if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
- return 1;
- //}
- }
- if ((gTeam[playerid]) == 2)
- {
- SetPlayerToTeamColor(playerid);
- rand = random(sizeof(gCopPlayerSpawns));
- SetPlayerPos(playerid, gCopPlayerSpawns[rand][0], gCopPlayerSpawns[rand][1], gCopPlayerSpawns[rand][2]); // Warp the player
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
- return 1;
- }
- if ((gTeam[playerid]) == 1)
- {
- SetPlayerToTeamColor(playerid);
- rand = random(sizeof(gMedPlayerSpawns));
- SetPlayerPos(playerid, gMedPlayerSpawns[rand][0], gMedPlayerSpawns[rand][1], gMedPlayerSpawns[rand][2]); // Warp the player
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
- return 1;
- }
- else
- {
- SetPlayerToTeamColor(playerid);
- rand = random(sizeof(gRandomPlayerSpawns));
- SetPlayerPos(playerid, gRandomPlayerSpawns[rand][0], gRandomPlayerSpawns[rand][1], gRandomPlayerSpawns[rand][2]); // Warp the player
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- if (gdebug >=1){printf("DEBUG SPAWNED: Playerid:%d Team:%d SpawnPoint:%d", playerid, gTeam[playerid], rand);}
- return 1;
- }
- // return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendDeathMessage(killerid, playerid, reason);
- GivePlayerMoney(killerid,3000);
- if(killerid != 255)
- {
- if(GetPlayerState(killerid) == 2 && playerid != gPublicEnemy)
- {
- SendClientMessage(killerid, 0xDB023EFF, "ZeroAS: Napravili ste Drive By,ukoliko ovo ponovite mozete biti banani.");
- return 1;
- }
- }
- if(reason == 38)
- {
- new kstring[500];
- new kickname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, kickname, sizeof(kickname));
- format(kstring, sizeof(kstring), "| ZeroAS | DETEKCIJA CHEATA || %s[ID: %d]",kickname,playerid);
- format(kstring, sizeof(kstring), "Pronadjen MiniGun!!!",kickname,playerid);
- SendAdminMessage(0xDB023EFF, kstring);
- format(kstring, sizeof(kstring), "| ZeroAS Ban |: %s",kickname);
- format(kstring, sizeof(kstring), "| ZeroAS Ban | Razlog: nedozvoljena oruzja",kickname);
- printf("ZeroAS Ban | %s,CHEAT!", kstring);
- SendClientMessageToAll(COLOR_ORANGERED, kstring);
- Ban(killerid);
- }
- return 1;
- }
- public BanLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("ban.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public OnPlayerSpawn(playerid)
- {
- GangZoneShowForPlayer(playerid, FA, 65477);
- GangZoneShowForPlayer(playerid, GM, 16711888);
- GangZoneShowForPlayer(playerid, BM, 0x91FF22FF);
- GangZoneShowForPlayer(playerid, RUS, -65332);
- new house = PlayerInfo[playerid][pPhousekey];
- if (gdebug >=1){printf("OnPlayerSpawn Playerid:%d", playerid);}
- if (teamcarlock)
- {
- TeamLockDoors(playerid);
- }
- InitLockDoors(playerid);
- if(accountplay)
- {
- if (gdebug >=1){printf("accountplay");}
- if (gPlayerAccount[playerid] == 0)
- {
- gTeam[playerid] = 0;
- GameTextForPlayer(playerid, "~w~Dobro dosli.~n~Ukoliko zelite igrati na nasem serveru morate se registrirat, Pisite ~n~~r~/regnick (password)~w~ kako bi ste se registrirali", 20000, 3);
- //SetPlayerInterior(playerid,0);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid,-1178.9769,29.8044,0.6867);
- // airport
- PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000);
- gPlayerSpawned[playerid] = 1;
- return 1;
- }
- if (gPlayerLogged[playerid] == 0)
- {
- gTeam[playerid] = 0;
- GameTextForPlayer(playerid, "~w~Ukoliko zelite igrati na nasem serveru morate se logirati, pisite ~n~~g~/login (password)~w~ da se logirate", 20000, 3);
- //SetPlayerInterior(playerid,0);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- SetPlayerPos(playerid,-1178.9769,29.8044,0.6867);
- // airport
- PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000);
- gPlayerSpawned[playerid] = 1;
- return 1;
- }
- }
- if (gPlayerSpawned[playerid] == 1)
- {
- gTeam[playerid] = PlayerInfo[playerid][pTeam];
- if (gTeam[playerid] == 2 && forceteam && CopCheck(playerid))
- {
- gTeam[playerid] = 3;
- PlayerInfo[playerid][pTeam] = 3;
- SetPlayerRandomSpawn(playerid);
- SendClientMessage(playerid, COLOR_YELLOW, "CroHerze: Niste ovlasteni da budete policajac.");
- }
- /*
- if(gTeam[playerid] == 2 && PlayerInfo[playerid][pLevel] < 3)
- {
- gTeam[playerid] = 3;
- PlayerInfo[playerid][pTeam] = 3;
- SetPlayerRandomSpawn(playerid);
- SendClientMessage(playerid, COLOR_YELLOW, "SERVER: You must be level 3 to join the cops.");
- }
- */
- if (gTeam[playerid] == 1 && forceteam && MedCheck(playerid))
- {
- gTeam[playerid] = 3;
- PlayerInfo[playerid][pTeam] = 3;
- SetPlayerRandomSpawn(playerid);
- SendClientMessage(playerid, COLOR_YELLOW, "CroHerze: Niste ovlasteni da budete bolnicar.");
- }
- if (gTeam[playerid] == 4) //medic / criminal reset team
- {
- gTeam[playerid] = PlayerInfo[playerid][pTeam];
- }
- /*
- if (FirstSpawn[playerid] == 0)
- {
- SetPlayerToTeamColor(playerid);
- SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
- printf("PlayerInfo[playerid][pInt]= %d",PlayerInfo[playerid][pInt]);
- SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
- gPlayerSpawned[playerid] = 1;
- FirstSpawn[playerid] = 1;
- print("insidespawn or firstsawpn");
- return 1;
- }
- */
- SetPlayerRandomSpawn(playerid);
- if (gdebug){printf("DEBUG id = %d gTeam = %d",playerid,gTeam[playerid]);}
- //SetPlayerPos(playerid, 1360.0217,2565.6328,10.8265);///badspawn
- //SetPlayerWorldBounds(playerid,3500.00,66.67,-653.33,-2806.67);
- /*
- switch (MissionActive)
- {
- case 1://Cashbox not picked up
- {
- if ((gTeam[playerid]) == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, objstore);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_PICKUP;
- }
- else if (gTeam[playerid] == 2)
- {
- SendClientMessage(playerid, TEAM_BLUE_COLOR, cbjstore);
- }
- SetPlayerCheckpoint(playerid,cwx, cwy, cwz, 1.0);
- }
- case 2://Cashbox picked up firsttime
- {
- if ((gTeam[playerid]) == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, objstore);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
- }
- else if (gTeam[playerid] == 2)
- {
- SendClientMessage(playerid, TEAM_BLUE_COLOR, cbjstore);
- }
- SetPlayerCheckpoint(playerid,cwx, cwy, cwz, 1.0);
- }
- case 3://Cashbox was dropped
- {
- SetPlayerCheckpoint(playerid,cwx,cwy,cwz, 1.0);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_PICKUP;
- return 1;
- }
- case 5://racewait
- {
- if (gdebug){print("DEBUG Checkp5");}
- if ((gTeam[playerid]) == 1)
- {
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SR1START;
- }
- SetPlayerCheckpoint(playerid,cwx,cwy,cwz, 8.0);
- return 1;
- }
- case 6://racewait
- {
- if (gdebug){print("DEBUG Checkp5");}
- if ((gTeam[playerid]) == 1 || (gTeam[playerid]) == 3)
- {
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
- }
- SetPlayerCheckpoint(playerid,cwx,cwy,cwz, 8.0);
- return 1;
- }
- case 7://progress
- {
- if (gdebug){print("DEBUG Checkp5");}
- if ((gTeam[playerid]) == 1)
- {
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
- SetPlayerCheckpoint(playerid,cwx,cwy,cwz, 8.0);
- }
- if ((gTeam[playerid]) == 2 )
- {
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SR1START;
- SetPlayerCheckpoint(playerid,scx,scy,scz, 8.0);
- }
- return 1;
- }
- case 9://Car is waiting first occupent
- {
- if (gTeam[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, objstore);
- SetVehicleParamsForPlayer(stealcar,playerid,1,0);
- }
- else if (gTeam[playerid] == 2)
- {
- SendClientMessage(playerid, TEAM_BLUE_COLOR, cbjstore);
- SetVehicleParamsForPlayer(stealcar,playerid,1,1);
- }
- }
- case 10://Car has been takin by Criminal
- {
- if (gTeam[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, objstore);
- }
- else if (gTeam[playerid] == 2)
- {
- SendClientMessage(playerid, TEAM_BLUE_COLOR, cbjstore);
- }
- SetPlayerCheckpoint(playerid, cwx, cwy, cwz, 16.0);
- SetVehicleParamsForPlayer(stealcar,playerid,1,0);
- }
- case 101://Car is empty but was takin
- {
- SetVehicleParamsForPlayer(stealcar,playerid,1,0);
- }
- default:
- {
- }
- }
- */
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, ">>> CroHerze DM Server zahtijeva logiranje prije spawna(izbacen)");
- Kick(playerid);
- }
- if(PlayerInfo[playerid][pMember] == 6|| PlayerInfo[playerid][pLeader] == 6 )
- {
- SetPlayerPos(playerid,1292.4642,-790.1343,92.0313);
- SetPlayerInterior(playerid,0);
- }
- if(PlayerInfo[playerid][pMember] == 9|| PlayerInfo[playerid][pLeader] == 9 )
- {
- SetPlayerPos(playerid,1126.3317,-2037.6862,69.8833);
- SetPlayerInterior(playerid,0);
- }
- if(PlayerInfo[playerid][pMember] == 8|| PlayerInfo[playerid][pLeader] == 8 )
- {
- SetPlayerPos(playerid,1654.9467,-1656.8705,22.5156);
- SetPlayerInterior(playerid,0);
- }
- if(PlayerInfo[playerid][pMember] == 5|| PlayerInfo[playerid][pLeader] == 5 )
- {
- SetPlayerPos(playerid,2508.8794,-1686.5829,13.5654);
- SetPlayerInterior(playerid,0);
- }
- }
- return 1;
- }
- //---------------------------------------CHECKPOINT----------------------------------------------------
- public PayLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("pay.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public CmdLog(string[])
- {
- new entry[256];
- format(entry, sizeof(entry), "%s\n",string);
- new File:hFile;
- hFile = fopen("cmd.log", io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
- public PrePlayerNewMission()
- {
- if (gdebug >=1){printf("PrePlayerNewMission");}
- CheckpointReset();
- if (MissionActive == 12)
- {
- gFighters=0;
- gFightLeader=0;
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- DmScore[i] = 0;
- if(gPlayerFighter[i] == 1)
- {
- gPlayerFighter[i] = 0;
- TogglePlayerControllable(i, 1);
- SetPlayerRandomSpawn(i);
- }
- }
- }
- }
- if (MissionActive > 8 && MissionActive < 12)
- {
- if(MissionActive != 0)
- {
- printf("DEBUG: Bad Hotwire: stealcar = %d, stealcardest = %d",stealcar,stealcardest);
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(stealcar != -1)
- {
- SetVehicleParamsForPlayer(stealcar,i,0,0);
- SetVehicleToRespawn(stealcar);
- stealcar = -1;
- }
- }
- }
- }
- }
- if (MissionActive > 4 && MissionActive <= 7 )
- {
- RaceCheckpointReset();
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- LapCount[i] = 0;
- StartTime[i] = 0;
- }
- }
- gRaceFin = 0;
- gRaceMid = 0;
- gRaceMid2 = 0;
- gRaceEnd = 0;
- gLaps = 0;
- BroadCast(COLOR_WHITE, "Vijesti | Utrka je zavrsila");
- }
- if (cashbox == 0 && hotwire == 0 && streetrace == 0 && deathmatch == 0)
- {
- MissionActive = 255;
- if (gdebug){print("DEBUG MissionActive = 255");}
- return 1;
- }
- if (cashbox == 0 && hotwire == 0 && streetrace == 1 && deathmatch == 0)
- {
- MissionActive = 4;
- if (gdebug){print("DEBUG MissionActive = 4");}
- SetPlayerNewMission();
- return 1;
- }
- if (cashbox == 0 && hotwire == 0 && streetrace == 0 && deathmatch == 1)
- {
- MissionActive = 12;
- if (gdebug){print("DEBUG MissionActive = 12");}
- SetPlayerNewMission();
- return 1;
- }
- if (MissionActive == 0)
- {
- if (cashbox == 0)
- {
- MissionActive = 4;
- if (gdebug){print("DEBUG MissionActive = 4");}
- }
- else
- {
- MissionActive = 0;
- if (gdebug){print("DEBUG MissionActive = 0");}
- }
- SetPlayerNewMission();
- return 1;
- }
- if (MissionActive > 0 && MissionActive <= 4)
- {
- if (streetrace == 0)
- {
- MissionActive = 8;
- if (gdebug){print("DEBUG MissionActive = 8");}
- }
- else
- {
- MissionActive = 4;
- if (gdebug){print("DEBUG MissionActive = 4");}
- }
- SetPlayerNewMission();
- return 1;
- }
- if (MissionActive > 4 && MissionActive <= 8 )
- {
- if (hotwire == 0)
- {
- MissionActive = 12;
- if (gdebug){print("DEBUG MissionActive = 12");}
- }
- else
- {
- MissionActive = 8;
- if (gdebug){print("DEBUG MissionActive = 8");}
- }
- SetPlayerNewMission();
- return 1;
- }
- if (MissionActive > 8 && MissionActive <= 12)
- {
- if (deathmatch == 0)
- {
- MissionActive = 0;
- if (gdebug){print("DEBUG MissionActive = 0");}
- }
- else
- {
- MissionActive = 12;
- if (gdebug){print("DEBUG MissionActive = 12");}
- }
- SetPlayerNewMission();
- return 1;
- }
- if (MissionActive == 13)
- {
- if (cashbox == 0)
- {
- MissionActive = 4;
- if (gdebug){print("DEBUG MissionActive = 4");}
- }
- else
- {
- MissionActive = 0;
- if (gdebug){print("DEBUG MissionActive = 0");}
- }
- SetPlayerNewMission();
- return 1;
- }
- return 1;
- }
- public SetPlayerNewMission()
- {
- if (gdebug >=1){printf("SetPlayerNewMission");}
- switch (MissionActive)
- {
- case 0:
- {
- new rando = random(5);
- if (rando == 1)
- {
- cwx = 997.7;
- cwy = -921.1;
- cwz = 42.1;
- format(objstore, sizeof(objstore), "SMS | Isplata je na benzinskoj na sjevernoj strani, Salje: MOLE (555)");
- format(cbjstore, sizeof(objstore), "SMS | Isplata je na benzinskoj na sjevernoj strani, Salje: MOLE (555)");
- }
- else if(rando == 2)
- {
- cwx = 2421.5;
- cwy = -1221.7;
- cwz = 25.3;
- format(objstore, sizeof(objstore), "SMS | Isplata je kod Pig Pen-a, Salje: MOLE (555)");
- format(cbjstore, sizeof(objstore), "SMS | Isplata je kod Pig Pen-a, Salje: MOLE (555)");
- }
- else if(rando == 3)
- {
- cwx = 2069.7;
- cwy = -1780.1;
- cwz = 13.5;
- format(objstore, sizeof(objstore), "SMS | Isplata je kod Tattoo sopa na istocnoj strani, Salje: MOLE (555)");
- format(cbjstore, sizeof(objstore), "SMS | Isplata je kod Tattoo sopa na istocnoj strani, Salje: MOLE (555)");
- }
- else if(rando == 4)
- {
- cwx = 1352.4;
- cwy = -1756.7;
- cwz = 13.5;
- format(objstore, sizeof(objstore), "SMS | Isplata je na Roboi's Food Mart, Sender: MOLE (555)");
- format(cbjstore, sizeof(objstore), "SMS | Isplata je na Roboi's Food Mart, Sender: MOLE (555)");
- }
- else
- {
- cwx = 1831.1;
- cwy = -1842.8;
- cwz = 13.5;
- format(objstore, sizeof(objstore), "SMS | Isplata je na 69 Cent Store, Sender: MOLE (555)");
- format(cbjstore, sizeof(objstore), "SMS | Isplata je na 69 Cent Store, Sender: MOLE (555)");
- }
- rx = cwx;//storing the store
- ry = cwy;
- rz = cwz;
- MissionActive = 1;
- if (gdebug){print("DEBUG MissionActive = 1;");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && gPlayerSpawned[i])
- {
- if (gTeam[i] >= 3)
- {
- if (automission)
- {
- JobGive(i);
- }
- else if (PlayerInfo[i][pPnumber] !=0)
- {
- SendClientMessage(i, COLOR_YELLOW, "SMS | Imam posao za tebe, napisi Yes na 555 za dodatne informacije, Salje: MOLE (555)");
- SendClientMessage(i, COLOR_WHITE, "Pomoc: Upisi (/sms 555 yes) da ti pokaze put do posla");
- RingTone[i] =20;
- }
- }
- else if (gPlayerSpawned[i] == 1 && (gTeam[i]) == 2)
- {
- SendClientMessage(i, COLOR_DBLUE, cbjstore);
- GameTextForPlayer(i, "~w~Waypoint postavljen ~n~~r~CashBox", 5000, 1);
- SetPlayerCheckpoint(i,cwx, cwy, cwz, 1.4);
- }
- }
- }
- return 1;
- }
- case 4:
- {
- gRaceFin = 0;
- gRaceMid = 0;
- gRaceMid2 = 0;
- if(randomrace)
- {
- RNext = random(sizeof(gRaceCheckpoints)-1);
- RNext2 = random(sizeof(gRaceCheckpoints));
- REnd = random(sizeof(gRaceCheckpoints));
- while (RNext == REnd)
- {
- REnd = random(sizeof(gRaceCheckpoints));
- }
- while (RNext2 == RNext)
- {
- RNext2 = random(sizeof(gRaceCheckpoints));
- }
- rsx = gRaceCheckpoints[4][0];
- rsy = gRaceCheckpoints[4][1];
- rsz = gRaceCheckpoints[4][2];
- rmx = gRaceCheckpoints[RNext][0];
- rmy = gRaceCheckpoints[RNext][1];
- rmz = gRaceCheckpoints[RNext][2];
- rm2x = gRaceCheckpoints[RNext2][0];
- rm2y = gRaceCheckpoints[RNext2][1];
- rm2z = gRaceCheckpoints[RNext2][2];
- rex = gRaceCheckpoints[REnd][0];
- rey = gRaceCheckpoints[REnd][1];
- rez = gRaceCheckpoints[REnd][2];
- }
- if(racelist > 0)
- {
- new randa = random(sizeof(Races));
- LoadRace(255,Races[randa]);
- }
- MissionActive = 5;
- if (gdebug){print("DEBUG MissionActive = 5");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (gPlayerSpawned[i] == 1))
- {
- if (gdebug){print("DEBUG Checkp4");}
- if (gTeam[i] >= 3)
- {
- if (automission)
- {
- JobGive(i);
- }
- else if (PlayerInfo[i][pPnumber] !=0)
- {
- SendClientMessage(i, COLOR_YELLOW, "SMS | Imam posao za tebe, napisi Yes na 555 za dodatne informacije, Salje: MOLE (555)");
- SendClientMessage(i, COLOR_WHITE, "Pomoc: Upisi (/sms 555 yes) da ti pokaze put do posla");
- RingTone[i] =20;
- }
- }
- else if((gTeam[i]) == 2 && RaceInfo[rLaps] == 0)
- {
- if (gdebug){print("DEBUG Checkp6");}
- format(cbjstore, sizeof(cbjstore), "SMS | Imam posao za tebe, napisi Yes na 555 za dodatne informacije, Salje: MOLE (555)");
- GameTextForPlayer(i, "~w~Waypoint postavljen na ~n~~r~RoadBlock", 5000, 1);
- SendClientMessage(i, COLOR_DBLUE, cbjstore);
- RingTone[i] = 20;
- SetPlayerRaceCheckpoint(i, 0, rm2x,rm2y,rm2z,rex,rey,rez, 8.0);
- }
- }
- }
- return 1;
- }
- case 8:
- {
- if (gdebug){print("DEBUG test1");}
- new rand = random(162);
- stealcar = hotwires[rand];
- GetVehiclePos(stealcar, scx, scy, scz);
- format(objstore, sizeof(objstore), "SMS | Kupac je zainteresiran za oznacen auto na tvom GPS sustavu, Salje: MOLE (555)");
- format(cbjstore, sizeof(cbjstore), "SMS | Kupac je zainteresiran za oznacen auto na tvom GPS sustavu, Salje: MOLE (555)");
- rx = scx;//storing the car pos
- ry = scy;
- rz = scz;
- if (gdebug){print("DEBUG TEST2");}
- new rand2 = random(162);
- stealcardest = hotwires[rand2];
- while (stealcardest == stealcar)
- {
- new rand3 = random(162);
- stealcardest = hotwires[rand3];
- }
- MissionActive = 9;
- if (gdebug){print("DEBUG MissionActive = 9;");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (gPlayerSpawned[i] == 1))
- {
- if (gdebug){print("DEBUG test2");}
- if (gTeam[i] >= 3)
- {
- if (automission)
- {
- JobGive(i);
- }
- else if (PlayerInfo[i][pPnumber] !=0)
- {
- SendClientMessage(i, COLOR_YELLOW, "SMS | Imam posao za tebe, napisi Yes na 555 za dodatne informacije, Salje: MOLE (555)");
- SendClientMessage(i, COLOR_WHITE, "Pomoc: Upisi (/sms 555 yes) da ti pokaze put do posla");
- RingTone[i] =20;
- }
- }
- else
- {
- if (gdebug){print("DEBUG test4");}
- SendClientMessage(i, COLOR_DBLUE, cbjstore);
- GameTextForPlayer(i, "~w~Waypoint postavljen na ~n~~y~Suspect Vehicle", 5000, 1);
- SetVehicleParamsForPlayer(stealcar,i,1,1);
- }
- }
- }
- if (gdebug){printf("DEBUG HOTWIRE mission started: TargetCar:%d",stealcar);}
- return 1;
- }
- case 12:
- {
- new rand = random(sizeof(DmGun));
- dmweapon = DmGun[rand];
- if(dmlist > 35)
- {
- dmlist = 1;
- //printf("racelist2 = %d",racelist);
- }
- new nextdm = random(sizeof(DeathMatches));
- LoadDM(255,DeathMatches[nextdm]);
- new sgun1[20];
- new winfo[256];
- if(DmGun[rand] > 0)
- {
- GetWeaponName(DmGun[rand], sgun1, 20);
- format(winfo, sizeof(winfo), "DM Oruzje | %s",sgun1);
- }
- else
- {
- format(winfo, sizeof(winfo), "DM Oruzje | Donesi svoje");
- }
- SendClientMessageToAll(COLOR_GREEN, winfo);
- //dmlist++;
- //printf("racelist3 = %d",racelist);
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && gPlayerSpawned[i])
- {
- SendClientMessage(i, COLOR_YELLOW, "SMS | DeathMatch pocinje kod crvene oznake kod Ammunation-a , Salje: MOLE (555)");
- RingTone[i] = 20;
- SendClientMessage(i, COLOR_WHITE, "Pomoc: Idi do crvene oznake i cekaj da DeathMatch pocne.");
- SetPlayerCheckpoint(i,gRandomDMSpawns[0][0],gRandomDMSpawns[0][1],gRandomDMSpawns[0][2], 4.0);
- GameTextForPlayer(i, "~w~Waypoint postavljen na ~n~~r~DeathMatch", 5000, 1);
- gPlayerCheckpointStatus[i] = CHECKPOINT_DM;
- }
- }
- MissionActive = 13;
- return 1;
- }
- default:
- {
- return 1;
- }
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if (gdebug >=1){printf("OnPlayerEnterCheckpoint %d",playerid);}
- new string[128];
- new name[MAX_PLAYER_NAME];
- switch (gPlayerCheckpointStatus[playerid])
- {
- case CHECKPOINT_PICKUP:
- {
- if(GetPlayerState(playerid) != 1)
- {
- GameTextForPlayer(playerid, "~w~Moras bit~n~~r~na nogama", 1000, 1);
- return 1;
- }
- if (gdebug){print("DEBUG CHECKPOINT_PICKUP");}
- GetPlayerName(playerid, name, sizeof(name));
- if (MissionActive == 1)
- {
- RewardCalc(playerid,1000,10000);
- DropOff = random(sizeof(gCBdropoff));
- }
- if (gTeam[playerid] >= 3)
- {
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- CheckpointReset();
- GameTextForPlayer(playerid, "~w~Sad idi do ~n~~r~Sigurne kuce", 5000, 1);
- cwx = gCBdropoff[DropOff][0];
- cwy = gCBdropoff[DropOff][1];
- cwz = gCBdropoff[DropOff][2];
- SetAllPlayerCheckpoint(cwx, cwy, cwz, 1.4, 0);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_DROPOFF;
- if (gdebug){printf("DEBUG gpcs %d",gPlayerCheckpointStatus[playerid]);}
- format(string, sizeof(string), "%s je pokupio CashBox koji sadrzi $%d.", name ,reward);
- BroadCast(COLOR_YELLOW, string);
- gSuperCop = playerid;
- SetPlayerCriminal(playerid,255, "Oruzana pljacka",0,0);
- MissionActive = 2;
- if (gdebug){print("DEBUG MissionActive = 2;");}
- }
- else if ((gTeam[playerid]) == 2)
- {
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- CheckpointReset();
- GameTextForPlayer(playerid, "~w~Vrati CashBox~n~do ~r~Trgovine", 5000, 1);
- cwx = rx;//retrieving the store
- cwy = ry;
- cwz = rz;
- SetAllPlayerCheckpoint(cwx, cwy, cwz, 1.4, 0);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_DROPOFF;
- format(string, sizeof(string), "Policajac %s je pokupio CashBox koji sadrzi $%d.", name ,reward);
- BroadCast(COLOR_YELLOW, string);
- gSuperCop = playerid;
- MissionActive = 2;
- if (gdebug){print("DEBUG MissionActive = 2;");}
- }
- }
- case CHECKPOINT_DROPOFF:
- {
- if (gdebug){print("DEBUG CHECKPOINT_DROPOFF");}
- GetPlayerName(playerid, name, sizeof(name));
- GivePlayerMoney(playerid, reward);
- preward = reward;
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- if ((gTeam[playerid]) >= 4)
- {
- format(string, sizeof(string), "~g~POSAO KOMPLETAN~n~~w~Tvoj dio je~n~~g~$%d", reward);
- GameTextForPlayer(playerid, string, 5000, 6);
- format(string, sizeof(string), "%s Just Cracked The CashBox For $%d.", name,reward);
- gSuperCop = INVALID_PLAYER_ID;
- SetPlayerCriminal(playerid,255, "Oruzana pljacka",1,1);
- gPlayerMission[playerid] = 1;
- }
- else
- {
- format(string, sizeof(string), "~b~CASHBOX VRACEN~n~~w~Bonus Paycheck~n~~g~$%d", reward);
- GameTextForPlayer(playerid, string, 5000, 6);
- format(string, sizeof(string), "%s vratio si CashBox za $%d.", name,reward);
- gSuperCop = INVALID_PLAYER_ID;
- if(PlayerInfo[playerid][pCB] >= 4)
- {
- PlayerInfo[playerid][pExp]++;
- PlayerInfo[playerid][pCB] = 0;
- SendClientMessage(playerid, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
- }
- }
- PlayerPlayMusic(playerid);
- BroadCast(COLOR_YELLOW, string);
- CheckpointReset();
- MissionActive = 4;//srace
- if (gdebug){print("DEBUG MissionActive = 4;");}
- }
- case CHECKPOINT_CARDROP:
- {
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid, "~w~Izadji iz ~n~~y~Auta", 5000, 1);
- MissionActive = 11;
- if (gdebug){print("DEBUG MissionActive = 11");}
- }
- case CHECKPOINT_HOME:
- {
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- DisablePlayerCheckpoint(playerid);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
- GameTextForPlayer(playerid, "~w~Kod ~n~~y~Kuce si", 5000, 1);
- }
- case CHECKPOINT_DM:
- {
- gFightLeader++;
- gFighters++;
- gPlayerFighter[playerid] = 1;
- DisablePlayerCheckpoint(playerid);
- gTeam[playerid] = 4;
- SetSpawnInfo(playerid, 1, PlayerInfo[playerid][pModel], gRandomDMSpawns[1][0], gRandomDMSpawns[1][1], gRandomDMSpawns[1][2], 1.0, -1, -1, -1, -1, -1, -1);
- if(gFighters >= 21)
- {
- gFighters = 2;
- }
- else
- {
- SetPlayerPos(playerid, gRandomDMSpawns[gFighters][0], gRandomDMSpawns[gFighters][1], gRandomDMSpawns[gFighters][2]); // Warp the player
- }
- if(dmweapon > 0)
- {
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, dmweapon, 999);
- }
- //SetPlayerWorldBounds(playerid,gDMWbounds[0],gDMWbounds[1],gDMWbounds[2],gDMWbounds[3]);
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pInt] = 0;
- TogglePlayerControllable(playerid, 0);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
- format(string, sizeof(string), "~r~DeathMatch~n~~w~pricekaj da se jos igraca prikljuci");
- GameTextForPlayer(playerid, string, 5000, 3);
- if (gFightLeader == 2)
- {
- SetTimer("DMDelay", racedelay, 0);
- format(string, sizeof(string), "SMS | %d sekundi do pocetka DeathMatch-a, Salje: MOLE (555)",racedelay/1000);
- RingTone[playerid] = 20;
- BroadCast(COLOR_YELLOW, string);
- }
- }
- default:
- {
- if ((gTeam[playerid]) != 2)
- {
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "~w~Obrani ~n~Poziciju");
- GameTextForPlayer(playerid, string, 5000, 1);
- if (gdebug){print("DEBUG crims protect");}
- }
- if ((gTeam[playerid]) == 2)
- {
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "~w~Patroliraj podrucjem~n~ i pazi na osumnjicene");
- GameTextForPlayer(playerid, string, 5000, 1);
- if (gdebug){print("DEBUG cops protect");}
- }
- }
- }
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- if (gdebug >=1){printf("OnPlayerEnterRaceCheckpoint %d",playerid);}
- new string[128];
- new name[MAX_PLAYER_NAME];
- switch (gPlayerCheckpointStatus[playerid])
- {
- case CHECKPOINT_SR1START:
- {
- if (gdebug){print("DEBUG CHECKPOINT_SR1START");}
- if (GetPlayerState(playerid) != 2)
- {
- return 1;
- }
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- if (gTeam[playerid] >= 3)
- {
- new tmpcar = GetPlayerVehicleID(playerid);
- if(IsAPlane(tmpcar))
- {
- GameTextForPlayer(playerid, "~w~Avionima i helikopterima nije dopusteno utrkivati se", 2000, 6);
- return 1;
- }
- if (MissionActive == 5)// first to arrive
- {
- gRaceLeader++;
- if (gdebug){printf("gRaceLeader %d",gRaceLeader);}
- if (gRaceLeader == 1)
- {
- format(string, sizeof(string), "~r~Pricekaj jos nekoga za utrku");
- GameTextForPlayer(playerid, string, 2000, 6);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
- DisablePlayerRaceCheckpoint(playerid);
- return 1;
- }
- else if (gRaceLeader == 2)
- {
- gRaceLeader = 0;
- if (gdebug){printf("gRaceLeader %d",gRaceLeader);}
- format(string, sizeof(string), "SMS | %d sekundi do pocetka utrke, Salje: MOLE (555)",racedelay/1000);
- RingTone[playerid] = 20;
- SendEnemyMessage(COLOR_YELLOW, string);
- format(string, sizeof(string), "~r~Pricekaj nekoga za utrku");
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
- GameTextForPlayer(playerid, string, 2000, 6);
- }
- SetTimer("RaceDelay", racedelay, 0);
- DisablePlayerRaceCheckpoint(playerid);
- MissionActive = 6;
- if (gdebug){print("DEBUG MissionActive = 6");}
- }
- else if (MissionActive == 6) //late arrivels
- {
- if (gdebug){print("DEBUG waiting");}
- DisablePlayerRaceCheckpoint(playerid);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
- }
- }
- else
- {
- GameTextForPlayer(playerid, "~w~Patroliraj podrucjem~n~ i pazi na osumnjicene", 5000, 1);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
- return 1;
- }
- }
- case CHECKPOINT_SRA:
- {
- if (gdebug){print("DEBUG CHECKPOINT_SRA");}
- if (GetPlayerState(playerid) != 2)
- {
- return 1;
- }
- new tmpcar = GetPlayerVehicleID(playerid);
- if(IsAPlane(tmpcar))
- {
- GameTextForPlayer(playerid, "~w~Avionima i helikopterima nije dopusteno utrkivati se", 2000, 6);
- return 1;
- }
- if (StartTime[playerid] == 0)
- {
- StartTime[playerid] = Gtickcount;
- if(gTeam[playerid] == 3)
- {
- SetPlayerCriminal(playerid,255, "Ulicna utrka",0,0);
- //if(FlashTime[playerid] == 0){FlashTime[playerid] = 60;}
- }
- }
- LapCount[playerid]++;
- gRaceEnd++;
- if(LapCount[playerid] > gLaps)
- {
- gLaps = LapCount[playerid];
- gRaceEnd = 1;
- }
- if(RaceInfo[rLaps] != 0)
- {
- if(gLaps != (RaceInfo[rLaps]+1) && gLaps > 1)
- {
- //RaceDebug(playerid);
- if(gLaps == 2)
- {
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && gTeam[i] == 2)
- {
- format(cbjstore, sizeof(cbjstore), "SMS | Imam posao za tebe, napisi Yes na 555 za dodatne informacije, Salje: MOLE (555)");
- SendClientMessage(i, COLOR_DBLUE, cbjstore);
- RingTone[i] = 20;
- SetPlayerCheckpoint(i,rm2x,rm2y,rm2z, 8.0);
- }
- }
- RaceTime[playerid] = Gtickcount;
- }
- if (gRaceEnd == 1 && LapCount[playerid] == gLaps)
- {
- pos1time = RaceTime[playerid] - StartTime[playerid];
- ConvertTicks(pos1time);
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Vijesti | %s je na prvom mjestu T: %d:%d:%d", name,cmins,csecs,cmils);
- BroadCast(COLOR_WHITE, string);
- format(string, sizeof(string), "~w~Lap %d/%d~n~~g~1st mjesto ~n~~y~T: %d:%d:%d",gLaps,RaceInfo[rLaps],cmins,csecs,cmils);
- SetAllCopCheckpoint(rex,rey,rez, 8.0);
- }
- else if (gRaceEnd == 2 && LapCount[playerid] == gLaps)
- {
- pos2time = RaceTime[playerid] - StartTime[playerid];
- new splittime = pos2time - pos1time;
- ConvertTicks(splittime);
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Vijesti | %s je na drugom mjestu T: +%d:%d:%d", name,cmins,csecs,cmils);
- BroadCast(COLOR_WHITE, string);
- format(string, sizeof(string), "~w~Lap %d/%d~n~~g~2nd mjesto ~n~~y~T: %d:%d:%d",gLaps,RaceInfo[rLaps],cmins,csecs,cmils);
- }
- else if (gRaceEnd == 3 && LapCount[playerid] == gLaps)
- {
- pos3time = RaceTime[playerid] - StartTime[playerid];
- new splittime = pos3time - pos1time;
- ConvertTicks(splittime);
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Vijesti | %s je na trecem mjestu T: +%d:%d:%d", name,cmins,csecs,cmils);
- BroadCast(COLOR_WHITE, string);
- format(string, sizeof(string), "~w~Krug %d/%d~n~~g~3rd mesto ~n~~y~T: %d:%d:%d",gLaps,RaceInfo[rLaps],cmins,csecs,cmils);
- }
- else
- {
- format(string, sizeof(string), "~w~Krug %d/%d",LapCount[playerid],RaceInfo[rLaps]);
- }
- GameTextForPlayer(playerid, string, 5000, 1);
- }
- else if(gLaps == (RaceInfo[rLaps]+1) && gLaps > 1)
- {
- if (gRaceEnd == 1)
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- if (gdebug){print("DEBUG RACE OVER");}
- RewardCalc(playerid,1000,10000);
- GetPlayerName(playerid, name, sizeof(name));
- GivePlayerMoney(playerid, reward);
- preward = reward;
- PlayerPlayMusic(playerid);
- format(string, sizeof(string), "~g~POBIJEDIO SI~n~~w~tvoja nagrada je ~n~~g~$%d", reward);
- GameTextForPlayer(playerid, string, 5000, 6);
- BroadCast(COLOR_WHITE, "Vijesti | Utrka ce zavrsiti za 120 sec");
- RaceTime[playerid] = Gtickcount;
- pos1time = RaceTime[playerid] - StartTime[playerid];
- ConvertTicks(pos1time);
- GetPlayerName(playerid, name, sizeof(name));
- raceendtimer = SetTimer("Kraj utrke", 120000, 0);
- if(RaceInfo[rBestms] > pos1time || RaceInfo[rBestms] == 0)
- {
- RaceInfo[rBestms] = pos1time;
- strmid(RaceInfo[rBest],name, 0, strlen(name), 255);
- BestTime(CurrentRace);
- format(string, sizeof(string), "Vijesti | %s pobijedio si na ulicnoj utrci i osvojio $%d",name,reward);
- BroadCast(COLOR_WHITE, string);
- format(string, sizeof(string), "Vijesti | %s Je postavio najbolje vrijeme %s T: %d:%d:%d", name,CurrentRace,cmins,csecs,cmils);
- BroadCast(COLOR_WHITE, string);
- }
- else
- {
- format(string, sizeof(string), "Vijesti | %s pobijedio si na ulicnoj utrci i osvijio $%d T: %d:%d:%d", name,reward,cmins,csecs,cmils);
- BroadCast(COLOR_WHITE, string);
- }
- SetPlayerCriminal(playerid,255, "Ulicna Utrka",1,1);
- gPlayerMission[playerid] = 2;
- BetWinner(playerid,1);
- return 1;
- }
- else if (gRaceEnd == 2)
- {
- DisablePlayerCheckpoint(playerid);
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- if (gdebug){print("DEBUG RACE OVER");}
- reward = preward/2;
- GetPlayerName(playerid, name, sizeof(name));
- GivePlayerMoney(playerid, reward);
- PlayerPlayMusic(playerid);
- format(string, sizeof(string), "~g~2nd mjesto~n~~w~tvoja zarada je ~n~~g~$%d", reward);
- GameTextForPlayer(playerid, string, 5000, 6);
- RaceTime[playerid] = Gtickcount;
- pos3time = RaceTime[playerid] - StartTime[playerid];
- new splittime = pos3time - pos1time;
- ConvertTicks(splittime);
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Vijesti | %s je dosao drugi na cilj i osvojio $%d T: +%d:%d:%d", name,reward,cmins,csecs,cmils);
- BroadCast(COLOR_WHITE, string);
- return 1;
- }
- else if (gRaceEnd == 3)
- {
- RaceCheckpointReset();
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- if (gdebug){print("DEBUG RACE OVER");}
- reward = preward/3;
- GetPlayerName(playerid, name, sizeof(name));
- GivePlayerMoney(playerid, reward);
- PlayerPlayMusic(playerid);
- format(string, sizeof(string), "~g~3rd place~n~~w~tvoja zarada je ~n~~g~$%d", reward);
- GameTextForPlayer(playerid, string, 5000, 6);
- RaceTime[playerid] = Gtickcount;
- pos2time = RaceTime[playerid] - StartTime[playerid];
- new splittime = pos2time - pos1time;
- ConvertTicks(splittime);
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "Vijesti | %s je dosao treci na cilj i osvojio $%d T: +%d:%d:%d", name,reward,cmins,csecs,cmils);
- BroadCast(COLOR_WHITE, string);
- KillTimer(raceendtimer);
- RaceEnd();
- return 1;
- }
- }
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- SetPlayerRaceCheckpoint(playerid,0,rmx,rmy,rmz,rm2x,rm2y,rm2z,16);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRB;
- }
- if(RaceInfo[rLaps] == 0 && LapCount[playerid] == 1)
- {
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- SetPlayerRaceCheckpoint(playerid,0,rmx,rmy,rmz,rm2x,rm2y,rm2z,16);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRB;
- }
- }
- case CHECKPOINT_SRB:
- {
- if (GetPlayerState(playerid) != 2)
- {
- return 1;
- }
- new tmpcar = GetPlayerVehicleID(playerid);
- if(IsAPlane(tmpcar))
- {
- GameTextForPlayer(playerid, "~w~Avionima i helikopterima nije dopusteno utrkivati se", 2000, 6);
- return 1;
- }
- if(gRaceMid != 1 && LapCount[playerid] > gLaps)
- {
- gRaceMid = 1;
- }
- if (gdebug){print("DEBUG CHECKPOINT_SRB");}
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- SetPlayerRaceCheckpoint(playerid,0,rm2x,rm2y,rm2z,rex,rey,rez,16);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRC;
- gRaceMid++;
- if (gdebug){printf("gRaceLeader %d",gRaceLeader);}
- }
- case CHECKPOINT_SRC:
- {
- if (GetPlayerState(playerid) != 2)
- {
- return 1;
- }
- new tmpcar = GetPlayerVehicleID(playerid);
- if(IsAPlane(tmpcar))
- {
- GameTextForPlayer(playerid, "~w~Avionima i helikopterima nije dopusteno utrkivati ses", 2000, 6);
- return 1;
- }
- if(gRaceMid2 != 1 && LapCount[playerid] > gLaps)
- {
- gRaceMid2 = 1;
- }
- if (gdebug){print("DEBUG CHECKPOINT_SRB");}
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- SetPlayerRaceCheckpoint(playerid,0,rex,rey,rez,rsx,rsy,rsz,16);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRD;
- gRaceMid2++;
- if (gdebug){printf("gRaceLeader %d",gRaceLeader);}
- }
- case CHECKPOINT_SRD:
- {
- if (GetPlayerState(playerid) != 2)
- {
- return 1;
- }
- new tmpcar = GetPlayerVehicleID(playerid);
- if(IsAPlane(tmpcar))
- {
- GameTextForPlayer(playerid, "~w~Avionima i helikopterima nije dopusteno utrkivati se", 2000, 6);
- return 1;
- }
- if(gRaceFin != 1 && LapCount[playerid] > gLaps)
- {
- gRaceFin = 1;
- }
- if (gdebug){print("DEBUG CHECKPOINT_SRC");}
- gRaceFin++;
- if(RaceInfo[rLaps] > 0)
- {
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- SetPlayerRaceCheckpoint(playerid,1,rsx,rsy,rsz,rsx,rsy,rsz,16);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SRA;
- SetAllCopCheckpoint(rex,rey,rez, 8.0);
- }
- if(RaceInfo[rLaps] == 0)
- {
- if (gRaceFin == 1)
- {
- DisablePlayerRaceCheckpoint(playerid);
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- if (gdebug){print("DEBUG RACE OVER");}
- RewardCalc(playerid,1000,10000);
- GetPlayerName(playerid, name, sizeof(name));
- GivePlayerMoney(playerid, reward);
- preward = reward;
- PlayerPlayMusic(playerid);
- format(string, sizeof(string), "~g~POBIJEDIO SI ~n~~w~tvoja nagrada je ~n~~g~$%d", reward);
- GameTextForPlayer(playerid, string, 5000, 6);
- BroadCast(COLOR_WHITE, "Vijesti | Event ce zavrsiti za 120 sekundi!");
- RaceTime[playerid] = Gtickcount;
- pos1time = RaceTime[playerid] - StartTime[playerid];
- ConvertTicks(pos1time);
- GetPlayerName(playerid, name, sizeof(name));
- raceendtimer = SetTimer("RaceEnd", 120000, 0);
- if(RaceInfo[rBestms] > pos1time || RaceInfo[rBestms] == 0)
- {
- RaceInfo[rBestms] = pos1time;
- strmid(RaceInfo[rBest],name, 0, strlen(name), 255);
- BestTime(CurrentRace);
- format(string, sizeof(string), "{99CCDD}-> | Event || FINISH || 1 Mijesto || %s ||",name,reward);
- BroadCast(COLOR_WHITE, string);
- format(string, sizeof(string), "-> | Event || Srusen Rekord || %s ||", name,CurrentRace,cmins,csecs,cmils);
- BroadCast(COLOR_LIGHTRED, string);
- }
- else
- {
- format(string, sizeof(string), "Vijesti | %s pobijedio si na ulicnoj utrci i osvijio $%d T: %d:%d:%d", name,reward,cmins,csecs,cmils);
- BroadCast(COLOR_WHITE, string);
- }
- SetPlayerCriminal(playerid,255, "Ulicna utrka",1,1);
- gPlayerMission[playerid] = 2;
- BetWinner(playerid,1);
- }
- else if (gRaceFin == 2)
- {
- DisablePlayerRaceCheckpoint(playerid);
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- if (gdebug){print("DEBUG RACE OVER");}
- reward = preward/2;
- GetPlayerName(playerid, name, sizeof(name));
- GivePlayerMoney(playerid, reward);
- PlayerPlayMusic(playerid);
- format(string, sizeof(string), "~g~2nd mjesto~n~~w~osvojio si ~n~~g~$%d", reward);
- GameTextForPlayer(playerid, string, 5000, 6);
- RaceTime[playerid] = Gtickcount;
- pos3time = RaceTime[playerid] - StartTime[playerid];
- new splittime = pos3time - pos1time;
- ConvertTicks(splittime);
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "{99CCDD}-> | Event || FINISH || 2 Mijesto || %s ||", name,reward,cmins,csecs,cmils);
- BroadCast(COLOR_WHITE, string);
- }
- else if (gRaceFin == 3)
- {
- RaceCheckpointReset();
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- if (gdebug){print("DEBUG RACE OVER");}
- reward = preward/3;
- GetPlayerName(playerid, name, sizeof(name));
- GivePlayerMoney(playerid, reward);
- PlayerPlayMusic(playerid);
- format(string, sizeof(string), "~g~3rd mjesto~n~~w~osvojio si ~n~~g~$%d", reward);
- GameTextForPlayer(playerid, string, 5000, 6);
- RaceTime[playerid] = Gtickcount;
- pos2time = RaceTime[playerid] - StartTime[playerid];
- new splittime = pos2time - pos1time;
- ConvertTicks(splittime);
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "{99CCDD}-> | Event || FINISH || 3 Mijesto || %s ||", name,reward,cmins,csecs,cmils);
- BroadCast(COLOR_WHITE, string);
- KillTimer(raceendtimer);
- RaceEnd();
- }
- }
- }
- }
- return 1;
- }
- public RaceDebug(playerid)
- {
- new string[256];
- format(string, sizeof(string), "gRaceFin(%d) gRaceMid(%d) gRaceMid2(%d) gRaceEnd(%d) gLaps(%d) RaceInfo[rLaps](%d) LapCount[playerid](%d)",gRaceFin,gRaceMid,gRaceMid2,gRaceEnd,gLaps,RaceInfo[rLaps],LapCount[playerid]);
- BroadCast(COLOR_WHITE, string);
- }
- public RaceEnd()
- {
- CheckpointReset();
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- StartTime[i] = 0;
- LapCount[i] = 0;
- }
- }
- gRaceFin = 0;
- gRaceMid = 0;
- gRaceMid2 = 0;
- gRaceEnd = 0;
- gLaps = 0;
- BroadCast(COLOR_WHITE, "Vijesti | Kraj eventa,hvala sto ste sudjelovali!");
- MissionActive = 8;
- if (gdebug){print("DEBUG MissionActive = 8");}
- }
- public RaceDelay()
- {
- if (gdebug >=1){printf("RaceDelay ");}
- new string[32];
- format(string, sizeof(string), "~r~Priprema");
- new gdelay=1000;
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if ((gPlayerCheckpointStatus[i] == CHECKPOINT_SRA) && gTeam[i] >= 3)
- {
- GameTextForPlayer(i, string, gdelay, 6);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- }
- }
- SetTimer("RaceDelayr", gdelay, 0);
- return 1;
- }
- public RaceDelayr()
- {
- if (gdebug >=1){printf("RaceDelayr");}
- new string[32];
- format(string, sizeof(string), "~y~Pozor");
- new hdelay=1000;
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if ((gPlayerCheckpointStatus[i] == CHECKPOINT_SRA) && (gTeam[i] >= 3))
- {
- GameTextForPlayer(i, string, hdelay, 6);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- }
- }
- SetTimer("RaceDelayg", hdelay, 0);
- return 1;
- }
- public RaceDelayg()
- {
- if (gdebug >=1){printf("RaceDelayg");}
- new rdelay=1000;
- new string[32];
- format(string, sizeof(string), "~g~Kreni");
- gLaps = 0;
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (gTeam[i] >= 3)
- {
- if (gPlayerCheckpointStatus[i] == CHECKPOINT_SRA)
- {
- GameTextForPlayer(i, string, rdelay, 6);
- PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
- SetPlayerRaceCheckpoint(i,0,rsx,rsy,rsz,rmx,rmy,rmz,16.0);
- gPlayerCheckpointStatus[i] = CHECKPOINT_SRA;
- }
- else
- {
- DisablePlayerCheckpoint(i);
- gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
- }
- }
- }
- }
- SetAllCopCheckpoint(rm2x,rm2y,rm2z, 8.0);
- MissionActive = 7;
- if (gdebug){print("DEBUG MissionActive = 7");}
- return 1;
- }
- public DMDelay()
- {
- if (gdebug >=1){printf("DMDelay ");}
- new string[32];
- gFightLeader = 1000;
- format(string, sizeof(string), "~r~Priprema");
- new gdelay=1000;
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- DisablePlayerCheckpoint(i);
- if(IsPlayerConnected(i))
- {
- if (gPlayerFighter[i] == 1)
- {
- GameTextForPlayer(i, string, gdelay, 6);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- }
- }
- SetTimer("DMDelayr", gdelay, 0);
- return 1;
- }
- public DMDelayr()
- {
- if (gdebug >=1){printf("DMDelayr");}
- new string[32];
- format(string, sizeof(string), "~y~Pozor");
- new hdelay=1000;
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (gPlayerFighter[i] == 1)
- {
- GameTextForPlayer(i, string, hdelay, 6);
- PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);
- }
- }
- }
- SetTimer("DMDelayg", hdelay, 0);
- return 1;
- }
- public DMDelayg()
- {
- if (gdebug >=1){printf("DMDelayg");}
- new rdelay=1000;
- new string[32];
- format(string, sizeof(string), "~g~Borba");
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (gPlayerFighter[i] == 1)
- {
- GameTextForPlayer(i, string, rdelay, 6);
- PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
- TogglePlayerControllable(i, 1);
- }
- }
- }
- MissionActive = 13;
- if (gdebug){print("DEBUG MissionActive = 13");}
- return 1;
- }
- public DMDetect()
- {
- if(gFightLeader == 1000)
- {
- dmtimer++;
- PlayerInArena();
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && gPlayerFighter[i] == 1)
- {
- if(dmtime-dmtimer == 60)
- {
- GameTextForPlayer(i, "~r~Jedna minuta do kraja", 5000, 1);
- }
- }
- }
- if(dmtimer == dmtime)
- {
- new ename[MAX_PLAYER_NAME];
- new string[256];
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && gPlayerFighter[i] == 1 || IsPlayerConnected(i) == 1 && TVMode[i]>11 && TVMode[i]<20)
- {
- if(TVMode[i]>11 && TVMode[i]<20)
- {
- TVMode[i] = 0;
- Spectate[i] = 300;
- }
- TogglePlayerControllable(i, 0);
- if(IsPlayerConnected(DmHiPlayer) == 1)
- {
- GetPlayerPos(DmHiPlayer, DmeCam[0], DmeCam[1], DmeCam[2]);
- DmeCam[3] = DmeCam[0];
- DmeCam[4] = DmeCam[1]+2;
- DmeCam[5] = DmeCam[2]+0.2;
- DmeCam[2] = DmeCam[2]+0.6;
- SetPlayerFacingAngle(DmHiPlayer, 0.0);
- RewardCalc(DmHiPlayer,1000,10000);
- GetPlayerName(DmHiPlayer, ename, sizeof(ename));
- format(string, sizeof(string), "~r~DeathMatch je zavrsio~n~~b~Pomjednik~n~~w~%s~n~ubojstava:%d~n~~g~Nagrada:$%d", ename,DmHiScore, reward);
- }
- else
- {
- format(string, sizeof(string), "~r~DeathMatch zavrsio~n~~b~Nema pobjednika :)))");
- DmeCam[0] = gRandomDMSpawns[1][0];
- DmeCam[1] = gRandomDMSpawns[1][1];
- DmeCam[2] = gRandomDMSpawns[1][2];
- DmeCam[3] = DmeCam[0];
- DmeCam[4] = DmeCam[1];
- DmeCam[5] =DmeCam[2]+30;
- }
- DMEndCam(i,string);
- }
- }
- }
- if(dmtimer == dmtime+10)
- {
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- if(Spectate[i] == 300)
- {
- Spectate[i] = 253;
- }
- if(gPlayerFighter[i] == 1)
- {
- if(PlayerInfo[i][pTeam] != 3)
- {
- gTeam[i] = PlayerInfo[i][pTeam];
- SetPlayerToTeamColor(i);
- }
- gPlayerFighter[i] = 0;
- DmScore[i] = 0;
- TogglePlayerControllable(i, 1);
- SpawnPlayer(i);
- SetPlayerRandomSpawn(i);
- }
- }
- }
- }
- if(dmtimer == dmtime+11)
- {
- if(IsPlayerConnected(DmHiPlayer) == 1)
- {
- new ename[MAX_PLAYER_NAME];
- new string[256];
- PlayerPlaySound(DmHiPlayer, 1058, 0.0, 0.0, 0.0);
- GetPlayerName(DmHiPlayer, ename, sizeof(ename));
- GivePlayerMoney(DmHiPlayer, reward);
- format(string, sizeof(string), "~g~POSAO ZAVRSEN~n~~w~tvoj dio je~n~~g~$%d", reward);
- PlayerPlayMusic(DmHiPlayer);
- GameTextForPlayer(DmHiPlayer, string, 5000, 6);
- format(string, sizeof(string), "%s Pobijedio na Deathmatch-u s %d ubojstava za $%d", ename,DmHiScore, reward);
- BroadCast(COLOR_YELLOW, string);
- //SetPlayerPos(DmHiPlayer,gRandomDMSpawns[0][0],gRandomDMSpawns[0][1],gRandomDMSpawns[0][2]);
- if(PlayerInfo[DmHiPlayer][pTeam] != 1 && PlayerInfo[DmHiPlayer][pTeam] != 2)
- {
- SetPlayerCriminal(DmHiPlayer,255, "Masovno ubojstvo",1,1);
- gPlayerMission[DmHiPlayer] = 4;
- }
- else
- {
- PlayerInfo[DmHiPlayer][pWA] = PlayerInfo[DmHiPlayer][pWA]+5;
- if(PlayerInfo[DmHiPlayer][pWA] >= 20)
- {
- PlayerInfo[DmHiPlayer][pExp]++;
- PlayerInfo[DmHiPlayer][pWA] = PlayerInfo[DmHiPlayer][pWA]-20;
- SendClientMessage(DmHiPlayer, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
- }
- }
- BetWinner(DmHiPlayer,2);
- }
- gFighters = 0;
- gFightLeader = 0;
- MissionActive = 0;
- if (gdebug){print("DEBUG MissionActive = 0");}
- DmHiScore = 0;
- DmHiPlayer = 255;
- dmtimer = 0;
- }
- }
- }
- public DMEndCam(playerid,string[])
- {
- GameTextForPlayer(playerid, string, 5000, 6);
- SetPlayerCameraPos(playerid,DmeCam[3], DmeCam[4], DmeCam[5]);
- SetPlayerCameraLookAt(playerid,DmeCam[0], DmeCam[1], DmeCam[2]);
- }
- public DMScoreCalc()
- {
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && gPlayerFighter[i] == 1)
- {
- if(gPlayerFighter[i] == 1)
- {
- new tmp1 = DmScore[i];
- if(tmp1 > DmHiScore)
- {
- DmHiScore = tmp1;
- DmHiPlayer = i;
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerDropCashBox(playerid)
- {
- if (gdebug >=1){printf("OnPlayerDropCashBox %d",playerid);}
- new string[128];
- new dname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, dname, sizeof(dname));
- format(string, sizeof(string), ".: %s ispustio CashBox! :.", dname);
- BroadCast(COLOR_RED, string);
- GetPlayerPos(playerid, cwx, cwy, cwz);
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- SetPlayerCheckpoint(i,cwx,cwy,cwz, 1.0);
- gPlayerCheckpointStatus[i] = CHECKPOINT_PICKUP;
- }
- }
- MissionActive = 3;
- if (gdebug){print("DEBUG MissionActive = 3;");}
- return 1;
- }
- public RewardCalc(playerid,min,max)
- {
- reward = (min + (random(max-min)) + ((numplayers + PlayerInfo[playerid][pLevel]) *1000)); //minimum 1000 max 10000 + activeplayers x 1000
- printf("DEBUG RewardCalc = (Random(min=%d)(max=%d))(numplayers=%d)(PlayerInfo[playerid][pLevel]=%d) Total =%d",min,max,numplayers,PlayerInfo[playerid][pLevel],reward);
- }
- public CheckpointReset()
- {
- if (gdebug >= 1){printf("DEBUG CheckpointReset()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- DisablePlayerCheckpoint(i);
- gPlayerLapStatus[i] = 0;
- gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
- }
- }
- }
- public RaceCheckpointReset()
- {
- if (gdebug >= 1){printf("DEBUG CheckpointReset()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- DisablePlayerRaceCheckpoint(i);
- gPlayerLapStatus[i] = 0;
- gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
- }
- }
- }
- public JobGive(playerid)
- {
- if (gdebug >= 1){printf("DEBUG JobGive (%d)",playerid);}
- if(MissionActive == 1)
- {
- SendClientMessage(playerid, COLOR_YELLOW, objstore);
- SetPlayerCheckpoint(playerid,cwx, cwy, cwz, 1.4);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_PICKUP;
- RingTone[playerid] = 20;
- SendClientMessage(playerid, COLOR_WHITE, "Pomoc: idi do crvenog Markera i ukradi CashBox.");
- GameTextForPlayer(playerid, "~w~Waypoint postavljen na ~n~~r~CashBox", 5000, 1);
- return 1;
- }
- if(MissionActive == 5)
- {
- format(objstore, sizeof(objstore), "SMS | Event pocinje,dodite kod crvenog Markera, Posiljatelj: MOLE (555)");
- SendClientMessage(playerid, COLOR_YELLOW, objstore);
- RingTone[playerid] = 20;
- SetPlayerRaceCheckpoint(playerid,0,rsx,rsy,rsz,rmx,rmy,rmz,16.0);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_SR1START;
- SendClientMessage(playerid, COLOR_WHITE, "Pomoc: Idi do crvenog Markera i cekaj da event pocne.");
- GameTextForPlayer(playerid, "~w~CP postavljen na ~n~~r~Event", 5000, 1);
- return 1;
- }
- if(MissionActive == 9)
- {
- SendClientMessage(playerid, COLOR_YELLOW, objstore);
- RingTone[playerid] = 20;
- SetVehicleParamsForPlayer(stealcar,playerid,1,0);
- SendClientMessage(playerid, COLOR_WHITE, "Pomoc: Idi do zutog markera i ukradi auto.");
- GameTextForPlayer(playerid, "~w~Waypoint postavljen na ~n~~y~Auto", 5000, 1);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_YELLOW, "SMS | nemam nista trenutno, Salje: MOLE (555)");
- RingTone[playerid] = 20;
- }
- return 1;
- }
- public SetAllPlayerCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num)
- {
- if (gdebug >= 1){printf("DEBUG SetAllPlayerCheckpoint()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- SetPlayerCheckpoint(i,allx,ally,allz, radi);
- if (num != 255)
- {
- gPlayerCheckpointStatus[i] = num;
- }
- }
- }
- }
- public SetAllPlayerRaceCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi, num)
- {
- if (gdebug >= 1){printf("DEBUG SetAllPlayerCheckpoint()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- SetPlayerRaceCheckpoint(i,0,allx,ally,allz,0.0,0.0,0.0,radi);
- if (num != 255)
- {
- gPlayerCheckpointStatus[i] = num;
- }
- }
- }
- }
- public SetAllCopCheckpoint(Float:allx, Float:ally, Float:allz, Float:radi)
- {
- if (gdebug >= 1){printf("DEBUG SetAllCopCheckpoint()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- if(gTeam[i] == 2)
- {
- SetPlayerCheckpoint(i,allx,ally,allz, radi);
- }
- }
- }
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if (gdebug >=1){printf("OnPlayerStateChange %d %d %d",playerid, newstate, oldstate);}
- if((newstate == 2 || newstate == 3) && nocarcash)
- {
- if (gPlayerCheckpointStatus[playerid] == CHECKPOINT_DROPOFF)
- {
- if (gdebug){print("DEBUG test6");}
- DisablePlayerCheckpoint(playerid);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
- new check = gPlayerCheckpointStatus[playerid];
- if (gdebug){printf("DEBUG check %d" ,check);}
- OnPlayerDropCashBox(playerid);
- }
- }
- if(newstate == PLAYER_STATE_ONFOOT)
- {
- TelePos[playerid][0] = 0.0;
- TelePos[playerid][1] = 0.0;
- if(gTeam[playerid] >= 4 && LapCount[playerid] > 0)
- {
- new count;
- new string[256];
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && gTeam[i] == 2 && CrimInRange(50.0, playerid,i))
- {
- count = 1;
- format(string, sizeof(string), "~p~Racer ~w~Uhicen~n~Bonus nakanada ~n~~g~$%d", 10000);
- GameTextForPlayer(i, string, 5000, 1);
- GivePlayerMoney(i, 10000);
- PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
- PlayerInfo[i][pWA] = PlayerInfo[i][pWA]+2;
- if(PlayerInfo[i][pWA] >= 20)
- {
- PlayerInfo[i][pExp]++;
- PlayerInfo[i][pWA] = 0;
- SendClientMessage(i, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
- }
- }
- }
- if(count == 1)
- {
- new name [MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "RACENEWS: %s je uhicen.", name);
- BroadCast(COLOR_WHITE, string);
- SetPlayerInterior(playerid,0);
- LapCount[playerid] = 0;
- PlayerInfo[playerid][pInt] = 6;
- SetPlayerPos(playerid,264.395200,77.564040,1001.039000);
- SendClientMessage(playerid, COLOR_GRAD1," Uhicen si, za provjeru kolko ces biti u zatvoru upisi /time.");
- PlayJailSound(1153 , 1154, 2000,264.395200, 77.564040, 1001.039000);
- JailTime[playerid] = 60;
- }
- }
- }
- if(newstate == PLAYER_STATE_DRIVER) //buggy dont finnish
- {
- new newcar = GetPlayerVehicleID(playerid);
- new oldcar = gLastCar[playerid];
- new housecar = PlayerInfo[playerid][pPhousekey]+1;
- TelePos[playerid][0] = 0.0;
- TelePos[playerid][1] = 0.0;
- if (gdebug >=1){printf("oldcar %d, newcar %d",oldcar,newcar);}
- if(oldcar != 301)
- {
- if((housecar != oldcar && oldcar != 0) && (HireCar[playerid] != oldcar && newcar != housecar))
- {
- if(gLastDriver[oldcar] == playerid && oldcar != newcar)
- {
- gLastDriver[oldcar] = 300;
- gCarLock[oldcar] = 0;
- UnLockCar(oldcar);
- }
- }
- }
- if(gTeamCarLock[newcar] == 1)
- {
- gTeamCarLock[newcar] = 0;
- UnLockCar(newcar);
- }
- gLastCar[playerid] = newcar;
- if (gdebug >=1){printf("gLastCar[playerid](%d)",gLastCar[playerid]);}
- gLastDriver[newcar] = playerid;
- if ((newcar == stealcar) && (MissionActive == 9))
- {
- RewardCalc(playerid,1000,10000);
- }
- if((newcar == stealcar) && (MissionActive >= 9))
- {
- if (gdebug){print("DEBUG TEST3");}
- if (gTeam[playerid] >= 3 && MissionActive >= 9)
- {
- if (gdebug){print("DEBUG TEST4");}
- new name[MAX_PLAYER_NAME];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- GetVehiclePos(stealcardest, cwx, cwy, cwz);
- GameTextForPlayer(playerid, "~w~Sad odvezi ~y~Vozilo~n~~w~do ~r~Kupca", 5000, 1);
- format(string, sizeof(string), "%s je ukrao Auto u vrijednosti $%d", name,reward);
- BroadCast(COLOR_YELLOW, string);
- SetAllPlayerCheckpoint(cwx, cwy, cwz, 16.0, 0);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_CARDROP;
- MissionActive = 10;
- if (gdebug){print("DEBUG MissionActive = 10;");}
- if (gTeam[playerid] == 3)
- {
- SetPlayerCriminal(playerid,255, "Grand Theft Auto",0,0);
- }
- gSuperCop = playerid;
- OpenDoors();
- }
- if (gTeam[playerid] == 2 && MissionActive >= 10)
- {
- if (gdebug){print("DEBUG TEST6");}
- new name[MAX_PLAYER_NAME];
- new string[256];
- GetPlayerName(playerid, name, sizeof(name));
- cwx = 1539.1;
- cwy = -1668.0;
- cwz = 5.8;
- GameTextForPlayer(playerid, "~w~Vratite ~y~vozilo ~n~~w~do ~r~pocetnog mjesta", 5000, 1);
- format(string, sizeof(string), "Policajac %s je zapljenio ukraden auto i dobio $%d", name,reward);
- BroadCast(COLOR_YELLOW, string);
- SetAllPlayerCheckpoint(cwx, cwy, cwz, 16.0, 0);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_CARDROP;
- gSuperCop = playerid;
- MissionActive = 10;
- if (gdebug){print("DEBUG MissionActive = 10;");}
- }
- }
- }
- if(newstate == PLAYER_STATE_SPAWNED)
- {
- new Float: lwx, Float:lwy, Float:lwz;
- GetPlayerPos(playerid, lwx, lwy, lwz);
- if (gdebug >=1){printf("z =%f int =%d",lwz,PlayerInfo[playerid][pInt]);}
- if((lwz > 530.0 && PlayerInfo[playerid][pInt] == 0) || PlayerToPoint(1000.0, playerid, -1041.9,-1868.4,79.1)) //the highest land point in sa = 526.8
- {
- SetPlayerRandomSpawn(playerid);
- print("overhight or ob");
- }
- //SetPlayerInterior(playerid,0);
- if(dmweapon > 0 && gPlayerFighter[playerid] != 0)
- {
- GivePlayerWeapon(playerid, dmweapon, 999);
- if(PlayerInfo[playerid][pSHealth] < 50.0)
- {
- SetPlayerHealth(playerid, 100.0);
- }
- else
- {
- SetPlayerHealth(playerid, 50.0+PlayerInfo[playerid][pSHealth]);
- }
- }
- else
- {
- SetPlayerWeapons(playerid);
- SetPlayerHealth(playerid, 50.0+PlayerInfo[playerid][pSHealth]);
- }
- TelePos[playerid][0] = 0.0;
- TelePos[playerid][1] = 0.0;
- gPlayerSpawned[playerid] = 1;
- SafeTime[playerid] = 60;
- //OnUpdatePlayer(playerid); //spawnsave
- }
- return 1;
- }
- public HireCost(carid)//ovdje stavljam enter i rent aute
- {
- switch (carid)
- {
- case 98:
- {
- return 1000; //bullit
- }
- case 99:
- {
- return 1000; //infurnus
- }
- case 100:
- {
- return 1000; //turismo
- }
- case 101:
- {
- return 1000;
- }
- case 102:
- {
- return 1000;
- }
- case 103:
- {
- return 1000;
- }
- case 104:
- {
- return 1000;
- }
- }
- return 0;
- }
- public CarCheck()
- {
- if (gdebug >= 3){printf("DEBUG CarCheck()");}
- //new foundowner = -1;
- for(new c = 1; c < 254; c++)
- {
- if (gLastDriver[c] == 301)
- {
- CarRespawn(c);
- }
- if (gLastDriver[c] >= 300)
- {
- gLastDriver[c]++;
- }
- }
- return 1;
- }
- public CarInit()
- {
- if (gdebug >= 3){printf("DEBUG CarCheck()");}
- for(new c = 1; c < 254; c++)
- {
- gLastDriver[c] = 299;
- gTeamCarLock[c] = 0;
- }
- gLastDriver[301]=255;
- return 1;
- }
- public CarTow(carid)
- {
- if (gdebug >= 1){printf("DEBUG CarRespawn(%d)",carid);}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInVehicle(i, carid) || HireCar[i] == carid)
- {
- gLastDriver[carid] = 255;
- return 0;
- }
- }
- }
- SetVehiclePos(carid,HouseCarSpawns[carid-1][0], HouseCarSpawns[carid-1][1], HouseCarSpawns[carid-1][2]);
- SetVehicleZAngle(carid, HouseCarSpawns[carid-1][3]);
- return 1;
- }
- public CarRespawn(carid)
- {
- if (gdebug >= 1){printf("DEBUG CarRespawn(%d)",carid);}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInVehicle(i, carid) || HireCar[i] == carid)
- {
- gLastDriver[carid] = 255;
- return 0;
- }
- }
- }
- SetVehicleToRespawn(carid);
- gLastDriver[carid] = 299;
- TeamLockReset(carid);
- return 1;
- }
- public LockCar(carid)
- {
- if (gdebug >= 1){printf("DEBUG LockCar(%d)",carid);}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(stealcar == carid)
- {
- SetVehicleParamsForPlayer(carid,i,1,1);
- }
- else
- {
- SetVehicleParamsForPlayer(carid,i,0,1);
- }
- }
- }
- }
- public UnLockCar(carid)
- {
- if (gdebug >= 1){printf("DEBUG UnLockCar(%d)",carid);}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(stealcar == carid)
- {
- SetVehicleParamsForPlayer(carid,i,1,0);
- }
- else
- {
- if(!IsAPlane(carid))
- {
- SetVehicleParamsForPlayer(carid,i,0,0);
- }
- }
- }
- }
- }
- public OpenDoors()
- {
- if (gdebug >= 1){printf("DEBUG OpenDoors()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- SetVehicleParamsForPlayer(stealcar,i,1,0);
- }
- }
- }
- public TeamCarLockInit()
- {
- if (gdebug >= 1){printf("DEBUG TeamCarLockInit()");}
- for(new c = 0; c <= 200; c++)
- {
- if ((c >= 23) && (c <= 48))
- {
- gTeamCarLock[c] = 2;
- }
- if ((c >= 49) && (c <= 51))
- {
- gTeamCarLock[c] = 4;
- }
- if ((c >= 52) && (c <= 200))
- {
- gTeamCarLock[c] = 1;
- }
- gCarLock[c] = 0;
- }
- return 1;
- }
- public TeamLockReset(carid)
- {
- if (gdebug >= 3){printf("DEBUG TeamLockReset(carid)",carid);}
- if (!teamcarlock)
- {
- return 0;
- }
- if ((carid >= 23) && (carid <= 48))
- {
- gTeamCarLock[carid] = 2;
- }
- if ((carid >= 49) && (carid <= 51))
- {
- gTeamCarLock[carid] = 4;
- }
- if ((carid >= 52) && (carid <= 200))
- {
- gTeamCarLock[carid] = 1;
- }
- gCarLock[carid] = 0;
- return 1;
- }
- public InitLockDoors(playerid)
- {
- if (gdebug >= 1){printf("DEBUG1 InitLockDoors(%d)",playerid);}
- new c;
- while (c < 254)
- {
- c++;
- if (gCarLock[c] == 1)
- {
- if (gdebug >= 1){printf("DEBUG3 InitLockDoors(%d)car(%d)",playerid,c);}
- SetVehicleParamsForPlayer(c,playerid,0,1);
- }
- }
- if(PLicence[playerid] != 1)
- {
- SetVehicleParamsForPlayer(66,playerid,0,1);
- SetVehicleParamsForPlayer(67,playerid,0,1);
- SetVehicleParamsForPlayer(68,playerid,0,1);
- SetVehicleParamsForPlayer(69,playerid,0,1);
- SetVehicleParamsForPlayer(70,playerid,0,1);
- SetVehicleParamsForPlayer(71,playerid,0,1);
- }
- return 1;
- }
- public TeamLockDoors(playerid)
- {
- if (gdebug >= 1){printf("DEBUG TeamLockDoors(%d)",playerid);}
- new c =0;
- while (c <= 200)
- {
- c++;
- if (gCarLock[c] == 1)
- {
- SetVehicleParamsForPlayer(c,playerid,0,1);
- }
- if (gTeamCarLock[c] == 1)
- {
- if(gTeam[playerid] != 1 && gTeam[playerid] != 3)
- {
- SetVehicleParamsForPlayer(c,playerid,0,1);
- }
- else
- {
- SetVehicleParamsForPlayer(c,playerid,0,0);
- }
- }
- if (gTeamCarLock[c] == 2)
- {
- if(gTeam[playerid] != 2)
- {
- SetVehicleParamsForPlayer(c,playerid,0,1);
- }
- else
- {
- SetVehicleParamsForPlayer(c,playerid,0,0);
- }
- }
- if (gTeamCarLock[c] == 4)
- {
- if(gTeam[playerid] != 4)
- {
- SetVehicleParamsForPlayer(c,playerid,0,1);
- }
- else
- {
- SetVehicleParamsForPlayer(c,playerid,0,0);
- }
- }
- if (gTeamCarLock[c] == 0)
- {
- SetVehicleParamsForPlayer(c,playerid,0,0);
- }
- }
- return 1;
- }
- public DebugPrint(string[],value1,value2,type)
- {
- new formated[256];
- if (gdebug >= 2 && type == 1)
- {
- format(formated, sizeof(formated), "Debug:(%d) %s: %d",value1,string,value2);
- printf("%s",formated);
- SendClientMessageToAll(COLOR_WHITE, formated);
- }
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if (gdebug >= 1){printf("DEBUG OnPlayerExitVehicle(%d, %d)", playerid, vehicleid);}
- if (GetPlayerState(playerid) == 1)
- {
- return 1;
- }
- new string[256];
- new ename[MAX_PLAYER_NAME];
- if (vehicleid == stealcar && (MissionActive == 10 || MissionActive == 101))
- {
- GameTextForPlayer(playerid, "~w~Get back in the ~n~~r~Car", 5000, 1);
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- SetVehicleParamsForPlayer(stealcar,i,1,0);
- }
- }
- if (playerid == gSuperCop)
- {
- gSuperCop = 255;
- }
- CheckpointReset();
- MissionActive = 101;
- if (gdebug){print("DEBUG MissionActive = 101");}
- }
- else if (gTeam[playerid] >= 4 && vehicleid == stealcar && MissionActive == 11 && gSuperCop == playerid)
- {
- if (gdebug){print("DEBUG CHECKPOINT_CARDROP");}
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- GetPlayerName(playerid, ename, sizeof(ename));
- GivePlayerMoney(playerid, reward);
- preward = reward;
- format(string, sizeof(string), "~g~AUTO Dostavljen~n~~w~Evo isplate: ~n~~g~$%d", reward);
- PlayerPlayMusic(playerid);
- GameTextForPlayer(playerid, string, 5000, 6);
- format(string, sizeof(string), "%s prodao si auto za $%d.", ename,reward);
- BroadCast(COLOR_YELLOW, string);
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- SetVehicleParamsForPlayer(stealcar,i,0,0);
- }
- }
- if (playerid != gPublicEnemy)
- {
- gPlayerMission[playerid] = 3;
- SetPlayerCriminal(playerid,255, "Grand Theft Auto",1,1);
- }
- CheckpointReset();
- SetVehicleToRespawn(stealcar);
- stealcar = -1;
- MissionActive = 12;
- if (gdebug){print("DEBUG MissionActive = 12");}
- }
- else if (gTeam[playerid] == 2 && vehicleid == stealcar && MissionActive == 11 && gSuperCop == playerid)
- {
- if (gdebug){print("DEBUG CHECKPOINT_CARDROP");}
- PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
- GetPlayerName(playerid, ename, sizeof(ename));
- GivePlayerMoney(playerid, reward);
- PlayerInfo[playerid][pHW]++;
- if(PlayerInfo[playerid][pHW] >= 3)
- {
- PlayerInfo[playerid][pExp]++;
- PlayerInfo[playerid][pHW] = 0;
- SendClientMessage(playerid, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
- }
- format(string, sizeof(string), "~g~AUTO Vracen~n~~w~Bonus nagrada: ~n~~g~$%d", reward);
- PlayerPlayMusic(playerid);
- GameTextForPlayer(playerid, string, 5000, 6);
- format(string, sizeof(string), "Policajac %s je vratio auto za $%d.", ename,reward);
- BroadCast(COLOR_YELLOW, string);
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- SetVehicleParamsForPlayer(stealcar,i,0,0);
- }
- }
- CheckpointReset();
- SetVehicleToRespawn(stealcar);
- stealcar = -1;
- MissionActive = 12;
- if (gdebug){print("DEBUG MissionActive = 12");}
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- new string[128];
- PlayerInfo[playerid][pModel] = Peds[classid][0];
- if(classid >= 1)
- {
- format(string, sizeof(string), "~r~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~CroHerze DM");
- GameTextForPlayer(playerid,string,3500,6);
- }
- SetPlayerTeamFromClass(playerid,classid);
- SetupPlayerForClassSelection(playerid);
- SetPlayerToTeamColor(playerid);
- return 1;
- }
- public SetupPlayerForClassSelection(playerid)
- {
- switch (gTeam[playerid])
- {
- case TEAM_BLUE:
- {
- SetPlayerInterior(playerid,0);//------------ono gdje se gleda lik on playerselection
- SetPlayerPos(playerid,1668.9531,-1622.3275,79.1353);
- SetPlayerFacingAngle(playerid, 320.0);
- SetPlayerCameraPos(playerid,1668.9531+1.5,-1622.3275+1.5,79.1353+0.5);
- SetPlayerCameraLookAt(playerid,1668.9531,-1622.3275,79.1353+0.5);
- }
- case TEAM_CYAN:
- {
- SetPlayerInterior(playerid,0);//------------ono gdje se gleda lik on playerselection
- SetPlayerPos(playerid,1668.9531,-1622.3275,79.1353);
- SetPlayerFacingAngle(playerid, 320.0);
- SetPlayerCameraPos(playerid,1668.9531+1.5,-1622.3275+1.5,79.1353+0.5);
- SetPlayerCameraLookAt(playerid,1668.9531,-1622.3275,79.1353+0.5);
- }
- case TEAM_GREEN:
- {
- SetPlayerInterior(playerid,0);//------------ono gdje se gleda lik on playerselection
- SetPlayerPos(playerid,1668.9531,-1622.3275,79.1353);
- SetPlayerFacingAngle(playerid, 320.0);
- SetPlayerCameraPos(playerid,1668.9531+1.5,-1622.3275+1.5,79.1353+0.5);
- SetPlayerCameraLookAt(playerid,1668.9531,-1622.3275,79.1353+0.5);
- }
- default:
- {
- SetPlayerInterior(playerid,0);//------------ono gdje se gleda lik on playerselection
- SetPlayerPos(playerid,1668.9531,-1622.3275,79.1353);
- SetPlayerFacingAngle(playerid, 320.0);
- SetPlayerCameraPos(playerid,1668.9531+1.5,-1622.3275+1.5,79.1353+0.5);
- SetPlayerCameraLookAt(playerid,1668.9531,-1622.3275,79.1353+0.5);
- }
- }
- }
- //---------------------------------------------------------
- public SetPlayerTeamFromClass(playerid,classid)
- {
- if (gdebug >= 2){printf("DEBUG SetPlayerTeamFromClass(%d, %d)", playerid, classid);}
- if(classid >= 260)
- {
- gTeam[playerid] = TEAM_GREEN;
- PlayerInfo[playerid][pTeam] = 3;
- }
- }
- //---------------------------------------------------------
- public SetPlayerCriminal(playerid,declare,reason[],pe,flash)
- {
- if (gdebug >= 1){printf("DEBUG SetPlayerCriminal(%d, %d ,%s ,%d ,%d)", playerid,declare,reason,pe,flash);}
- new turned[MAX_PLAYER_NAME];
- new turner[MAX_PLAYER_NAME];
- new turnmes[128];
- //new tmpstring[32];
- //format(tmpstring, sizeof(tmpstring), reason);
- strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
- GetPlayerName(playerid, turned, sizeof(turned));
- if (declare == 255)
- {
- //print("DEBUG: 4");
- format(turner, sizeof(turner), "Unknown");
- strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
- }
- else
- {
- //print("DEBUG: 5");
- GetPlayerName(declare, turner, sizeof(turner));
- strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
- strmid(PlayerCrime[declare][pBplayer], turned, 0, strlen(turned), 255);
- strmid(PlayerCrime[declare][pAccusing], reason, 0, strlen(reason), 255);
- }
- if (pe == 1)
- {
- if (gPublicEnemy != INVALID_PLAYER_ID && gPublicEnemy != playerid)
- {
- OffTheHook();
- KillTimer(offhook);
- }
- gPublicEnemy = playerid;
- format(turnmes, sizeof(turnmes), "SMS | %s, ti si Public Enemy No.1 za %s. Izbjegni smrt %d Minuta, Salje: MOLE (555)",turned,reason,petime/60000);
- RingTone[playerid] = 20;
- SendClientMessage(playerid, COLOR_YELLOW, turnmes);
- format(cbjstore, sizeof(cbjstore), "Centrala: Sve jedinice u potragu za Public Enemy-om %s",turned);
- SendTeamBeepMessage(2, COLOR_DBLUE, cbjstore);
- format(turnmes, sizeof(turnmes), "Centrala: Wanted In Connection With %s, You have %d Minuites.",reason,petime/60000);
- format(objstore, sizeof(objstore), "SMS | Ubij tog luzera %s, i uzmi mu novac, Salje: MOLE (555)",turned);
- SendTeamMessage(2, COLOR_DBLUE, turnmes);
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && gPublicEnemy != i && gTeam[i] >= 3)
- {
- SendClientMessage(i, COLOR_YELLOW, objstore);
- RingTone[i] = 20;
- }
- }
- SendTeamMessage(2, COLOR_WHITE, "Pomoc: Lovi i eliminiraj trepcucu ikonu na ekranu.");
- offhook = SetTimer("OffTheHook", petime, 0);
- }
- else
- {
- if ((gTeam[playerid]) == 1)//med kill criminal
- {
- format(turnmes, sizeof(turnmes), "UPOZORENJE | %s, Policajci te love %s, Prijavio: %s",turned,reason,turner);
- }
- else
- {
- format(turnmes, sizeof(turnmes), "UPOZORENJE | %s, Policajci te love zbog %s, Prijavio: %s",turned,reason,turner);
- }
- gTeam[playerid] = 4;//lawbreaker
- if (flash)
- {
- FlashTime[playerid] = 10;
- }
- else
- {
- SetPlayerToTeamColor(playerid);
- }
- if (PlayerInfo[playerid][pAdmin] >= 1339)
- SendClientMessage(playerid, COLOR_RED, turnmes);
- SetPlayerToTeamColor(playerid);
- }
- print("DEBUG: 5");
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (gTeam[i]) == 2 && gPublicEnemy != playerid)
- {
- format(cbjstore, sizeof(turnmes), "Centrala: All Units APB: Reporter: %s",turner);
- SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
- format(cbjstore, sizeof(turnmes), "Centrala: Zlocin: %s, Osumnjicen: %s",reason,turned);
- SendClientMessage(i, TEAM_BLUE_COLOR, cbjstore);
- }
- }
- }
- //---------------------------------------------------------
- public SetPlayerFree(playerid,declare,reason[],pe,flash)
- {
- if (gdebug >= 1){printf("DEBUG SetPlayerFree(%d, %d ,%d ,%d)", playerid,declare,pe,flash);}
- ClearCrime(playerid);
- new turned[MAX_PLAYER_NAME];
- new turner[MAX_PLAYER_NAME];
- new turnmes[128];
- new crbjstore[128];
- if (declare == 255)
- {
- format(turner, sizeof(turner), "911");
- }
- else
- {
- GetPlayerName(declare, turner, sizeof(turner));
- }
- GetPlayerName(playerid, turned, sizeof(turned));
- if (PlayerInfo[playerid][pTeam] == 1)
- {
- gTeam[playerid] = 1;
- }
- else
- {
- gTeam[playerid] = 3;
- }
- if (flash)
- {
- FlashTime[playerid] = 10;
- }
- else
- {
- SetPlayerToTeamColor(playerid);
- }
- format(turnmes, sizeof(turnmes), "SMS | %s, zbog %s, nisi vise kriminalac, Salje: MOLE (555)",turned,reason);
- RingTone[playerid] = 20;
- SendClientMessage(playerid, COLOR_YELLOW, turnmes);
- SetPlayerToTeamColor(playerid);
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (gTeam[i]) == 2)
- {
- format(crbjstore, sizeof(crbjstore), "Centrala: Policajac %s je komplretirao zadatak",turner);
- SendClientMessage(i, COLOR_DBLUE, crbjstore);
- format(crbjstore, sizeof(crbjstore), "Centrala: %s Je procesuiran, %s",turned,reason);
- SendClientMessage(i, COLOR_DBLUE, crbjstore);
- }
- }
- }
- public OffTheHook()
- {
- if (gdebug >= 1){printf("DEBUG OffTheHook()");}
- new hookoff[128];
- new offhookn[MAX_PLAYER_NAME];
- new mission = gPlayerMission[gPublicEnemy];
- if(mission == 4)
- {
- mission = random(3)+1;
- }
- switch (mission)
- {
- case 1:
- {
- PlayerInfo[gPublicEnemy][pCB]++;
- if(PlayerInfo[gPublicEnemy][pCB] >= 4)
- {
- PlayerInfo[gPublicEnemy][pExp]++;
- PlayerInfo[gPublicEnemy][pCB] = 0;
- SendClientMessage(gPublicEnemy, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
- }
- }
- case 2:
- {
- PlayerInfo[gPublicEnemy][pSR]++;
- if(PlayerInfo[gPublicEnemy][pSR] >= 4)
- {
- PlayerInfo[gPublicEnemy][pExp]++;
- PlayerInfo[gPublicEnemy][pSR] = 0;
- SendClientMessage(gPublicEnemy, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
- }
- }
- case 3:
- {
- PlayerInfo[gPublicEnemy][pHW]++;
- if(PlayerInfo[gPublicEnemy][pHW] >= 4)
- {
- PlayerInfo[gPublicEnemy][pExp]++;
- PlayerInfo[gPublicEnemy][pHW] = 0;
- SendClientMessage(gPublicEnemy, COLOR_YELLOW, "Postajes jaci, dobio si 1 Exp");
- }
- }
- default:
- {
- }
- }
- SetPlayerToTeamColor(gPublicEnemy);
- GetPlayerName(gPublicEnemy, offhookn, sizeof(offhookn));
- format(hookoff, sizeof(hookoff), "<FLASH VIJESTI>: %s je pobjegao policiji i vese nije Public Enemy No.1",offhookn);
- RingTone[gPublicEnemy] = 20;
- SetPlayerToTeamColor(gPublicEnemy);
- SendClientMessageToAll(COLOR_PURPLE, hookoff);
- gPublicEnemy = INVALID_PLAYER_ID;
- return 1;
- }
- public CellPhoneTimer()
- {
- if (gdebug >= 3){printf("DEBUG CellPhoneTimer()");}
- new string[64];
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(CellTime[i] > 0)
- {
- if (CellTime[i] == cchargetime)
- {
- CellTime[i] = 1;
- if(Mobile[Mobile[i]] == i)
- {
- CallCost[i] = CallCost[i]+callcost;
- }
- }
- //printf("CellTime %d %d",i,CellTime[i]);
- CellTime[i] = CellTime[i] +1;
- //printf("callers line %d called %d caller %d",Mobile[Mobile[i]],Mobile[i],i);
- if (Mobile[Mobile[i]] == 255 && CellTime[i] == 5)
- {
- new called[MAX_PLAYER_NAME];
- GetPlayerName(Mobile[i], called, sizeof(called));
- format(string, sizeof(string), "* %s's phone rings.", called);
- RingTone[Mobile[i]] = 10;
- ProxDetector(30.0, Mobile[i], string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- }
- if(CellTime[i] == 0 && CallCost[i] > 0)
- {
- format(string, sizeof(string), "~w~Poziv kosta ~n~~r~$%d",CallCost[i]);
- GivePlayerMoney(i, -CallCost[i]);
- BizzInfo[10][bTakings] += CallCost[i];
- GameTextForPlayer(i, string, 5000, 1);
- CallCost[i] = 0;
- }
- }
- }
- }
- public SetPlayerFlash()
- {
- //if (gdebug >= 2){printf("DEBUG SetPlayerFlash()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if (gPublicEnemy == i || gSuperCop == i)
- {
- FlashTime[i] = 3;
- }
- if(IsPlayerConnected(i) == 1 && FlashTime[i] > 0)
- {
- //printf("flashtime %d %d",i,FlashTime[i]);
- FlashTime[i]--;
- SetPlayerToTeamColorFlash(i);
- }
- }
- SetTimer("SetPlayerFlashRev", 1000, 0);
- return 1;
- }
- public SetPlayerFlashRev()
- {
- //if (gdebug >= 2){printf("DEBUG SetPlayerFlashRev()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && FlashTime[i] > 1)
- {
- FlashTime[i]--;
- //printf("flashtime %d %d",i,FlashTime[i]);
- SetPlayerColor(i,COLOR_INVIS); // invisibil
- }
- }
- SetTimer("SetPlayerFlash", 1000, 0);
- return 1;
- }
- public RingToner()
- {
- //if (gdebug >= 2){printf("DEBUG RingToner()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && RingTone[i] != 6 && RingTone[i] != 0 && RingTone[i] < 11)
- {
- //printf("RingTone %d %d",i,RingTone[i]);
- RingTone[i] = RingTone[i] -1;
- PlayerPlaySound(i, 1138, 0.0, 0.0, 0.0);
- }
- if(IsPlayerConnected(i) == 1 && RingTone[i] == 6)
- {
- RingTone[i] = RingTone[i] -1;
- }
- if(IsPlayerConnected(i) == 1 && RingTone[i] == 20)
- {
- //printf("RingTone %d %d",i,RingTone[i]);
- RingTone[i] = RingTone[i] -1;
- PlayerPlaySound(i, 1139, 0.0, 0.0, 0.0);
- }
- }
- //RingTonerRev();
- SetTimer("RingTonerRev", 200, 0);
- return 1;
- }
- public SendRadioMessage(member, color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMember] == member || PlayerInfo[i][pLeader] == member)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- }
- public RingTonerRev()
- {
- //if (gdebug >= 2){printf("DEBUG SetPlayerFlashRev()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && RingTone[i] != 5 && RingTone[i] != 0 && RingTone[i] < 10)
- {
- RingTone[i] = RingTone[i] -1;
- PlayerPlaySound(i, 1137, 0.0, 0.0, 0.0);
- }
- if(IsPlayerConnected(i) == 1 && RingTone[i] == 5)
- {
- RingTone[i] = RingTone[i] -1;
- }
- if(IsPlayerConnected(i) == 1 && RingTone[i] == 19)
- {
- //printf("RingTone %d %d",i,RingTone[i]);
- PlayerPlaySound(i, 1139, 0.0, 0.0, 0.0);
- RingTone[i] = 0;
- }
- }
- SetTimer("RingToner", 500, 0);
- return 1;
- }
- public SetPlayerUnjail()
- {
- if (gdebug >= 3){printf("DEBUG SetPlayerUnjail()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && JailTime[i] < 0)
- {
- JailTime[i]++;
- //printf("JailTime %d %d",i,JailTime[i]);
- }
- if(IsPlayerConnected(i) == 1 && JailTime[i] > 0)
- {
- JailTime[i]--;
- //printf("JailTime %d %d",i,JailTime[i]);
- }
- if(IsPlayerConnected(i) == 1 && JailTime[i] == 10)
- {
- new string[128];
- //printf("JailTime %d %d",i,JailTime[i]);
- FlashTime[i] = 0;
- SetPlayerPos(i,268.3,77.4,1001.0);
- SendClientMessage(i, COLOR_GRAD1," Platio si svoj dug drustvu.");
- format(string, sizeof(string), "~g~Sloboda~n~~w~Pokusaj biti bolji gradjanin");
- GameTextForPlayer(i, string, 5000, 1);
- PlayJailSound(1165 , 1166, 1000,264.395200, 77.564040, 1001.039000);
- }
- }
- }
- public VoteKickTimer()
- {
- if (gdebug >= 3){printf("DEBUG VoteKickTimer()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && VoteKick[i] > 0)
- {
- VoteKick[i]++;
- //printf("VoteKick %d VoteKick[%d] KickVote[%d]",i,VoteKick[i],KickVote[i]);
- if(IsPlayerConnected(i) == 1 && VoteKick[i] == 20)
- {
- if(KickVote[i] >= numplayers/4)
- {
- new string[128];
- new accused[MAX_PLAYER_NAME];
- GetPlayerName(i, accused, sizeof(accused));
- format(string, sizeof(string), "Glasanje usplesno: %s je dobio dovoljno glasova za kick",accused);
- BroadCast(COLOR_RED,string);
- ClearVote(i);
- Kick(i);
- }
- else
- {
- new string[128];
- new accused[MAX_PLAYER_NAME];
- GetPlayerName(i, accused, sizeof(accused));
- format(string, sizeof(string), "Glasanje neuspjesno: %s nece bit kickan",accused);
- BroadCast(COLOR_RED,string);
- ClearVote(i);
- }
- }
- }
- }
- }
- public ClearVote(kickedid)
- {
- KickVote[kickedid] = 0;
- VoteKick[kickedid] = 0;
- for(new j = 0; j <= MAX_PLAYERS; j++)
- {
- if(IsPlayerConnected(j) == 1 && LastVote[j] == kickedid)
- {
- LastVote[j] = 255;
- }
- }
- }
- public SetPlayerWeapons(playerid)
- {
- if (gdebug >= 1){printf("DEBUG SetPlayerWeapons(%d)",playerid);}
- //ResetPlayerWeapons(playerid);
- if(PlayerInfo[playerid][pGun1] == 0)
- {
- PlayerInfo[playerid][pGun1] = 24;
- }
- if (PlayerInfo[playerid][pGun1] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun1], PlayerInfo[playerid][pAmmo1]);
- }
- if(gTeam[playerid] == 1)
- {
- GivePlayerWeapon(playerid, 4, 0);
- }
- if(gTeam[playerid] == 2)
- {
- GivePlayerWeapon(playerid, 3, 0);
- //GivePlayerWeapon(playerid, 41, 500); //spray
- }
- if(gTeam[playerid] >= 3)
- {
- GivePlayerWeapon(playerid, 32, 100);
- }
- if (PlayerInfo[playerid][pGun2] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun2], PlayerInfo[playerid][pAmmo2]);
- }
- if (PlayerInfo[playerid][pGun3] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun3], PlayerInfo[playerid][pAmmo3]);
- }
- if (PlayerInfo[playerid][pGun4] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun4], PlayerInfo[playerid][pAmmo4]);
- }
- if (PlayerInfo[playerid][pGun5] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun5], PlayerInfo[playerid][pAmmo5]);
- }
- if (PlayerInfo[playerid][pGun6] > 0)
- {
- GivePlayerWeapon(playerid, PlayerInfo[playerid][pGun6], PlayerInfo[playerid][pAmmo6]);
- }
- }
- public PrintSBizInfo(playerid,targetid)
- {
- new coordsstring[256];
- SendClientMessage(playerid, COLOR_ORANGERED,"Informacije o Firmi");
- format(coordsstring, sizeof(coordsstring),"Naziv Firme: %s, Vlasnik: %s, Reket: Nitko, Vrsta: 19",SBizzInfo[targetid][sbDiscription],SBizzInfo[targetid][sbOwner]);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Racun: $%d, Reket racun: $0", SBizzInfo[targetid][sbTakings]);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Cijena Firme: %d, Zakljucano: %d", SBizzInfo[targetid][sbValue],SBizzInfo[targetid][sbLock]);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- SendClientMessage(playerid, COLOR_GREEN," ");
- }
- public PrintBizInfo(playerid,targetid)
- {
- new coordsstring[256];
- SendClientMessage(playerid, COLOR_ORANGERED,"Informacije o Firmi");
- format(coordsstring, sizeof(coordsstring),"Naziv Firme: %s, Vlasnik: %s, Reket: Nitko, Vrsta: 19",BizzInfo[targetid][bDiscription],BizzInfo[targetid][bOwner]);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Racun: $%d, Reket racun: $0", BizzInfo[targetid][bTakings]);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Cijena Firme: %d, Zakljucano: %d", BizzInfo[targetid][bValue],BizzInfo[targetid][bLock]);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- SendClientMessage(playerid, COLOR_GREEN," ");
- }
- public PrintPlayerWeapons(playerid,targetid)
- {
- if (gdebug >= 1){printf("DEBUG PrintPlayerWeapons(%d %d)",playerid,targetid);}
- new cash = GetPlayerMoney(targetid);
- // new admin = PlayerInfo[targetid][pAdmin];
- new level = PlayerInfo[targetid][pLevel];
- new exp = PlayerInfo[targetid][pExp];
- new gun1 = PlayerInfo[targetid][pGun1];
- new gun2 = PlayerInfo[targetid][pGun2];
- new gun3 = PlayerInfo[targetid][pGun3];
- new gun4 = PlayerInfo[targetid][pGun4];
- new gun5 = PlayerInfo[targetid][pGun5];
- new gun6 = PlayerInfo[targetid][pGun6];
- new ammo1 = PlayerInfo[targetid][pAmmo1];
- new ammo2 = PlayerInfo[targetid][pAmmo2];
- new ammo3 = PlayerInfo[targetid][pAmmo3];
- new ammo4 = PlayerInfo[targetid][pAmmo4];
- new ammo5 = PlayerInfo[targetid][pAmmo5];
- new ammo6 = PlayerInfo[targetid][pAmmo6];
- new kills = PlayerInfo[targetid][pKills];
- new pcb = PlayerInfo[targetid][pCB];
- new phw = PlayerInfo[targetid][pHW];
- new psr = PlayerInfo[targetid][pSR];
- new pwa = PlayerInfo[targetid][pWA] ;
- new ppen = PlayerInfo[targetid][pPEN];
- new pnumber = PlayerInfo[targetid][pPnumber];
- new account = PlayerInfo[targetid][pAccount];
- new nxtlevel = PlayerInfo[targetid][pLevel]+1;
- new expamount = nxtlevel*levelexp;
- new costlevel = nxtlevel*levelcost;//10k for testing purposes
- new housekey = PlayerInfo[targetid][pPhousekey];
- new bizkey = PlayerInfo[targetid][pPbiskey];
- new intir = PlayerInfo[playerid][pInt];
- new local = PlayerInfo[playerid][pLocal];
- new Float:shealth = PlayerInfo[targetid][pSHealth];
- new Float:health;
- new name[MAX_PLAYER_NAME];
- new sgun1[20];
- new sgun2[20];
- new sgun3[20];
- new sgun4[20];
- new sgun5[20];
- new sgun6[20];
- new ttext[20];
- if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Medic"; }
- else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Civili"; }
- else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Nista"; }
- else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "Nista"; }
- else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "Nista"; }
- else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Nista"; }
- else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "GM"; }
- else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "FA"; }
- else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "RUS"; }
- else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "BM"; }
- else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "Nista"; }
- new ftext[50];
- if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)
- { ftext = "Fallen Army"; }
- else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)
- { ftext = "Grove Mafia"; }
- else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)
- { ftext = "Bistrik Mafia"; }
- else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)
- { ftext = "Russian Mafia"; }
- else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)
- { ftext = "Street Crew"; }
- else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)
- { ftext = "Chinese Triads"; }
- else
- { ftext = "Niste Clan Organizacije!"; }
- new rtext[64];
- if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//Bande rankovi
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Sitna riba"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Vojnik"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Hitman"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
- else { rtext = "Sitna riba"; }
- }
- else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Prometnik"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Policajac"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Narednik"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Sef Policije"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Ministar"; }
- else { rtext = "Prometnik"; }
- }
- else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Pocetnik"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Agent"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Specijalni Agent"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Zapovijednik"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Asistent Upravitelja"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Upravitelj"; }
- else { rtext = "Pocetnik"; }
- }
- else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Vojnik"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Narednik"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Major"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Poruènik"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "General"; }
- else { rtext = "Vojnik"; }
- }
- else
- {
- rtext = "Nijedan";
- }
- GetWeaponName(gun1, sgun1, 20);
- GetWeaponName(gun2, sgun2, 20);
- GetWeaponName(gun3, sgun3, 20);
- GetWeaponName(gun4, sgun4, 20);
- GetWeaponName(gun5, sgun5, 20);
- GetWeaponName(gun6, sgun6, 20);
- GetPlayerName(targetid, name, sizeof(name));
- GetPlayerHealth(targetid,health);
- new Float:px,Float:py,Float:pz;
- GetPlayerPos(targetid, px, py, pz);
- new ucp[800];
- // format(coordsstring, sizeof(coordsstring), "%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%.1f,%.1f,%.1f,%.1f,%.1f", PlayerInfo[playerid][pKey], cash, admin, level,gun1,gun2,gun3,gun4,gun5,gun6,ammo1,ammo2,ammo3,ammo4,ammo5,ammo6,shealth,health, px, py, pz);
- // SendClientMessage(playerid, TEAM_BLUE_COLOR, coordsstring);
- format(ucp, sizeof(ucp), "\n%s\n\nTim:[%s] | Organizacija:[%s]\n\nLevel: [%d] | SpawnHealt: %.1f | Novac: [$%d] | Banka: [$%d] | Warn: [%d] | CHBodovi: [%d]\n\nCashBox: [%d/4] | HotWire: [%d/4] | Ulicna utrka: [%d/4] | Servisi: [%d/20]\n\nUbojstava: [%d/50] | PENo1 ubijanja: [%d/4] | Iduci level: [$%d] | Respekti: [%d/%d]\n", name,ttext,ftext,level, shealth+50, cash, account, PlayerInfo[targetid][pWarns],PlayerInfo[targetid][pCHBodovi],pcb,phw,psr,pwa,kills,ppen,costlevel,exp,expamount );
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{33BBFF}Korisnicki racun", ucp, "U redu", "Odustani");
- }
- //-------------------------ZA ADMINE--------------------------------
- public PrintPlayerprovjeri(playerid,targetid)
- {
- if (gdebug >= 1){printf("DEBUG PrintPlayerWeapons(%d %d)",playerid,targetid);}
- new cash = GetPlayerMoney(targetid);
- // new admin = PlayerInfo[targetid][pAdmin];
- new level = PlayerInfo[targetid][pLevel];
- new exp = PlayerInfo[targetid][pExp];
- new gun1 = PlayerInfo[targetid][pGun1];
- new gun2 = PlayerInfo[targetid][pGun2];
- new gun3 = PlayerInfo[targetid][pGun3];
- new gun4 = PlayerInfo[targetid][pGun4];
- new gun5 = PlayerInfo[targetid][pGun5];
- new gun6 = PlayerInfo[targetid][pGun6];
- new ammo1 = PlayerInfo[targetid][pAmmo1];
- new ammo2 = PlayerInfo[targetid][pAmmo2];
- new ammo3 = PlayerInfo[targetid][pAmmo3];
- new ammo4 = PlayerInfo[targetid][pAmmo4];
- new ammo5 = PlayerInfo[targetid][pAmmo5];
- new ammo6 = PlayerInfo[targetid][pAmmo6];
- new kills = PlayerInfo[targetid][pKills];
- new pcb = PlayerInfo[targetid][pCB];
- new phw = PlayerInfo[targetid][pHW];
- new psr = PlayerInfo[targetid][pSR];
- new pwa = PlayerInfo[targetid][pWA] ;
- new ppen = PlayerInfo[targetid][pPEN];
- new pnumber = PlayerInfo[targetid][pPnumber];
- new account = PlayerInfo[targetid][pAccount];
- new nxtlevel = PlayerInfo[targetid][pLevel]+1;
- new expamount = nxtlevel*levelexp;
- new costlevel = nxtlevel*levelcost;//10k for testing purposes
- new housekey = PlayerInfo[targetid][pPhousekey];
- new bizkey = PlayerInfo[targetid][pPbiskey];
- new intir = PlayerInfo[playerid][pInt];
- new local = PlayerInfo[playerid][pLocal];
- new Float:shealth = PlayerInfo[targetid][pSHealth];
- new Float:health;
- new name[MAX_PLAYER_NAME];
- new sgun1[20];
- new sgun2[20];
- new sgun3[20];
- new sgun4[20];
- new sgun5[20];
- new sgun6[20];
- new ttext[20];
- if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Medic"; }
- else if(gTeam[targetid] == 3 || gTeam[targetid] == 4) { ttext = "Civilian"; }
- else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1) { ttext = "Officer"; }
- else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2) { ttext = "FBI Agent"; }
- else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3) { ttext = "National Guard"; }
- else if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4) { ttext = "Firemen/Paramedic"; }
- else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5) { ttext = "CA"; }
- else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6) { ttext = "UT"; }
- else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8) { ttext = "SM"; }
- else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9) { ttext = "SC"; }
- else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10) { ttext = "CT"; }
- new ftext[20];
- if(PlayerInfo[targetid][pMember] == 4 || PlayerInfo[targetid][pLeader] == 4)
- { ftext = "Firemen/Paramedics"; }
- else if(PlayerInfo[targetid][pMember] == 5 || PlayerInfo[targetid][pLeader] == 5)
- { ftext = "Cold Assassins"; }
- else if(PlayerInfo[targetid][pMember] == 6 || PlayerInfo[targetid][pLeader] == 6)
- { ftext = "Unreal Team"; }
- else if(PlayerInfo[targetid][pMember] == 8 || PlayerInfo[targetid][pLeader] == 8)
- { ftext = "Sicilian Mafia"; }
- else if(PlayerInfo[targetid][pMember] == 9 || PlayerInfo[targetid][pLeader] == 9)
- { ftext = "Street Crew"; }
- else if(PlayerInfo[targetid][pMember] == 10 || PlayerInfo[targetid][pLeader] == 10)
- { ftext = "Chinese Triads"; }
- else
- { ftext = "None"; }
- new rtext[64];
- if(gTeam[targetid] == 5 || PlayerInfo[targetid][pFMember] < 255)//Bande rankovi
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Sitna riba"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Vojnik"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Hitman"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Underboss"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Boss"; }
- else { rtext = "Sitna riba"; }
- }
- else if(PlayerInfo[targetid][pMember] == 1 || PlayerInfo[targetid][pLeader] == 1)//PD Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Prometnik"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Policajac"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Narednik"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Sef Policije"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Ministar"; }
- else { rtext = "Prometnik"; }
- }
- else if(PlayerInfo[targetid][pMember] == 2 || PlayerInfo[targetid][pLeader] == 2)//FBI Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Pocetnik"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Agent"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Specijalni Agent"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Zapovijednik"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Asistent Upravitelja"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "Upravitelj"; }
- else { rtext = "Pocetnik"; }
- }
- else if(PlayerInfo[targetid][pMember] == 3 || PlayerInfo[targetid][pLeader] == 3)//NG Ranks
- {
- if(PlayerInfo[targetid][pRank] == 1) { rtext = "Vojnik"; }
- else if(PlayerInfo[targetid][pRank] == 2) { rtext = "Narednik"; }
- else if(PlayerInfo[targetid][pRank] == 3) { rtext = "Major"; }
- else if(PlayerInfo[targetid][pRank] == 4) { rtext = "Kapetan"; }
- else if(PlayerInfo[targetid][pRank] == 5) { rtext = "Poruènik"; }
- else if(PlayerInfo[targetid][pRank] == 6) { rtext = "General"; }
- else { rtext = "Vojnik"; }
- }
- else
- {
- rtext = "None";
- }
- GetWeaponName(gun1, sgun1, 20);
- GetWeaponName(gun2, sgun2, 20);
- GetWeaponName(gun3, sgun3, 20);
- GetWeaponName(gun4, sgun4, 20);
- GetWeaponName(gun5, sgun5, 20);
- GetWeaponName(gun6, sgun6, 20);
- GetPlayerName(targetid, name, sizeof(name));
- GetPlayerHealth(targetid,health);
- new Float:px,Float:py,Float:pz;
- GetPlayerPos(targetid, px, py, pz);
- new coordsstring[500];
- new id;
- new ip[16];
- new pname[24];
- new hour,minuite,second;
- new year, month,day;
- new sendername[MAX_PLAYER_NAME];
- getdate(year, month, day);
- gettime(hour,minuite,second);
- GetPlayerIp(id,ip,15);
- new Float:tempheal;
- GetPlayerHealth(targetid,tempheal);
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new ptext[64];
- {
- if (IsPlayerInAnyVehicle(playerid)){ ptext = "U vozilu"; }
- else
- {
- ptext = "Na nogama";
- }
- }
- // format(coordsstring, sizeof(coordsstring), "%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%.1f,%.1f,%.1f,%.1f,%.1f", PlayerInfo[playerid][pKey], cash, admin, level,gun1,gun2,gun3,gun4,gun5,gun6,ammo1,ammo2,ammo3,ammo4,ammo5,ammo6,shealth,health, px, py, pz);
- // SendClientMessage(playerid, TEAM_BLUE_COLOR, coordsstring);
- format(coordsstring, sizeof(coordsstring), " ",name);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "__Igrac: %s___________________________________________________________Provjera____V 0.3______",name);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- SendClientMessage(playerid, 0xDB023EFF,coordsstring);
- format(coordsstring, sizeof(coordsstring), "[0] | [0] | [0] | [0] | [0] | [0]",PlayerInfo[targetid][pGun1],PlayerInfo[targetid][pGun2],PlayerInfo[targetid][pGun3],PlayerInfo[targetid][pGun4],PlayerInfo[targetid][pGun5],PlayerInfo[targetid][pGun6]);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "[0] | [0] | [0] | [0] | [0] | [0]",PlayerInfo[targetid][pAmmo1],PlayerInfo[targetid][pAmmo2],PlayerInfo[targetid][pAmmo3],PlayerInfo[targetid][pAmmo4],PlayerInfo[targetid][pAmmo5],PlayerInfo[targetid][pAmmo6]);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Health: (%.0f) | Novac: (%d) | Banka: (%d) | Status: (%s)", tempheal, cash, account,ptext);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Pozicije: Xpoz: (%.0f) | Ypoz: (%.0f) | Zpoz: (%.0f)", px, py, pz);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Level: [%d] | SpawnHealth: (%.0f) || Ip igraca: (%s) || Upozorenja: [%d]", level,shealth+50,ip,PlayerInfo[targetid][pWarns]);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "Datum: %d.%d.%d | Vrijeme: %d:%d", day,month,year,hour,minuite);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- format(coordsstring, sizeof(coordsstring), "_____________________________________________________________________Provjerio Admin: %s_____",sendername);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- SendClientMessage(playerid, 0xDB023EFF,coordsstring);
- }
- //--------------boja timova---------------
- public SetPlayerToTeamColor(playerid)
- {
- if(PlayerInfo[playerid][pMember] == 6)
- {
- SetPlayerColor(playerid,0x1768FFFF); // Fallen Army
- }
- else if(PlayerInfo[playerid][pMember] == 9)
- {
- SetPlayerColor(playerid,0x91FF22FF); // Bistrik Mafia
- }
- else if(PlayerInfo[playerid][pMember] == 8)
- {
- SetPlayerColor(playerid,0xF4F400FF); // Russian Mafia
- }
- else if(PlayerInfo[playerid][pMember] == 4)
- {
- SetPlayerColor(playerid,COLOR_PINK); // Medic
- }
- else if(PlayerInfo[playerid][pMember] == 5)
- {
- SetPlayerColor(playerid,0x26FC07FF); //Grove Mafia
- }
- else
- {
- SetPlayerColor(playerid,COLOR_WHITE); // cvil
- }
- }
- // -------------------------------------boja timova
- public SetPlayerToTeamColorFlash(playerid)
- {
- if(PlayerInfo[playerid][pMember] == 1)
- {
- SetPlayerColor(playerid,COLOR_MEDIUMAQUA); // Officer
- }
- else if(PlayerInfo[playerid][pMember] == 2)
- {
- SetPlayerColor(playerid,COLOR_BLUE); // FBI
- }
- else if(PlayerInfo[playerid][pMember] == 3)
- {
- SetPlayerColor(playerid,COLOR_GREEN); // NG
- }
- else if(PlayerInfo[playerid][pMember] == 4)
- {
- SetPlayerColor(playerid,COLOR_PINK); // Medic
- }
- else if(PlayerInfo[playerid][pMember] == 5)
- {
- SetPlayerColor(playerid,COLOR_BLUE); //
- }
- else if(PlayerInfo[playerid][pMember] == 6)
- {
- SetPlayerColor(playerid,COLOR_GOLD); // UT
- }
- else if(PlayerInfo[playerid][pMember] == 8)
- {
- SetPlayerColor(playerid,COLOR_SPRINGGREEN); // SM
- }
- else if(PlayerInfo[playerid][pMember] == 9)
- {
- SetPlayerColor(playerid,COLOR_PINK); // SC
- }
- else if(PlayerInfo[playerid][pMember] == 10)
- {
- SetPlayerColor(playerid,COLOR_CRIMSON); // Y
- }
- else if(PlayerInfo[playerid][pMember] == 0)
- {
- SetPlayerColor(playerid,COLOR_WHITE); // tim 0
- }
- else if(PlayerInfo[playerid][pMember] == 7)
- {
- SetPlayerColor(playerid,COLOR_WHITE); // tim 7
- }
- else
- {
- SetPlayerColor(playerid,COLOR_WHITE); // cvil
- }
- }
- //---------------------------------------------------------
- public GameModeInitExitFunc()
- {
- if (gdebug >= 1){printf("DEBUG GameModeInitExitFunc()");}
- new string[128];
- format(string, sizeof(string), "Putujem...");
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- DisablePlayerCheckpoint(i);
- gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
- if (gdebug){print("DEBUG CHECKPOINT_NONE3");}
- GameTextForPlayer(i, string, 4000, 5);
- if (gdebug){printf("DEBUG %s", string);}
- SetPlayerCameraPos(i,1460.0, -1324.0, 287.2);
- SetPlayerCameraLookAt(i,1374.5, -1291.1, 239.0);
- OnUpdatePlayer(i);
- gPlayerLogged[i] = 0;
- }
- }
- SetTimer("GameModeExitFunc", 4000, 0);
- return 1;
- }
- public GameModeExitFunc()
- {
- KillTimer(synctimer);
- KillTimer(newmistimer);
- KillTimer(unjailtimer);
- KillTimer(playertimer);
- KillTimer(cartimer);
- KillTimer(unmutetimer);
- KillTimer(celltimer);
- KillTimer(GodTimer);
- GameModeExit();
- }
- //--------------------------------Config--------------------------------------------------------------
- public LoadConfig()
- {
- print(" ");
- print("Ucitavanje konfiguracije servera...");
- if (gdebug){print("DEBUG is on");}
- new valtmp[128];
- new File: file = fopen("pen01.cfg", io_read);
- fread(file, valtmp);strmid(motd, valtmp, 0, strlen(valtmp)-1, 255);
- fread(file, valtmp);GetVal(valtmp);fow = RetVal;
- fread(file, valtmp);GetVal(valtmp);radardist = RetVal;
- fread(file, valtmp);GetVal(valtmp);radarfreq = RetVal;
- fread(file, valtmp);GetVal(valtmp);addtimer = RetVal*1000;
- fread(file, valtmp);GetVal(valtmp);stats = RetVal;
- fread(file, valtmp);GetVal(valtmp);dollah = RetVal;
- fread(file, valtmp);GetVal(valtmp);realtime = RetVal;
- fread(file, valtmp);GetVal(valtmp);timeshift = RetVal;
- fread(file, valtmp);GetVal(valtmp);wtime = RetVal;
- fread(file, valtmp);GetVal(valtmp);gRoundTime = RetVal*60000;
- fread(file, valtmp);GetVal(valtmp);cashbox = RetVal;
- fread(file, valtmp);GetVal(valtmp);streetrace = RetVal;
- fread(file, valtmp);GetVal(valtmp);hotwire = RetVal;
- fread(file, valtmp);GetVal(valtmp);levelcost = RetVal;
- fread(file, valtmp);GetVal(valtmp);basedcost = RetVal;
- fread(file, valtmp);GetVal(valtmp);deathcost = RetVal;
- fread(file, valtmp);GetVal(valtmp);suecost = RetVal;
- fread(file, valtmp);GetVal(valtmp);paycheck = RetVal;
- fread(file, valtmp);GetVal(valtmp);jobdelay = RetVal;
- fread(file, valtmp);GetVal(valtmp);petime = RetVal*60000;
- fread(file, valtmp);GetVal(valtmp);realchat = RetVal;
- fread(file, valtmp);GetVal(valtmp);forceteam = RetVal;
- fread(file, valtmp);GetVal(valtmp);cchargetime = RetVal;
- fread(file, valtmp);GetVal(valtmp);callcost = RetVal;
- fread(file, valtmp);GetVal(valtmp);txtcost = RetVal;
- fread(file, valtmp);GetVal(valtmp);jailtime = RetVal;
- fread(file, valtmp);GetVal(valtmp);intrate = RetVal;
- fread(file, valtmp);GetVal(valtmp);teamcarlock = RetVal;
- fread(file, valtmp);GetVal(valtmp);levelexp = RetVal;
- fread(file, valtmp);GetVal(valtmp);nocasino = RetVal;
- fread(file, valtmp);GetVal(valtmp);automission = RetVal;
- fread(file, valtmp);GetVal(valtmp);civnokill = RetVal;
- fread(file, valtmp);GetVal(valtmp);accountplay = RetVal;
- fread(file, valtmp);GetVal(valtmp);mediccharge = RetVal;
- fclose(file);
- print(".....Konfiguracija ucitana");
- printf("%s %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d",motd,dollah,realtime,timeshift,wtime,gRoundTime,cashbox,streetrace,hotwire,levelcost,deathcost,paycheck,jobdelay,petime,realchat,forceteam);
- }
- //------------------------------------------------------------------------------------------------------
- public GetVal(string[])
- {
- new tmp[32];
- new idx;
- tmp = strtok(string, idx);
- tmp = strtok(string, idx);
- RetVal = strval(tmp);
- strmid(string, string, 0, strlen(string)-1, 255);
- printf("%s",string);
- }
- public SaveRace(playerid,name[])
- {
- new coordsstring[256];
- new racename[64];
- new makername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, makername, sizeof(makername));
- format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%s,%s,%d,%d",
- RaceInfo[rStartx],
- RaceInfo[rStarty],
- RaceInfo[rStartz],
- RaceInfo[rMidx],
- RaceInfo[rMidy],
- RaceInfo[rMidz],
- RaceInfo[rMid2x],
- RaceInfo[rMid2y],
- RaceInfo[rMid2z],
- RaceInfo[rEndx],
- RaceInfo[rEndy],
- RaceInfo[rEndz],
- makername,
- "none",
- 0,
- RaceInfo[rLaps]);
- format(racename, sizeof(racename), "%s.race",name);
- new File: file2 = fopen(racename, io_write);
- fwrite(file2, coordsstring);
- fclose(file2);
- format(coordsstring, sizeof(coordsstring), "%s Race Saved",name);
- SendClientMessage(playerid, COLOR_GREEN,coordsstring);
- return 1;
- }
- public BestTime(name[])
- {
- print("BestTime");
- new coordsstring[256];
- new racename[64];
- format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%f,%s,%s,%d,%d",
- RaceInfo[rStartx],
- RaceInfo[rStarty],
- RaceInfo[rStartz],
- RaceInfo[rMidx],
- RaceInfo[rMidy],
- RaceInfo[rMidz],
- RaceInfo[rMid2x],
- RaceInfo[rMid2y],
- RaceInfo[rMid2z],
- RaceInfo[rEndx],
- RaceInfo[rEndy],
- RaceInfo[rEndz],
- RaceInfo[rName],
- RaceInfo[rBest],
- RaceInfo[rBestms],
- RaceInfo[rLaps]);
- format(racename, sizeof(racename), "%s.race",name);
- new File: file2 = fopen(racename, io_write);
- fwrite(file2, coordsstring);
- fclose(file2);
- return 1;
- }
- public LoadTmp()
- {
- new arrCoords[4][64];
- new strFromFile2[64];
- new File: file = fopen("tmppos.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(Teletmp))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- Teletmp[idx][pTmpposx] = floatstr(arrCoords[0]);
- Teletmp[idx][pTmpposy] = floatstr(arrCoords[1]);
- Teletmp[idx][pTmpposz] = floatstr(arrCoords[2]);
- Teletmp[idx][pTmpint] = strval(arrCoords[3]);
- idx++;
- }
- }
- fclose(file);
- return 1;
- }
- public LoadRace(playerid,name[])
- {
- if (gdebug >= 1){printf("DEBUG Loadrace(%d,%s)",playerid,name);}
- new arrCoords[16][64];
- new strFromFile2[256];
- new racename[64];
- strmid(CurrentRace, name, 0, strlen(name), 255);
- format(racename, sizeof(racename), "%s.race",name);
- new File: file = fopen(racename, io_read);
- if (file)
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- RaceInfo[rStartx] = floatstr(arrCoords[0]);
- RaceInfo[rStarty] = floatstr(arrCoords[1]);
- RaceInfo[rStartz] = floatstr(arrCoords[2]);
- RaceInfo[rMidx] = floatstr(arrCoords[3]);
- RaceInfo[rMidy] = floatstr(arrCoords[4]);
- RaceInfo[rMidz] = floatstr(arrCoords[5]);
- RaceInfo[rMid2x] = floatstr(arrCoords[6]);
- RaceInfo[rMid2y] = floatstr(arrCoords[7]);
- RaceInfo[rMid2z] = floatstr(arrCoords[8]);
- RaceInfo[rEndx] = floatstr(arrCoords[9]);
- RaceInfo[rEndy] = floatstr(arrCoords[10]);
- RaceInfo[rEndz] = floatstr(arrCoords[11]);
- strmid(RaceInfo[rName], arrCoords[12], 0, strlen(arrCoords[12]), 255);
- strmid(RaceInfo[rBest], arrCoords[13], 0, strlen(arrCoords[13]), 255);
- RaceInfo[rBestms] = strval(arrCoords[14]);
- RaceInfo[rLaps] = strval(arrCoords[15]);
- rsx = RaceInfo[rStartx];rsy = RaceInfo[rStarty];rsz =RaceInfo[rStartz];
- rmx = RaceInfo[rMidx];rmy = RaceInfo[rMidy];rmz = RaceInfo[rMidz];
- rm2x = RaceInfo[rMid2x];rm2y = RaceInfo[rMid2y];rm2z = RaceInfo[rMid2z];
- rex = RaceInfo[rEndx];rey = RaceInfo[rEndy];rez = RaceInfo[rEndz];
- fclose(file);
- format(strFromFile2, sizeof(strFromFile2), "| ZeroAS | {FFFFFF}Ucitavam event %s...",name);
- ConvertTicks(RaceInfo[rBestms]);
- SendClientMessage(playerid, COLOR_ORANGERED,strFromFile2);
- SendClientMessage(playerid, COLOR_ORANGERED, "| ZeroAS | {FFFFFF}Event je uspjesno ucitan!");
- SendClientMessage(playerid, COLOR_ORANGERED, " ");
- if(RaceInfo[rLaps] > 0)
- {
- format(strFromFile2, sizeof(strFromFile2), "Event | %s, Od : %s | Rekord: %s : %d:%d:%d | Krugova: %d",name,RaceInfo[rName],RaceInfo[rBest],cmins,csecs,cmils,RaceInfo[rLaps]);
- }
- else
- {
- format(strFromFile2, sizeof(strFromFile2), "Event | %s, Od : %s | Rekord: %s : %d:%d:%d",name,RaceInfo[rName],RaceInfo[rBest],cmins,csecs,cmils);
- }
- SendEnemyMessage(COLOR_WHITE, strFromFile2);
- randomrace = 0;
- }
- else
- {
- if(playerid != 255)
- {
- SendClientMessage(playerid, COLOR_GREEN,"File not found");
- }
- }
- return 1;
- }
- public LoadDM(playerid,name[])
- {
- new arrCoords[4][64];
- new strFromFile2[256];
- new dmname[64];
- format(dmname, sizeof(dmname), "%s.dm",name);
- new File: file = fopen(dmname, io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(gRandomDMSpawns))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- gRandomDMSpawns[idx][0] = floatstr(arrCoords[0]);
- gRandomDMSpawns[idx][1] = floatstr(arrCoords[1]);
- gRandomDMSpawns[idx][2] = floatstr(arrCoords[2]);
- idx++;
- }
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- gDMWbounds[0] = floatstr(arrCoords[0]);
- gDMWbounds[1] = floatstr(arrCoords[1]);
- gDMWbounds[2] = floatstr(arrCoords[2]);
- gDMWbounds[3] = floatstr(arrCoords[3]);
- fclose(file);
- format(strFromFile2, sizeof(strFromFile2), "Sljedeci DM | %s",name);
- SendClientMessageToAll(COLOR_GREEN, strFromFile2);
- }
- else
- {
- if(playerid != 255)
- {
- SendClientMessage(playerid, COLOR_GREEN,"File not found");
- }
- }
- return 1;
- }
- public SaveDM(playerid,name[])
- {
- new coordsstring[256];
- new racename[64];
- format(racename, sizeof(racename), "%s.dm",name);
- new File: file2 = fopen(racename, io_write);
- new idx;
- while (idx < sizeof(gRandomDMSpawns))
- {
- format(coordsstring, sizeof(coordsstring), "%f,%f,%f\n",gRandomDMSpawns[idx][0],gRandomDMSpawns[idx][1],gRandomDMSpawns[idx][2]);
- fwrite(file2, coordsstring);
- idx++;
- }
- format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f\n",gDMWbounds[0],gDMWbounds[1],gDMWbounds[2],gDMWbounds[3]);
- fwrite(file2, coordsstring);
- fclose(file2);
- format(coordsstring, sizeof(coordsstring), "%s DM Saved",name);
- SendClientMessage(playerid, COLOR_GREEN,coordsstring);
- return 1;
- }
- public LoadRaceList(playerid,name[])
- {
- new arrCoords[4][64];
- new strFromFile2[256];
- new dmname[64];
- format(dmname, sizeof(dmname), "%s.dm",name);
- new File: file = fopen(dmname, io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(gRandomDMSpawns))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- gRandomDMSpawns[idx][0] = floatstr(arrCoords[0]);
- gRandomDMSpawns[idx][1] = floatstr(arrCoords[1]);
- gRandomDMSpawns[idx][2] = floatstr(arrCoords[2]);
- idx++;
- }
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- gDMWbounds[0] = floatstr(arrCoords[0]);
- gDMWbounds[1] = floatstr(arrCoords[1]);
- gDMWbounds[2] = floatstr(arrCoords[2]);
- gDMWbounds[3] = floatstr(arrCoords[3]);
- fclose(file);
- format(strFromFile2, sizeof(strFromFile2), "Sljedeci DM | %s",name);
- SendClientMessageToAll(COLOR_GREEN, strFromFile2);
- }
- else
- {
- if(playerid != 255)
- {
- SendClientMessage(playerid, COLOR_GREEN,"File not found");
- }
- }
- return 1;
- }
- public SaveRaceList(playerid,name[])
- {
- new coordsstring[256];
- new racename[64];
- format(racename, sizeof(racename), "%s.dm",name);
- new File: file2 = fopen(racename, io_write);
- new idx;
- while (idx < sizeof(gRandomDMSpawns))
- {
- format(coordsstring, sizeof(coordsstring), "%f,%f,%f\n",gRandomDMSpawns[idx][0],gRandomDMSpawns[idx][1],gRandomDMSpawns[idx][2]);
- fwrite(file2, coordsstring);
- idx++;
- }
- format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f\n",gDMWbounds[0],gDMWbounds[1],gDMWbounds[2],gDMWbounds[3]);
- fwrite(file2, coordsstring);
- fclose(file2);
- format(coordsstring, sizeof(coordsstring), "%s DM Saved",name);
- SendClientMessage(playerid, COLOR_GREEN,coordsstring);
- return 1;
- }
- public LoadBizz()
- {
- new arrCoords[31][64];
- new strFromFile2[256];
- new File: file = fopen("bizz.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(BizzInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- BizzInfo[idx][bEntrancex] = floatstr(arrCoords[0]);
- BizzInfo[idx][bEntrancey] = floatstr(arrCoords[1]);
- BizzInfo[idx][bEntrancez] = floatstr(arrCoords[2]);
- BizzInfo[idx][bExitx] = floatstr(arrCoords[3]);
- BizzInfo[idx][bExity] = floatstr(arrCoords[4]);
- BizzInfo[idx][bExitz] = floatstr(arrCoords[5]);
- BizzInfo[idx][bHealthx] = strval(arrCoords[6]);
- BizzInfo[idx][bHealthy] = strval(arrCoords[7]);
- BizzInfo[idx][bHealthz] = strval(arrCoords[8]);
- BizzInfo[idx][bArmourx] = strval(arrCoords[9]);
- BizzInfo[idx][bArmoury] = strval(arrCoords[10]);
- BizzInfo[idx][bArmourz] = strval(arrCoords[11]);
- strmid(BizzInfo[idx][bOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
- strmid(BizzInfo[idx][bDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
- BizzInfo[idx][bValue] = strval(arrCoords[14]);
- BizzInfo[idx][bHel] = strval(arrCoords[15]);
- BizzInfo[idx][bArm] = strval(arrCoords[16]);
- BizzInfo[idx][bInt] = strval(arrCoords[17]);
- BizzInfo[idx][bLock] = strval(arrCoords[18]);
- BizzInfo[idx][bOwned] = strval(arrCoords[19]);
- BizzInfo[idx][bEntcost] = strval(arrCoords[20]);
- BizzInfo[idx][bTakings] = strval(arrCoords[21]);
- BizzInfo[idx][bDate] = strval(arrCoords[22]);
- BizzInfo[idx][bLevel] = strval(arrCoords[23]);
- BizzInfo[idx][bProd] = strval(arrCoords[24]);
- BizzInfo[idx][bProdCap] = strval(arrCoords[25]);
- BizzInfo[idx][bComp] = strval(arrCoords[26]);
- BizzInfo[idx][bCompCap] = strval(arrCoords[27]);
- BizzInfo[idx][bProdCost] = strval(arrCoords[28]);
- BizzInfo[idx][bPayComp] = strval(arrCoords[29]);
- BizzInfo[idx][bPriceMod] = strval(arrCoords[30]);
- printf("BizzInfo:%d [%s] Owner:%s Entfee:%d Takings:%d Products:%d/%d Komponente: %d/%d",
- idx,
- BizzInfo[idx][bDiscription],
- BizzInfo[idx][bOwner],
- BizzInfo[idx][bEntcost],
- BizzInfo[idx][bTakings],
- BizzInfo[idx][bProd],
- BizzInfo[idx][bProdCap],
- BizzInfo[idx][bComp],
- BizzInfo[idx][bCompCap]);
- idx++;
- }
- }
- fclose(file);
- return 1;
- }
- public LoadSBizz()
- {
- new arrCoords[21][64];
- new strFromFile2[256];
- new File: file = fopen("sbizz.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(SBizzInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- SBizzInfo[idx][sbEntrancex] = floatstr(arrCoords[0]);
- SBizzInfo[idx][sbEntrancey] = floatstr(arrCoords[1]);
- SBizzInfo[idx][sbEntrancez] = floatstr(arrCoords[2]);
- //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
- strmid(SBizzInfo[idx][sbOwner], arrCoords[3], 0, strlen(arrCoords[3]), 255);
- strmid(SBizzInfo[idx][sbDiscription], arrCoords[4], 0, strlen(arrCoords[4]), 255);
- SBizzInfo[idx][sbValue] = strval(arrCoords[5]);
- SBizzInfo[idx][sbHel] = strval(arrCoords[6]);
- SBizzInfo[idx][sbArm] = strval(arrCoords[7]);
- SBizzInfo[idx][sbInt] = strval(arrCoords[8]);
- SBizzInfo[idx][sbLock] = strval(arrCoords[9]);
- SBizzInfo[idx][sbOwned] = strval(arrCoords[10]);
- SBizzInfo[idx][sbEntcost] = strval(arrCoords[11]);
- SBizzInfo[idx][sbTakings] = strval(arrCoords[12]);
- SBizzInfo[idx][sbDate] = strval(arrCoords[13]);
- SBizzInfo[idx][sbLevel] = strval(arrCoords[14]);
- SBizzInfo[idx][sbProd] = strval(arrCoords[15]);
- SBizzInfo[idx][sbProdCap] = strval(arrCoords[16]);
- SBizzInfo[idx][sbComp] = strval(arrCoords[17]);
- SBizzInfo[idx][sbCompCap] = strval(arrCoords[18]);
- SBizzInfo[idx][sbProdCost] = strval(arrCoords[19]);
- SBizzInfo[idx][sbPayComp] = strval(arrCoords[20]);
- printf("SmallBizzInfo:%d [%s] Owner:%s Entfee:%d Takings:%d Products:%d/%d Komponente: %d/%d",
- idx,
- SBizzInfo[idx][sbDiscription],
- SBizzInfo[idx][sbOwner],
- SBizzInfo[idx][sbEntcost],
- SBizzInfo[idx][sbTakings],
- SBizzInfo[idx][sbProd],
- SBizzInfo[idx][sbProdCap],
- SBizzInfo[idx][sbComp],
- SBizzInfo[idx][sbCompCap]);
- idx++;
- }
- }
- fclose(file);
- return 1;
- }
- public LoadProperty()
- {
- new arrCoords[30][64];
- new strFromFile2[256];
- new File: file = fopen("property.cfg", io_read);
- if (file)
- {
- new idx;
- while (idx < sizeof(HouseInfo))
- {
- fread(file, strFromFile2);
- split(strFromFile2, arrCoords, ',');
- HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
- HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
- HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
- HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
- HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
- HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
- HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
- HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
- HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
- HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
- HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
- HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
- //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
- strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
- strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
- HouseInfo[idx][hValue] = strval(arrCoords[14]);
- HouseInfo[idx][hHel] = strval(arrCoords[15]);
- HouseInfo[idx][hArm] = strval(arrCoords[16]);
- HouseInfo[idx][hInt] = strval(arrCoords[17]);
- HouseInfo[idx][hLock] = strval(arrCoords[18]);
- HouseInfo[idx][hOwned] = strval(arrCoords[19]);
- HouseInfo[idx][hRooms] = strval(arrCoords[20]);
- HouseInfo[idx][hRent] = strval(arrCoords[21]);
- HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
- HouseInfo[idx][hTakings] = strval(arrCoords[23]);
- HouseInfo[idx][hVec] = strval(arrCoords[24]);
- if(HouseInfo[idx][hVec] == 457)
- {
- HouseInfo[idx][hVec] = 411;
- }
- HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
- HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
- HouseInfo[idx][hDate] = strval(arrCoords[27]);
- HouseInfo[idx][hLevel] = strval(arrCoords[28]);
- HouseInfo[idx][hWorld] = strval(arrCoords[29]);
- printf("HouseInfo:%d Owner:%s hTakings %d hVec %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings],HouseInfo[idx][hVec]);
- idx++;
- }
- }
- fclose(file);
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- new
- string1[128],
- Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
- new name[MAX_PLAYER_NAME], string[48];
- new coordsstring[256];
- new atext[20];
- if(PlayerInfo[playerid][pSex] == 1) { atext = "Musko"; }
- else if(PlayerInfo[playerid][pSex] == 2) { atext = "Zensko"; }
- new otext[20];
- if(PlayerInfo[playerid][pOrigin] == 1) { otext = "Los Santos"; }
- else if(PlayerInfo[playerid][pOrigin] == 2) { otext = "San Fierro"; }
- else if(PlayerInfo[playerid][pOrigin] == 3) { otext = "Las Venturas"; }
- else if(PlayerInfo[playerid][pOrigin] == 4) { otext = "Bone Country"; }
- new pnumber = PlayerInfo[playerid][pPnumber];
- GetPlayerName(clickedplayerid, name, sizeof(name));
- format(coordsstring, sizeof(coordsstring), "Nick: %s\nLevel: %i\nSpol: Musko\nPorijeklo: Los Santos\nKontakt: /pm %d", name,GetPlayerScore(clickedplayerid),atext,otext,clickedplayerid );
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Izvadak iz osobne", coordsstring, "U redu", "Odustani");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == fGPS)
- {
- if(response)
- {
- if(listitem == 0)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Hotel");
- SetPlayerCheckpoint(playerid,2218.8840,-1144.4600,25.7933,4.0);
- }
- if(listitem == 1)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Banku");
- SetPlayerCheckpoint(playerid,1462.8413,-1025.7767,23.8281,4.0);
- }
- if(listitem == 2)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Dolce Vitu");
- SetPlayerCheckpoint(playerid,1309.8711,-1372.2498,13.5990,4.0);
- }
- if(listitem == 3)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Burg");
- SetPlayerCheckpoint(playerid,1213.5930,-923.2630,42.9272,4.0);
- }
- if(listitem == 4)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Aero LS");
- SetPlayerCheckpoint(playerid,2025.7142,-2450.0518,13.5469,4.0);
- }
- if(listitem == 5)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Aero LV");
- SetPlayerCheckpoint(playerid,1506.2271,1248.9880,10.8125,4.0);
- }
- if(listitem == 6)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Aero SF");
- SetPlayerCheckpoint(playerid,-1226.1250,45.6150,14.1341,4.0);
- }
- if(listitem == 7)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Mount Chiliad");
- SetPlayerCheckpoint(playerid,-2345.8936,-1637.0587,483.7031,4.0);
- }
- if(listitem == 8)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Fallen Army");
- SetPlayerCheckpoint(playerid,1244.9535,-761.1959,92.7361,4.0);
- }
- if(listitem == 9)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Bistrik Mafia");
- SetPlayerCheckpoint(playerid,1307.9750,-2056.1040,58.0903,4.0);
- }
- if(listitem == 10)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Grove Mafia");
- SetPlayerCheckpoint(playerid,2415.9089,-1659.3311,13.3828,4.0);
- }
- if(listitem == 11)
- {
- GPSF(playerid,Fear,"GPS | Postavljen na Russian Mafia");
- SetPlayerCheckpoint(playerid,1638.5256,-1714.0114,19.7693,4.0);
- }
- }
- }
- if(dialogid == 14) // Oruzje
- {
- new string[400];
- if(response)
- {
- if(listitem == 0)
- {
- if(PlayerInfo[playerid][pCash] <= 39)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- GivePlayerWeapon(playerid, 4, 500); // Noz
- GivePlayerMoney(playerid, -40);
- format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- if(listitem == 1)
- {
- if(PlayerInfo[playerid][pCash] <= 49)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- GivePlayerWeapon(playerid, 46, 500); // padobran
- GivePlayerMoney(playerid, -50);
- format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- if(listitem == 2)
- {
- if(PlayerInfo[playerid][pCash] <= 79)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- GivePlayerWeapon(playerid, 22, 500); // 9mm
- GivePlayerMoney(playerid, -80);
- format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- if(listitem == 3)
- {
- if(PlayerInfo[playerid][pCash] <= 99)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- GivePlayerWeapon(playerid, 23, 500); // Priguseni 9mm
- GivePlayerMoney(playerid, -100);
- format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- if(listitem == 4)
- {
- if(PlayerInfo[playerid][pCash] <= 149)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- GivePlayerWeapon(playerid, 24, 500); //Desert Eagle
- GivePlayerMoney(playerid, -150);
- format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- if(listitem == 5)
- {
- if(PlayerInfo[playerid][pCash] <= 199)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- GivePlayerWeapon(playerid, 26, 500); //Sawn-off
- GivePlayerMoney(playerid, -200);
- format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- if(listitem == 6)
- {
- if(PlayerInfo[playerid][pCash] <= 249)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- GivePlayerWeapon(playerid, 29, 500); //MP5
- GivePlayerMoney(playerid, -250);
- format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- if(listitem == 7)
- {
- if(PlayerInfo[playerid][pCash] <= 399)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- GivePlayerWeapon(playerid, 30, 500); //AK-47
- GivePlayerMoney(playerid, -400);
- format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- if(listitem == 8)
- {
- if(PlayerInfo[playerid][pCash] <= 419)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- GivePlayerWeapon(playerid, 31, 500); //M4
- GivePlayerMoney(playerid, -420);
- format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- if(listitem == 9)
- {
- if(PlayerInfo[playerid][pCash] <= 449)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- GivePlayerWeapon(playerid, 32, 500); //Tec-9
- GivePlayerMoney(playerid, -450);
- format(string, sizeof(string), "**Zahvaljujemo na kupnji.Dodjite nam opet...", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- }
- return 1;
- }
- if(dialogid == 8) // CarUpgrade
- {
- new house = PlayerInfo[playerid][pPhousekey];
- new string[400];
- if(response)
- {
- if(listitem == 0) // Infernus
- {
- if(PlayerInfo[playerid][pCash] <= 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- HouseInfo[house][hVec] = 411;
- GivePlayerMoney(playerid, -350000);
- format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Infernus) za 350000$.", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- if(listitem == 1) // Turismo
- {
- if(PlayerInfo[playerid][pCash] <= 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GivePlayerMoney(playerid, -300000);
- HouseInfo[house][hVec] = 451;
- format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Turismo) za 300000$.", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- if(listitem == 2) // Elegy
- {
- if(PlayerInfo[playerid][pCash] <= 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GivePlayerMoney(playerid, -100000);
- HouseInfo[house][hVec] = 562;
- format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Elegy) za 100000$.", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- if(listitem == 3) // Jester
- {
- if(PlayerInfo[playerid][pCash] <= 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GivePlayerMoney(playerid, -200000);
- HouseInfo[house][hVec] = 559;
- format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Jester) za 200000$.", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- if(listitem == 4) // Sultan
- {
- if(PlayerInfo[playerid][pCash] <= 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GivePlayerMoney(playerid, -150000);
- HouseInfo[house][hVec] = 560;
- format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Sultan) za 150000$.", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- if(listitem == 5) // Monster
- {
- if(PlayerInfo[playerid][pCash] <= 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GivePlayerMoney(playerid, -400000);
- HouseInfo[house][hVec] = 444;
- format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Monster) za 400000$.", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- if(listitem == 6) // Hotring racer
- {
- if(PlayerInfo[playerid][pCash] <= 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate dovoljno novaca!");
- return 1;
- }
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- GivePlayerMoney(playerid, -450000);
- HouseInfo[house][hVec] = 502;
- format(string, sizeof(string), "CroHerze: Kupili ste kucno vozilo (Hotring Racer) za 450000$.", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- }
- return 1;
- }
- if(dialogid == 155) // Donator
- {
- new string[400];
- if(response)
- {
- if(listitem == 0) // ExpPoen
- {
- if(PlayerInfo[playerid][pCHBodovi] <= 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate CroHerze Bodove!");
- return 1;
- }
- PlayerInfo[playerid][pCHBodovi] = PlayerInfo[playerid][pCHBodovi]-1;
- PlayerInfo[playerid][pExp]= PlayerInfo[playerid][pExp]+2;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Donator: Zamijenio si 1 CH Bod za 2 Exp boda, imas jos %d CroHerze Bodova", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- if(listitem == 1) // 1000000$
- {
- if(PlayerInfo[playerid][pCHBodovi] <= 3)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate CroHerze Bodove!");
- return 1;
- }
- PlayerInfo[playerid][pCHBodovi] = PlayerInfo[playerid][pCHBodovi]-4;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Donator: Zamijenio si 4 CH Boda za $1000000 ingame, imas jos %d CroHerze Bodova", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- if(listitem == 2) // Micanje warna
- {
- if(PlayerInfo[playerid][pCHBodovi] < 19)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate CroHerze Bodove!");
- return 1;
- }
- PlayerInfo[playerid][pWarns] = PlayerInfo[playerid][pWarns]-1;
- PlayerInfo[playerid][pCHBodovi] = PlayerInfo[playerid][pCHBodovi]-20;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Donator: Maknuo si warn za 20 CH Bodova, imas jos %d CroHerze Bodova", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- if(listitem == 3) // SpawnHealth
- {
- if(PlayerInfo[playerid][pCHBodovi] <= 4)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate CroHerze Bodove!");
- return 1;
- }
- PlayerInfo[playerid][pCHBodovi] = PlayerInfo[playerid][pCHBodovi]-5;
- PlayerInfo[playerid][pSHealth] = PlayerInfo[playerid][pSHealth]+100;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Donator: Zamijenio si 5 CH Boda za 150 SpawnHealta, imas jos %d CroHerze Bodova", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- if(listitem == 4) // LevelUp
- {
- if(PlayerInfo[playerid][pCHBodovi] <= 9)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Nemate CroHerze Bodove!");
- return 1;
- }
- PlayerInfo[playerid][pCHBodovi] = PlayerInfo[playerid][pCHBodovi]-10;
- PlayerInfo[playerid][pLevel]++;
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- format(string, sizeof(string), "Donator: Zamijenio si 10 CH Bodova za Level UP, imas jos %d CroHerze Bodova", PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- }
- }
- return 1;
- }
- if(dialogid == dialogv && response == 1)
- {
- switch(listitem)
- {
- case 0:
- {
- if(openclose[playerid] == false)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
- openclose[playerid] = true;
- }
- else if(openclose[playerid] == true)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
- openclose[playerid] = false;
- }
- }
- case 1:
- {
- if(openclose1[playerid] == false)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
- openclose1[playerid] = true;
- }
- else if(openclose1[playerid] == true)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,VEHICLE_PARAMS_OFF,doors,bonnet,boot,objective);
- openclose1[playerid] = false;
- }
- }
- case 2:
- {
- if(openclose2[playerid] == false)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,VEHICLE_PARAMS_ON);
- openclose2[playerid] = true;
- }
- else if(openclose2[playerid] == true)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,VEHICLE_PARAMS_OFF);
- openclose2[playerid] = false;
- }
- }
- case 3:
- {
- if(openclose3[playerid] == false)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
- openclose3[playerid] = true;
- }
- else if(openclose3[playerid] == true)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
- openclose3[playerid] = false;
- }
- }
- case 4:
- {
- if(openclose4[playerid] == false)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
- openclose4[playerid] = true;
- }
- else if(openclose4[playerid] == true)
- {
- new vid = GetPlayerVehicleID(playerid);
- GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
- SetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
- openclose4[playerid] = false;
- }
- }
- }
- }
- new sendername[MAX_PLAYER_NAME];
- new string[128];
- if(response)
- {
- if(dialogid == 12346 || dialogid == 12347)
- {
- if(strlen(inputtext))
- {
- new tmppass[64];
- strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
- Encript(tmppass);
- OnPlayerLogin(playerid,tmppass);
- }
- else
- {
- new loginstring[400];
- new loginname[64];
- GetPlayerName(playerid,loginname,sizeof(loginname));
- format(loginstring,sizeof(loginstring),"{33BBFF}___________________________________________\n{F81414}[Greska] {FFFF22}Unijeli ste pogresnu lozinku\n\n{33BBFF}%s\n{FFFFFF}Tvoj korisnicki racun je pronadjen!\n\nMolimo upisi svoju lozinku da udjes na server:\n{33BBFF}___________________________________________",loginname);
- ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{FFFFFF}Logiranje",loginstring,"Logiraj","Odustani");
- gPlayerLogTries[playerid] += 1;
- if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
- }
- }
- if(dialogid == 12345)
- {
- if(strlen(inputtext))
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "%s.ini", sendername);
- new File: hFile = fopen(string, io_read);
- if (hFile)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Ime je vec registrirano, molimo izaberite neko drugo.");
- fclose(hFile);
- return 1;
- }
- new tmppass[64];
- strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
- Encript(tmppass);
- OnPlayerRegister(playerid,tmppass);
- }
- else
- {
- new regstring[400];
- new regname[64];
- GetPlayerName(playerid,regname,sizeof(regname));
- format(regstring,sizeof(regstring),"{FFFFFF}Dobrodosli na pocetak registracije \n{33BBFF}%s\n{FFFFFF}Vas racun nije registriran, molimo upisite zeljenu lozinku:",regname);
- ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"{33BBFF}Registracija",regstring,"Registriraj","Odustani");
- gPlayerLogTries[playerid] += 1;
- }
- }
- }
- return 1;
- }
- public SetPlayerUnMute()
- {
- foreach(Player, i)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMuted] > 0)
- {
- if(PlayerInfo[i][pMuteTime] > 0)
- {
- PlayerInfo[i][pMuteTime]--;
- }
- if(PlayerInfo[i][pMuteTime] <= 0)
- {
- PlayerInfo[i][pMuteTime] = 0;
- if(PlayerInfo[i][pMuted] == 1)
- {
- PlayerInfo[i][pMuted] = 0;
- }
- PlayerInfo[i][pMuted] = 0;
- new string[128];
- new sendername[MAX_PLAYER_NAME];
- new playerid;
- format(string, sizeof(string), " ", sendername);
- if (PlayerInfo[playerid][pAdmin] >= 1339)
- SendAdminMessage(COLOR_YELLOW, string);
- }
- }
- }
- }
- }
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid])
- {
- new string3[64];
- new playername3[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername3, sizeof(playername3));
- format(string3, sizeof(string3), "%s.ini", playername3);
- new File: hFile = fopen(string3, io_write);
- if (hFile)
- {
- new var[64];
- format(var, 64, "MuteTime=%d\n",PlayerInfo[playerid][pMuteTime]);fwrite(hFile, var);
- format(var, 32, "CHBodovi=%d\n",PlayerInfo[playerid][pCHBodovi]);fwrite(hFile, var);
- format(var, 32, "GameSageLevel=%d\n",PlayerInfo[playerid][pGameSage]);fwrite(hFile, var);
- fclose(hFile);
- }
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- public OnGameModeInit()
- {
- FA = GangZoneCreate(1186.889526, -871.864624, 1354.889526, -727.864624);
- GM = GangZoneCreate(2421.055664, -1743.055541, 2557.055664, -1623.055541);
- BM = GangZoneCreate(1077.398559, -2088.943847, 1285.398559, -1992.943725);
- RUS = GangZoneCreate(1581.190795, -1750.591552, 1717.190795, -1582.591552);
- BMK = CreateDynamicObject(980, 1282.37890625, -2056.4560546875, 60.626445770264, 0, 0, 270);
- RMK = CreateDynamicObject(971, 1642.8533935547, -1714.8718261719, 22.73189163208, 0, 0, 270.25);
- GMK = CreateDynamicObject(980, 2443.83984375, -1658.8203125, 15.085716247559, 0, 0, 90);
- FAK = CreateDynamicObject(980, 1244.9997558594, -757.40399169922, 94.96736907959, 0, 0, 14);
- unmutetimer = SetTimer("SetPlayerUnMute", 1000, 1);
- LoadConfig();
- LoadTmp();
- LoadProperty();
- LoadBizz();
- LoadSBizz();
- //PlayerHaul[78][pLoad] = 10000;
- PlayerHaul[105][pCapasity] = 10;
- //PlayerHaul[79][pLoad] = 10000;
- PlayerHaul[106][pCapasity] = 10;
- //PlayerHaul[80][pLoad] = 10000;
- PlayerHaul[107][pCapasity] = 10;
- //PlayerHaul[81][pLoad] = 10000;
- PlayerHaul[108][pCapasity] = 10;
- SetGameModeText("CHDM 1.1.1 R1: Good old times");
- format(objstore, sizeof(objstore), "MOLE: nemam nista za tebe, probaj kasnije.");
- format(cbjstore, sizeof(cbjstore), "HQ: There is Nothing in Your Vicinity, Out.");
- gettime(ghour, gminute, gsecond);
- GodTimer = SetTimer("InfiniteLife",50,1);
- FixHour(ghour);
- ghour = shifthour;
- if(!realtime)
- {
- SetWorldTime(wtime);
- }
- ShowPlayerMarkers(1);
- ShowNameTags(1);
- // Player Class's
- for(new i = 0; i <= sizeof(Peds)-1; i++)
- {
- AddPlayerClass(101,2231.7495,-1178.9769,29.8044,0.6867,0,0,0,0,0,0); // SPAWN
- }
- for(new h = 0; h < sizeof(HouseInfo); h++)
- {
- if (gdebug >= 1){printf("HouseInfo[%d][hVec] %d",h,HouseInfo[h][hVec]);}
- CreateVehicle(HouseInfo[h][hVec], HouseCarSpawns[h][0], HouseCarSpawns[h][1], HouseCarSpawns[h][2], HouseCarSpawns[h][3], HouseInfo[h][hVcol1], HouseInfo[h][hVcol2], 10000);
- gCarLock[h+1] = 1;
- }//34
- /*--------------------|Obijekti|--------------------*/
- /*--------------------|Spawn|--------------------*/
- CreateDynamicObject(966,2225.25317383,-1145.25439453,24.79896355,0.00000000,0.00000000,342.00000000); //rampa (1)
- CreateDynamicObject(968,2225.03759766,-1145.16601562,25.79896355,0.00000000,0.00000000,352.00000000); //rampa (2)
- CreateDynamicObject(1215,993.74682617,-915.90081787,41.74401093,0.00000000,0.00000000,0.00000000); //object(bollardlight) (1)
- CreateDynamicObject(1215,993.39166260,-918.53057861,41.74401093,0.00000000,0.00000000,0.00000000); //object(bollardlight) (2)
- CreateDynamicObject(1215,2232.65014648,-1123.61523438,38.10374832,0.00000000,0.00000000,0.00000000); //object(bollardlight) (3)
- CreateDynamicObject(1215,2214.23510742,-1147.68505859,25.32724953,0.00000000,0.00000000,0.00000000); //object(bollardlight) (4)
- CreateDynamicObject(1215,2230.54150391,-1149.76562500,25.43802261,0.00000000,0.00000000,0.00000000); //object(bollardlight) (5)
- CreateDynamicObject(1215,2208.31030273,-1150.31164551,33.80651093,0.00000000,0.00000000,0.00000000); //object(bollardlight) (6)
- CreateDynamicObject(1215,2214.19726562,-1145.32128906,25.34948349,0.00000000,0.00000000,0.00000000); //object(bollardlight) (7)
- CreateDynamicObject(1215,2208.31616211,-1138.89086914,33.80651093,0.00000000,0.00000000,0.00000000); //object(bollardlight) (8)
- CreateDynamicObject(1215,2233.71972656,-1150.25024414,25.43986320,0.00000000,0.00000000,0.00000000); //object(bollardlight) (9)
- CreateDynamicObject(982,2237.94848633,-1148.84240723,25.48442841,0.00000000,0.00000000,74.00000000); //object(fenceshit) (1)
- CreateDynamicObject(982,2206.64794922,-1138.72692871,25.50610352,0.00000000,0.00000000,69.99389648); //object(fenceshit) (2)
- CreateDynamicObject(2773,2215.29394531,-1147.54467773,25.28461647,0.00000000,0.00000000,94.00000000); //object(cj_airprt_bar) (12)
- CreateDynamicObject(2773,2215.19897461,-1145.27258301,25.30220413,0.00000000,0.00000000,93.99902344); //object(cj_airprt_bar) (13)
- /*--------------------|Dolca|--------------------*/
- CreateDynamicObject(14537, 1296.775391, -1431.326172, 27.508877, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1318.139404, -1423.284790, 26.757189, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1322.418091, -1423.302734, 26.762724, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1313.888062, -1423.287231, 26.755972, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1309.622925, -1423.291504, 26.752636, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1305.357666, -1423.299438, 26.752958, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1301.092285, -1423.311523, 26.750967, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1296.806030, -1423.302979, 26.748644, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1292.536377, -1423.296265, 26.748150, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1288.264771, -1423.300781, 26.746767, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1283.997192, -1423.316772, 26.744482, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1279.715576, -1423.317017, 26.745405, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1275.395630, -1423.322510, 26.743942, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1271.076050, -1423.301147, 26.744604, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1266.792114, -1423.304443, 26.741350, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1262.492798, -1423.281738, 26.738161, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1325.062378, -1424.669922, 26.597929, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(1520, 1301.388428, -1430.541870, 26.737856, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1520, 1301.305176, -1433.914185, 26.737856, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1520, 1296.792358, -1426.977173, 26.737856, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1544, 1302.031128, -1431.156006, 26.674551, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1544, 1301.200317, -1429.172241, 26.674551, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1544, 1298.980713, -1426.955688, 26.674551, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1544, 1300.223511, -1426.937378, 26.674551, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1544, 1301.199463, -1427.623657, 26.674551, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1544, 1299.643433, -1435.747314, 26.674551, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1664, 1300.442017, -1435.719849, 26.845430, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1664, 1292.118164, -1434.544434, 26.845430, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1664, 1294.122925, -1435.853882, 26.845430, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1667, 1292.424805, -1435.497437, 26.767305, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1667, 1292.536011, -1433.374634, 26.767305, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1667, 1292.697998, -1432.486328, 26.767305, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1669, 1292.528076, -1427.247314, 26.845430, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1669, 1293.786133, -1426.875732, 26.845430, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1669, 1292.229004, -1429.477539, 26.845430, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1951, 1291.875244, -1432.339844, 26.866894, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1951, 1291.494873, -1431.030396, 26.866894, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1951, 1292.151489, -1430.709839, 26.866894, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1951, 1292.427124, -1428.704712, 26.866894, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1951, 1292.221436, -1428.464600, 26.866894, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1951, 1296.061768, -1426.753540, 26.866894, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1951, 1296.357422, -1425.999512, 26.866894, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1951, 1301.303467, -1428.077393, 26.866894, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1951, 1301.255737, -1434.992310, 26.866894, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1951, 1297.576660, -1436.039795, 26.866894, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1487, 1296.860107, -1436.586060, 26.876181, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1487, 1297.426636, -1436.424316, 26.876181, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1487, 1294.887085, -1435.796387, 26.876181, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1487, 1292.898315, -1435.586792, 26.876181, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1291.044189, -1428.879272, 25.763081, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1291.389893, -1434.067383, 25.344229, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1293.982788, -1425.335815, 26.042379, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1291.432983, -1426.625732, 25.940344, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1299.031860, -1425.343384, 26.043020, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1296.611328, -1424.597290, 26.101084, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1302.713013, -1428.723267, 25.769770, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1302.507690, -1426.756958, 25.932737, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1301.800659, -1425.381592, 26.040697, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1302.640137, -1433.433105, 25.397165, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1300.052124, -1436.793945, 25.130657, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1302.476440, -1435.947144, 25.198240, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1294.541992, -1436.588135, 25.145594, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1297.113892, -1437.181763, 25.099262, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1291.794678, -1436.164795, 25.178413, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1716, 1290.655518, -1431.192139, 25.581148, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(12950, 1320.354126, -1368.116333, 14.484624, 0.0000, 0.0000, 90.0000);
- CreateDynamicObject(1692, 1325.227783, -1359.070068, 35.491604, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(1692, 1295.761841, -1358.927368, 35.484970, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(1649, 1312.340088, -1366.440918, 14.524384, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1649, 1307.998779, -1366.480469, 14.529383, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1309.583374, -1432.520874, 25.941616, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1313.495728, -1427.866211, 26.310799, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1307.061279, -1426.114258, 26.454973, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1317.555664, -1433.174927, 25.891821, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1319.686768, -1426.685425, 26.405720, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1321.847168, -1431.994629, 25.986252, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1286.817749, -1426.967407, 26.382936, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1285.915527, -1433.688110, 25.843475, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1278.653931, -1433.158447, 25.894201, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1278.464355, -1426.490723, 26.418367, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1271.978638, -1427.678223, 26.323423, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1266.782227, -1431.635010, 26.011066, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1273.136963, -1434.405396, 25.794823, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1265.760376, -1425.582642, 26.486652, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(643, 1282.508423, -1429.961426, 26.146496, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1364, 1294.956055, -1367.877808, 13.377698, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1364, 1325.206787, -1367.921631, 13.392337, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(3806, 1288.747192, -1367.696167, 17.344603, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(3806, 1330.984375, -1367.671997, 17.563906, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(3806, 1309.918335, -1364.980469, 15.157018, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(624, 1329.079834, -1382.637207, 12.970345, 0.0000, 0.0000, 292.5000);
- CreateDynamicObject(624, 1321.418701, -1383.020752, 12.974278, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(624, 1298.916748, -1383.567505, 12.848860, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(624, 1291.108643, -1383.110962, 12.848859, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(994, 1313.014404, -1384.856689, 12.877880, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(994, 1301.056030, -1384.906128, 12.880520, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(3850, 1309.499023, -1369.695190, 18.502922, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(3850, 1310.385986, -1365.239624, 13.050342, 0.0000, 0.0000, 281.2500);
- CreateDynamicObject(3850, 1306.499634, -1368.465088, 18.444965, 0.0000, 0.0000, 225.0000);
- CreateDynamicObject(3850, 1303.544067, -1367.271973, 18.406551, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(3850, 1312.983398, -1369.361816, 18.495602, 0.0000, 0.0000, 101.2500);
- CreateDynamicObject(626, 1305.901245, -1364.552002, 19.909237, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(626, 1315.086914, -1364.690308, 19.883617, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1260.166260, -1425.276367, 26.590372, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(970, 1260.217041, -1429.489136, 26.259205, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(970, 1260.245483, -1433.703979, 25.927828, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(970, 1261.405884, -1437.461304, 25.642546, 0.0000, 0.0000, 303.7500);
- CreateDynamicObject(970, 1264.729248, -1438.987061, 25.503725, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1268.935303, -1438.978882, 25.503725, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1273.134155, -1438.969482, 25.503725, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1277.326660, -1438.962280, 25.505156, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1281.533325, -1438.958496, 25.508463, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1285.749268, -1438.948242, 25.508327, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1289.933594, -1438.957886, 25.508589, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1294.116455, -1438.934692, 25.511452, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1298.328003, -1438.927490, 25.513048, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1302.516968, -1438.938110, 25.513239, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1306.705811, -1438.935669, 25.514456, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1325.146484, -1428.884399, 26.268589, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(970, 1325.155273, -1432.933960, 25.989803, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(970, 1324.406738, -1437.010498, 25.671078, 0.0000, 0.0000, 247.5000);
- CreateDynamicObject(970, 1317.336060, -1438.948730, 25.516029, 0.0000, 0.0000, 180.0000);
- CreateDynamicObject(970, 1315.111816, -1438.557007, 25.564278, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(626, 1288.425293, -1367.974854, 14.610727, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(626, 1332.149536, -1368.199097, 14.656949, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1240, 1178.172363, -1323.481201, 13.305486, 0.0000, 0.0000, 270.0000);
- CreateDynamicObject(5822, 1313.186523, -1442.543823, 19.644150, 0.0000, 0.0000, 135.0000);
- CreateDynamicObject(1470, 1309.830811, -1439.576050, 24.525509, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1470, 1311.344727, -1439.849121, 24.503777, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1470, 1312.849121, -1439.851318, 24.509308, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(626, 1324.910034, -1438.014038, 27.088932, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(626, 1260.966431, -1438.205444, 27.071213, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(626, 1261.001831, -1417.967163, 16.067995, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(626, 1326.886230, -1418.127686, 16.073830, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(626, 1302.915161, -1418.085083, 15.796134, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(626, 1290.706909, -1418.024902, 16.048771, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1470, 1314.338135, -1439.851318, 24.515383, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1312.875488, -1440.669434, 25.477167, 0.0000, 0.0000, 180.0000);
- CreateDynamicObject(626, 1324.708618, -1424.134155, 28.186905, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(970, 1321.540039, -1438.948120, 25.517107, 0.0000, 0.0000, 180.0000);
- CreateDynamicObject(1215, 1329.223999, -1366.669067, 13.986814, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1215, 1321.438599, -1366.672607, 13.938190, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1215, 1291.056519, -1366.683350, 13.970352, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1215, 1298.895508, -1366.726685, 13.958691, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1215, 1260.410034, -1416.368286, 13.185888, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1215, 1327.002197, -1416.266968, 13.196059, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1215, 1303.513062, -1366.601440, 18.424965, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1215, 1316.674438, -1366.729736, 18.433443, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1215, 1290.494141, -1416.421875, 12.991890, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1215, 1302.662231, -1416.466919, 13.082034, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(14804, 1102.196045, -1097.722168, 25.882725, 0.0000, 0.0000, 348.7500);
- CreateDynamicObject(14804, 1102.201050, -1104.664673, 25.868715, 0.0000, 0.0000, 258.7500);
- CreateDynamicObject(801, 1097.881226, -1105.162842, 24.381977, 0.0000, 0.0000, 123.7499);
- CreateDynamicObject(869, 1291.067383, -1373.602173, 13.934197, 0.0000, 0.0000, 258.7500);
- CreateDynamicObject(869, 1291.120850, -1377.036865, 13.934197, 0.0000, 0.0000, 258.7500);
- CreateDynamicObject(869, 1291.037476, -1380.472534, 13.934197, 0.0000, 0.0000, 258.7500);
- CreateDynamicObject(869, 1290.831787, -1382.804199, 13.934197, 0.0000, 0.0000, 258.7500);
- CreateDynamicObject(869, 1329.233521, -1383.156128, 14.061006, 0.0000, 0.0000, 258.7500);
- CreateDynamicObject(869, 1329.193726, -1380.287354, 14.031581, 0.0000, 0.0000, 258.7500);
- CreateDynamicObject(869, 1329.403076, -1377.549316, 14.003500, 0.0000, 0.0000, 258.7500);
- CreateDynamicObject(869, 1329.336182, -1374.268066, 14.209698, 0.0000, 0.0000, 258.7500);
- CreateDynamicObject(1232, 1093.841187, -1097.805786, 26.835865, 0.0000, 0.0000, 0.0000);
- CreateDynamicObject(1232, 1093.629395, -1104.817261, 26.492481, 0.0000, 0.0000, 0.0000);
- /*--------------------|Bistrik Mafia|--------------------*/
- CreateDynamicObject(3749, 1284.3889160156, -2056.4833984375, 63.639297485352, 0, 0, 270);
- CreateDynamicObject(7191, 1260.9556884766, -2065.5581054688, 60.221687316895, 0, 0, 268.5);
- CreateDynamicObject(7191, 1260.955078125, -2065.5576171875, 64.171684265137, 0, 0, 268.49487304688);
- CreateDynamicObject(7921, 1238.9625244141, -2066.9716796875, 60.380867004395, 0, 0, 179.99993896484);
- CreateDynamicObject(7921, 1238.9676513672, -2067.8000488281, 60.380867004395, 0, 0, 179.99450683594);
- CreateDynamicObject(7921, 1238.955078125, -2070.4772949219, 60.380867004395, 0, 0, 359.99450683594);
- CreateDynamicObject(7921, 1238.9619140625, -2066.9716796875, 63.055862426758, 0, 0, 179.99450683594);
- CreateDynamicObject(7921, 1238.9619140625, -2066.9716796875, 65.205902099609, 0, 0, 179.99450683594);
- CreateDynamicObject(7921, 1238.966796875, -2067.7998046875, 63.055847167969, 0, 0, 179.99450683594);
- CreateDynamicObject(7921, 1238.966796875, -2067.7998046875, 65.205810546875, 0, 0, 179.99450683594);
- CreateDynamicObject(7921, 1238.955078125, -2070.4765625, 63.055862426758, 0, 0, 359.98901367188);
- CreateDynamicObject(7921, 1238.955078125, -2070.4765625, 65.20588684082, 0, 0, 359.98901367188);
- CreateDynamicObject(8659, 1225.7421875, -2071.8032226563, 65.139984130859, 1.8793334960938, 20.01123046875, 359.56573486328);
- CreateDynamicObject(8659, 1225.7465820313, -2071.8525390625, 67.114967346191, 1.878662109375, 20.006103515625, 359.31335449219);
- CreateDynamicObject(8659, 1225.7524414063, -2071.90234375, 69.064933776855, 1.878662109375, 20.006103515625, 359.31335449219);
- CreateDynamicObject(8659, 1225.8129882813, -2071.9565429688, 70.689895629883, 1.878662109375, 20.006103515625, 359.31335449219);
- CreateDynamicObject(7191, 1190.2268066406, -2072.0144042969, 69.92163848877, 0, 0, 270.49487304688);
- CreateDynamicObject(8659, 1208.3811035156, -2072.0788574219, 62.414924621582, 359.82958984375, 287.99920654297, 0.02337646484375);
- CreateDynamicObject(8659, 1208.3469238281, -2071.845703125, 62.414924621582, 359.82421875, 287.99560546875, 0.02197265625);
- CreateDynamicObject(7191, 1190.2265625, -2072.013671875, 73.846603393555, 0, 0, 270.49438476563);
- CreateDynamicObject(7191, 1160.0407714844, -2072.2705078125, 69.92163848877, 0, 0, 270.49438476563);
- CreateDynamicObject(987, 1136.8811035156, -2084.0861816406, 67.983177185059, 0, 0, 88);
- CreateDynamicObject(7191, 1160.0400390625, -2072.2705078125, 73.821586608887, 0, 0, 270.49438476563);
- CreateDynamicObject(987, 1136.880859375, -2084.0859375, 69.93318939209, 0, 0, 87.994995117188);
- CreateDynamicObject(987, 1125.0308837891, -2083.8999023438, 68.244400024414, 0, 0, 0);
- CreateDynamicObject(987, 1113.2644042969, -2083.8444824219, 68.244400024414, 0, 0, 0);
- CreateDynamicObject(987, 1103.736328125, -2083.8391113281, 68.244400024414, 0, 0, 0);
- CreateDynamicObject(987, 1103.8818359375, -2072.0541992188, 68.244400024414, 0, 0, 269.99996948242);
- CreateDynamicObject(987, 1103.859375, -2060.1025390625, 68.244400024414, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 1103.8575439453, -2050.15234375, 68.244400024414, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 1091.8402099609, -2049.7114257813, 68.244400024414, 0, 0, 357.99450683594);
- CreateDynamicObject(987, 1093.5535888672, -2037.9643554688, 68.244400024414, 0, 0, 261.98950195313);
- CreateDynamicObject(987, 1125.0302734375, -2083.8994140625, 69.919395446777, 0, 0, 0);
- CreateDynamicObject(987, 1113.2398681641, -2083.8361816406, 69.894409179688, 0, 0, 0);
- CreateDynamicObject(987, 1103.736328125, -2083.8388671875, 69.894393920898, 0, 0, 0);
- CreateDynamicObject(7191, 1284.1032714844, -2025.5002441406, 59.762916564941, 0, 0, 179.99993896484);
- CreateDynamicObject(7191, 1284.1025390625, -2025.5, 63.637908935547, 0, 0, 179.99450683594);
- CreateDynamicObject(7191, 1261.5434570313, -2002.6508789063, 59.746704101563, 0, 0, 269.74487304688);
- CreateDynamicObject(7191, 1261.54296875, -2002.650390625, 63.746673583984, 0, 0, 269.74182128906);
- CreateDynamicObject(8657, 1224.7266845703, -2002.7730712891, 66.496231079102, 338, 0, 270.75);
- CreateDynamicObject(8657, 1224.7265625, -2002.7724609375, 68.746231079102, 337.99987792969, 0, 270.7470703125);
- CreateDynamicObject(8657, 1224.7265625, -2002.7724609375, 71.221244812012, 337.99987792969, 0, 270.7470703125);
- CreateDynamicObject(8657, 1239.7241210938, -2002.5634765625, 51.04621887207, 270, 180.69635009766, 91.443389892578);
- CreateDynamicObject(8657, 1211.0941162109, -2002.9711914063, 62.77124786377, 270, 180.69213867188, 91.439208984375);
- CreateDynamicObject(8657, 1213.443359375, -2002.9429931641, 62.77124786377, 270, 180.69213867188, 91.439208984375);
- CreateDynamicObject(7191, 1188.0712890625, -2002.9348144531, 69.92163848877, 0, 0, 269.99438476563);
- CreateDynamicObject(7191, 1188.0712890625, -2002.9345703125, 73.846618652344, 0, 0, 269.98901367188);
- CreateDynamicObject(7191, 1159.9739990234, -2002.9268798828, 69.92163848877, 0, 0, 269.98901367188);
- CreateDynamicObject(7191, 1159.9736328125, -2002.9267578125, 73.92163848877, 0, 0, 269.98901367188);
- CreateDynamicObject(987, 1137.1965332031, -2002.5064697266, 68.0078125, 0, 0, 88);
- CreateDynamicObject(987, 1137.1962890625, -2002.505859375, 70.082801818848, 0, 0, 87.994995117188);
- CreateDynamicObject(987, 1137.6632080078, -1990.6257324219, 66.607788085938, 0, 0, 179.99499511719);
- CreateDynamicObject(987, 1125.6912841797, -1990.6174316406, 66.607727050781, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1113.7397460938, -1990.6020507813, 66.932838439941, 0, 0, 207.99450683594);
- CreateDynamicObject(987, 1137.6630859375, -1990.625, 70.082786560059, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1125.6904296875, -1990.6171875, 70.107711791992, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1113.7392578125, -1990.6015625, 70.107894897461, 0, 0, 207.9931640625);
- CreateDynamicObject(987, 1103.3458251953, -1996.0748291016, 67.603942871094, 0, 0, 269.99996948242);
- CreateDynamicObject(987, 1103.3389892578, -2008.0454101563, 67.603942871094, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 1103.3626708984, -2012.5201416016, 67.603942871094, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 1103.4868164063, -2024.4993896484, 67.603942871094, 0, 2, 179.49450683594);
- CreateDynamicObject(987, 1091.5026855469, -2024.3101806641, 66.978950500488, 0, 1.99951171875, 279.48913574219);
- CreateDynamicObject(3279, 1279.5010986328, -2011.7744140625, 57.884014129639, 0, 0, 272);
- CreateDynamicObject(3279, 1277.5090332031, -2043.7094726563, 57.884014129639, 0, 0, 178.49951171875);
- CreateDynamicObject(3279, 1210.5440673828, -2065.6467285156, 68.000610351563, 0, 0, 85.999938964844);
- CreateDynamicObject(3279, 1202.9331054688, -2007.3864746094, 68.000610351563, 0, 0, 270.25);
- CreateDynamicObject(16644, 1278.6148681641, -2026.3967285156, 73.571960449219, 0, 0, 88);
- CreateDynamicObject(16644, 1278.2943115234, -2035.3323974609, 73.571960449219, 0, 0, 87.994995117188);
- /*--------------------|Russian Mafia|--------------------*/
- CreateDynamicObject(987, 1663.5405273438, -1723.1560058594, 19.50937461853, 0, 0, 0);
- CreateDynamicObject(987, 1651.6092529297, -1723.1442871094, 19.50937461853, 0, 0, 0);
- CreateDynamicObject(987, 1642.8415527344, -1723.1639404297, 19.50937461853, 0, 0, 0);
- CreateDynamicObject(987, 1675.2744140625, -1723.2337646484, 19.484375, 0, 0, 90);
- CreateDynamicObject(987, 1675.28125, -1711.3471679688, 19.484375, 0, 0, 90);
- CreateDynamicObject(987, 1675.2279052734, -1703.8571777344, 19.484375, 0, 0, 90);
- CreateDynamicObject(987, 1674.8143310547, -1693.9533691406, 19.184341430664, 0, 0, 90);
- CreateDynamicObject(987, 1674.8771972656, -1681.9615478516, 19.15096282959, 0, 0, 0);
- CreateDynamicObject(987, 1686.7823486328, -1681.8074951172, 19.15096282959, 0, 0, 2);
- CreateDynamicObject(987, 1698.6909179688, -1681.3651123047, 19.030313491821, 0, 0, 47.999267578125);
- CreateDynamicObject(987, 1699.0620117188, -1664.5207519531, 19.14994430542, 0, 0, 179.99993896484);
- CreateDynamicObject(987, 1692.0050048828, -1664.4134521484, 19.14994430542, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1680.0478515625, -1664.1064453125, 21.533744812012, 0, 0, 90);
- CreateDynamicObject(987, 1629.25390625, -1652.2529296875, 21.446960449219, 0, 0, 269.98901367188);
- CreateDynamicObject(987, 1629.2525634766, -1663.9429931641, 21.365642547607, 0, 0, 0);
- CreateDynamicObject(988, 1642.8662109375, -1720.8232421875, 21.416439056396, 0, 0, 271.99951171875);
- CreateDynamicObject(987, 1642.9263916016, -1699.7182617188, 19.462518692017, 0, 0, 269.99996948242);
- CreateDynamicObject(987, 1643.0352783203, -1690.7418212891, 19.462518692017, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 1642.8485107422, -1679.0551757813, 20.412538528442, 358, 0, 269.99450683594);
- CreateDynamicObject(987, 1643.07421875, -1667.1105957031, 20.455556869507, 0, 0, 270);
- CreateDynamicObject(987, 1643.0592041016, -1664.0682373047, 20.455556869507, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 1631.0721435547, -1663.9248046875, 21.315450668335, 0, 0, 0);
- CreateDynamicObject(987, 1680.0834960938, -1652.1961669922, 21.533744812012, 0, 0, 182.5);
- CreateDynamicObject(987, 1641.1645507813, -1652.1776123047, 21.446960449219, 0, 0, 180.73901367188);
- CreateDynamicObject(3279, 1675.9067382813, -1661.5098876953, 21.542495727539, 0, 0, 268.5);
- CreateDynamicObject(3279, 1633.3953857422, -1659.4279785156, 21.542495727539, 0, 0, 1.24755859375);
- CreateDynamicObject(16644, 1645.4532470703, -1659.470703125, 37.147399902344, 0, 0, 358.5);
- CreateDynamicObject(16644, 1656.3596191406, -1659.7631835938, 37.147399902344, 0, 0, 358.49487304688);
- CreateDynamicObject(16644, 1666.9188232422, -1660.1080322266, 37.147399902344, 0, 0, 358.49487304688);
- CreateDynamicObject(5821, 1647.2696533203, -1720.8515625, 25.267574310303, 0, 0, 266.75);
- /*--------------------|Grove Mafia|--------------------*/
- CreateDynamicObject(8210, 2469.5166015625, -1721.8397216797, 15.610401153564, 0, 0, 0);
- CreateDynamicObject(8210, 2512.9069824219, -1721.8980712891, 15.610401153564, 0, 0, 0);
- CreateDynamicObject(8210, 2540.4013671875, -1694.5388183594, 15.610401153564, 0, 0, 90);
- CreateDynamicObject(8210, 2540.3903808594, -1656.1995849609, 15.610401153564, 0, 0, 90);
- CreateDynamicObject(8210, 2513.1477050781, -1628.9793701172, 19.860401153564, 0, 0, 180);
- CreateDynamicObject(8210, 2470.9326171875, -1629.0244140625, 16.710437774658, 0, 2, 179.99450683594);
- CreateDynamicObject(8210, 2442.6203613281, -1694.2956542969, 15.485403060913, 0, 0, 268.75);
- CreateDynamicObject(8210, 2442.6201171875, -1694.294921875, 22.510448455811, 0, 0, 268.74755859375);
- CreateDynamicObject(987, 2443.111328125, -1628.6633300781, 12.416645050049, 0, 0, 270);
- CreateDynamicObject(987, 2443.1025390625, -1640.5379638672, 12.416645050049, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 2443.1025390625, -1640.537109375, 17.316638946533, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 2443.1091308594, -1628.5880126953, 17.341650009155, 0, 0, 269.99450683594);
- CreateDynamicObject(8210, 2470.7084960938, -1629.0092773438, 23.810436248779, 0, 1.99951171875, 179.99450683594);
- CreateDynamicObject(8210, 2513.1474609375, -1628.978515625, 26.960411071777, 0, 0, 179.99450683594);
- CreateDynamicObject(8210, 2512.90625, -1721.8974609375, 22.485422134399, 0, 0, 0);
- CreateDynamicObject(8210, 2469.5166015625, -1721.8388671875, 22.485414505005, 0, 0, 0);
- CreateDynamicObject(3749, 2441.765625, -1658.8217773438, 18.186676025391, 0, 0, 270.25012207031);
- CreateDynamicObject(987, 2443.0539550781, -1654.6760253906, 22.091630935669, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 2443.0537109375, -1654.67578125, 26.916645050049, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 2442.9873046875, -1642.6755371094, 22.091630935669, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 2442.9802246094, -1630.6636962891, 22.091630935669, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 2442.9924316406, -1628.5526123047, 22.091630935669, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 2442.9873046875, -1642.6748046875, 27.016647338867, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 2442.9790039063, -1630.7131347656, 26.991624832153, 0, 0, 269.99450683594);
- CreateDynamicObject(987, 2442.9921875, -1628.5517578125, 26.991632461548, 0, 0, 269.99450683594);
- CreateDynamicObject(8210, 2442.6171875, -1694.3950195313, 27.360443115234, 0, 0, 268.74755859375);
- CreateDynamicObject(3279, 2447.091796875, -1716.5435791016, 12.727582931519, 0, 0, 0);
- CreateDynamicObject(3279, 2448.9399414063, -1633.8267822266, 12.325929641724, 0, 0, 272);
- CreateDynamicObject(3279, 2524.2360839844, -1716.9493408203, 12.51594543457, 0, 0, 90);
- CreateDynamicObject(3279, 2536.373046875, -1633.8001708984, 12.87487411499, 0, 0, 269.99996948242);
- CreateDynamicObject(3279, 2503.6806640625, -1650.8725585938, 12.601211547852, 0, 0, 242);
- CreateDynamicObject(3279, 2472.8125, -1684.6728515625, 12.601211547852, 0, 0, 53.992309570313);
- CreateDynamicObject(989, 2442.7233886719, -1625.7749023438, 28.272403717041, 0, 0, 195.99996948242);
- CreateDynamicObject(16644, 2480.5913085938, -1675.4514160156, 28.206125259399, 0, 0, 46.5);
- CreateDynamicObject(16644, 2487.8828125, -1667.78515625, 28.206125259399, 0, 0, 46.499633789063);
- CreateDynamicObject(16644, 2493.923828125, -1661.4110107422, 28.206125259399, 0, 0, 46.499633789063);
- /*--------------------|Fallen Army|--------------------*/
- CreateDynamicObject(8210, 1279.4605712891, -755.67883300781, 95.47193145752, 0, 0, 180);
- CreateDynamicObject(8210, 1308.9608154297, -783.18072509766, 95.47193145752, 0, 0, 93.994506835938);
- CreateDynamicObject(8210, 1309.0771484375, -783.15155029297, 89.47193145752, 0, 0, 93.993530273438);
- CreateDynamicObject(8210, 1309.0771484375, -783.1513671875, 82.396911621094, 0, 0, 93.993530273438);
- CreateDynamicObject(8210, 1309.0771484375, -783.1513671875, 76.896911621094, 0, 0, 93.993530273438);
- CreateDynamicObject(8210, 1311.2287597656, -814.06042480469, 95.47193145752, 0, 0, 93.993530273438);
- CreateDynamicObject(8210, 1311.228515625, -814.0595703125, 88.546905517578, 0, 0, 93.993530273438);
- CreateDynamicObject(8210, 1311.228515625, -814.0595703125, 81.621925354004, 0, 0, 93.993530273438);
- CreateDynamicObject(8210, 1310.9774169922, -814.07678222656, 74.496948242188, 0, 0, 93.993530273438);
- CreateDynamicObject(8210, 1285.4586181641, -841.48840332031, 74.509880065918, 0, 0, 0);
- CreateDynamicObject(897, 1309.4956054688, -839.20098876953, 70.111389160156, 0, 0, 0);
- CreateDynamicObject(8210, 1229.9348144531, -841.47698974609, 74.509880065918, 0, 0, 0);
- CreateDynamicObject(8210, 1285.4580078125, -841.48828125, 81.334884643555, 0, 0, 0);
- CreateDynamicObject(8210, 1285.4580078125, -841.48828125, 88.284881591797, 0, 0, 0);
- CreateDynamicObject(8210, 1285.4580078125, -841.48828125, 95.484817504883, 0, 0, 0);
- CreateDynamicObject(8210, 1229.9345703125, -841.4765625, 81.309867858887, 0, 0, 0);
- CreateDynamicObject(8210, 1229.9345703125, -841.4765625, 88.284881591797, 0, 0, 0);
- CreateDynamicObject(8210, 1229.9345703125, -841.4765625, 95.484893798828, 0, 0, 0);
- CreateDynamicObject(8210, 1201.5062255859, -813.86608886719, 81.309867858887, 0, 0, 272);
- CreateDynamicObject(8210, 1201.505859375, -813.865234375, 88.184921264648, 0, 0, 271.99951171875);
- CreateDynamicObject(8210, 1201.505859375, -813.865234375, 95.484939575195, 0, 0, 271.99951171875);
- CreateDynamicObject(987, 1212.2719726563, -786.32946777344, 84.119956970215, 0, 0, 180);
- CreateDynamicObject(987, 1224.1997070313, -786.36248779297, 84.119956970215, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1236.1455078125, -786.34765625, 84.144958496094, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1239.201171875, -786.3583984375, 84.144958496094, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1212.271484375, -786.3291015625, 88.944931030273, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1212.271484375, -786.3291015625, 93.794860839844, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1224.19921875, -786.3623046875, 88.944931030273, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1224.19921875, -786.3623046875, 93.769920349121, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1236.1455078125, -786.34765625, 88.919960021973, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1236.1455078125, -786.34765625, 93.744979858398, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1239.201171875, -786.3583984375, 88.919944763184, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1239.201171875, -786.3583984375, 93.744934082031, 0, 0, 179.99450683594);
- CreateDynamicObject(987, 1239.4920654297, -774.27569580078, 91.533660888672, 0, 0, 267.25006103516);
- CreateDynamicObject(987, 1239.5185546875, -762.373046875, 91.533660888672, 0, 0, 269.99792480469);
- CreateDynamicObject(3749, 1245.3209228516, -758.55505371094, 97.689926147461, 0, 0, 14);
- CreateDynamicObject(3279, 1303.1042480469, -760.51672363281, 92.068725585938, 0, 0, 269.99996948242);
- CreateDynamicObject(3279, 1260.8873291016, -759.77618408203, 92.616470336914, 0, 0, 0);
- CreateDynamicObject(3279, 1206.9670410156, -790.84265136719, 83.514068603516, 0, 0, 0);
- CreateDynamicObject(16644, 1273.1333007813, -759.67663574219, 108.24634552002, 0, 0, 0);
- CreateDynamicObject(16644, 1290.5378417969, -759.74444580078, 108.24634552002, 0, 0, 0);
- CreateDynamicObject(647, 1237.5655517578, -763.83264160156, 91.050964355469, 0, 0, 0);
- CreateDynamicObject(647, 1236.3129882813, -761.71209716797, 91.050964355469, 0, 0, 0);
- /*--------------------|3D Staff|--------------------*/
- Create3DTextLabel("Dobrodosli na CroHerze DM server!\n(((Ovo je zona zabranjenog pucanja)))\n\nMDM 2011(R)",COLOR_ORANGE, 2216.9280,-1166.3020,27.7476, 50,0,1);
- //------------------------------------VOZILA---------------------------CH-samp.com---------
- AddStaticVehicleEx(411,2505.92553711,-1676.21533203,13.17662716,328.00000000,86,1,15); //Infernus
- AddStaticVehicleEx(411,2507.71899414,-1666.40332031,13.19589520,7.99682617,86,1,15); //Infernus
- AddStaticVehicleEx(411,2492.16137695,-1682.71936035,13.13734627,267.99682617,86,1,15); //Infernus
- AddStaticVehicleEx(560,2501.53271484,-1657.36108398,13.20721722,62.00000000,86,1,15); //Sultan
- AddStaticVehicleEx(560,2487.71997070,-1654.81152344,13.14303207,87.99584961,86,1,15); //Sultan
- AddStaticVehicleEx(560,2480.52465820,-1654.73193359,13.12327194,87.99584961,86,1,15); //Sultan
- AddStaticVehicleEx(541,2481.87475586,-1696.99926758,13.22082996,356.00000000,86,1,15); //Bullet
- AddStaticVehicleEx(541,2482.38671875,-1690.51293945,13.21572018,355.99548340,86,1,15); //Bullet
- AddStaticVehicleEx(522,2512.22729492,-1663.84606934,13.23881054,76.00000000,86,86,15); //NRG-500
- AddStaticVehicleEx(522,2512.40356445,-1665.09655762,13.23624039,75.99792480,86,86,15); //NRG-500
- AddStaticVehicleEx(522,2512.45629883,-1666.38793945,13.23119450,75.99792480,86,86,15); //NRG-500
- AddStaticVehicleEx(522,2512.54565430,-1667.85681152,13.22545528,75.99792480,86,86,15); //NRG-500
- AddStaticVehicleEx(487,2529.17480469,-1677.75073242,20.19522476,0.00000000,86,86,15); //Maverick
- AddStaticVehicleEx(487,2494.32202148,-1698.57092285,23.95017815,0.00000000,86,86,15); //Maverick
- AddStaticVehicleEx(487,1659.02185059,-1680.16967773,21.69555664,0.00000000,6,6,15); //Maverick
- AddStaticVehicleEx(541,1656.12890625,-1695.16394043,20.15596199,0.00000000,6,6,15); //Bullet
- AddStaticVehicleEx(541,1661.84313965,-1694.99353027,20.16241646,0.00000000,6,6,15); //Bullet
- AddStaticVehicleEx(560,1646.05432129,-1695.07348633,20.25929260,270.00000000,6,1,15); //Sultan
- AddStaticVehicleEx(560,1646.11755371,-1699.00634766,20.27876472,270.00000000,6,1,15); //Sultan
- AddStaticVehicleEx(560,1646.17431641,-1702.83654785,20.28935051,270.00000000,6,1,15); //Sultan
- AddStaticVehicleEx(560,1646.17041016,-1706.61791992,20.28935051,270.00000000,6,1,15); //Sultan
- AddStaticVehicleEx(560,1646.21020508,-1710.41528320,20.28935051,270.00000000,6,1,15); //Sultan
- AddStaticVehicleEx(451,1671.20104980,-1696.00842285,20.24500656,92.00000000,6,1,15); //Turismo
- AddStaticVehicleEx(451,1671.13378906,-1699.87817383,20.24784088,91.99951172,6,1,15); //Turismo
- AddStaticVehicleEx(451,1671.09289551,-1703.56689453,20.24874687,91.99951172,6,1,15); //Turismo
- AddStaticVehicleEx(451,1671.35180664,-1707.14404297,20.24874687,91.99951172,6,1,15); //Turismo
- AddStaticVehicleEx(451,1671.44750977,-1710.85205078,20.24157143,91.99951172,6,1,15); //Turismo
- AddStaticVehicleEx(522,1673.13305664,-1720.77856445,20.14475250,0.00000000,6,6,15); //NRG-500
- AddStaticVehicleEx(522,1671.25378418,-1720.83862305,20.14475250,0.00000000,6,6,15); //NRG-500
- AddStaticVehicleEx(522,1669.57165527,-1720.88195801,20.14475250,0.00000000,6,6,15); //NRG-500
- AddStaticVehicleEx(522,1667.98803711,-1720.91699219,20.14475250,0.00000000,6,6,15); //NRG-500
- AddStaticVehicleEx(522,1666.54309082,-1720.84155273,20.14475250,0.00000000,6,6,15); //NRG-500
- AddStaticVehicleEx(522,1664.91113281,-1720.88073730,20.14475250,0.00000000,6,6,15); //NRG-500
- AddStaticVehicleEx(522,1663.22119141,-1720.82604980,20.14475250,0.00000000,6,6,15); //NRG-500
- AddStaticVehicleEx(560,1245.77832031,-2011.39184570,59.63132858,270.00000000,16,1,15); //Sultan
- AddStaticVehicleEx(560,1245.79333496,-2015.54724121,59.63533401,270.00000000,16,1,15); //Sultan
- AddStaticVehicleEx(560,1245.80786133,-2019.68737793,59.63660431,270.00000000,16,1,15); //Sultan
- AddStaticVehicleEx(560,1245.95166016,-2023.97583008,59.63242340,270.00000000,16,1,15); //Sultan
- AddStaticVehicleEx(560,1246.02185059,-2028.23242188,59.63038254,270.00000000,16,1,15); //Sultan
- AddStaticVehicleEx(560,1246.08593750,-2032.34326172,59.62852097,270.00000000,16,1,15); //Sultan
- AddStaticVehicleEx(560,1246.03271484,-2036.28417969,59.63006973,270.00000000,16,1,15); //Sultan
- AddStaticVehicleEx(560,1245.98437500,-2039.93212891,59.63147354,270.00000000,16,1,15); //Sultan
- AddStaticVehicleEx(560,1245.73840332,-2043.52600098,59.63862228,270.00000000,16,1,15); //Sultan
- AddStaticVehicleEx(541,1251.59143066,-2010.41601562,59.36022949,177.99969482,16,16,15); //Bullet
- AddStaticVehicleEx(541,1254.84924316,-2010.31372070,59.26712418,177.99499512,16,16,15); //Bullet
- AddStaticVehicleEx(541,1258.13037109,-2010.33520508,59.17335892,177.99499512,16,16,15); //Bullet
- AddStaticVehicleEx(541,1261.53637695,-2010.23767090,59.07601547,177.99499512,16,16,15); //Bullet
- AddStaticVehicleEx(541,1265.01428223,-2010.39770508,58.97662735,177.99499512,16,16,15); //Bullet
- AddStaticVehicleEx(541,1268.57055664,-2010.30603027,58.87499237,177.99499512,16,16,15); //Bullet
- AddStaticVehicleEx(541,1272.12243652,-2010.07934570,58.77348709,177.99499512,16,16,15); //Bullet
- AddStaticVehicleEx(411,1276.78088379,-2015.44848633,58.73373413,90.00000000,16,1,15); //Infernus
- AddStaticVehicleEx(411,1276.65600586,-2018.79235840,58.74323273,90.00000000,16,1,15); //Infernus
- AddStaticVehicleEx(411,1276.74987793,-2022.16699219,58.75515747,90.00000000,16,1,15); //Infernus
- AddStaticVehicleEx(411,1276.77343750,-2025.51379395,58.76791763,90.00000000,16,1,15); //Infernus
- AddStaticVehicleEx(411,1276.80529785,-2029.18627930,58.78183746,90.00000000,16,1,15); //Infernus
- AddStaticVehicleEx(411,1276.80505371,-2032.66491699,58.79543304,90.00000000,16,1,15); //Infernus
- AddStaticVehicleEx(411,1276.98779297,-2036.06213379,58.80625153,90.00000000,16,1,15); //Infernus
- AddStaticVehicleEx(411,1276.85180664,-2039.81237793,58.82273102,90.00000000,16,1,15); //Infernus
- AddStaticVehicleEx(411,1276.61791992,-2043.22802734,58.83921814,90.00000000,16,1,15); //Infernus
- AddStaticVehicleEx(487,1115.90332031,-2053.92675781,74.69468689,0.00000000,16,16,15); //Maverick
- AddStaticVehicleEx(487,1116.72326660,-2020.78002930,74.69468689,174.00000000,16,16,15); //Maverick
- AddStaticVehicleEx(522,1134.64721680,-2077.26855469,68.66819000,0.00000000,16,16,15); //NRG-500
- AddStaticVehicleEx(522,1133.23840332,-2077.58056641,68.66819000,0.00000000,16,16,15); //NRG-500
- AddStaticVehicleEx(522,1131.81042480,-2077.63720703,68.66819000,0.00000000,16,16,15); //NRG-500
- AddStaticVehicleEx(522,1130.36791992,-2077.69433594,68.66819000,0.00000000,16,16,15); //NRG-500
- AddStaticVehicleEx(522,1128.95178223,-2078.16186523,68.66819000,0.00000000,16,16,15); //NRG-500
- AddStaticVehicleEx(560,1254.27441406,-803.47662354,83.94560242,177.99969482,54,1,15); //Sultan
- AddStaticVehicleEx(560,1249.12084961,-803.59277344,83.94560242,177.99499512,54,1,15); //Sultan
- AddStaticVehicleEx(560,1243.70751953,-803.21093750,83.94560242,177.99499512,54,1,15); //Sultan
- AddStaticVehicleEx(411,1249.85449219,-820.15142822,83.94062805,169.99993896,54,1,15); //Infernus
- AddStaticVehicleEx(411,1247.83374023,-826.30773926,83.94062805,151.99682617,54,1,15); //Infernus
- AddStaticVehicleEx(522,1294.11804199,-831.81805420,82.80100250,0.00000000,54,54,15); //NRG-500
- AddStaticVehicleEx(522,1290.97973633,-831.94500732,82.80100250,0.00000000,54,54,15); //NRG-500
- AddStaticVehicleEx(522,1287.67077637,-831.93255615,82.80100250,0.00000000,54,54,15); //NRG-500
- AddStaticVehicleEx(522,1284.43591309,-832.05865479,82.80100250,0.00000000,54,54,15); //NRG-500
- AddStaticVehicleEx(522,1281.03662109,-832.13665771,82.80100250,0.00000000,54,54,15); //NRG-500
- AddStaticVehicleEx(522,1277.73925781,-832.26300049,82.80100250,0.00000000,54,54,15); //NRG-500
- AddStaticVehicleEx(522,1274.42712402,-832.02062988,82.80100250,0.00000000,54,54,15); //NRG-500
- AddStaticVehicleEx(522,1271.16735840,-832.05541992,82.80100250,0.00000000,54,54,15); //NRG-500
- AddStaticVehicleEx(451,1293.01306152,-815.07244873,83.91212463,0.00000000,54,1,15); //Turismo
- AddStaticVehicleEx(487,1291.34020996,-789.63262939,96.72593689,0.00000000,54,54,15); //Maverick
- AddStaticVehicleEx(463,2227.85253906,-1173.45971680,25.34356308,276.00000000,-1,-1,15); //Freeway
- AddStaticVehicleEx(557,2014.37597656,-1047.99645996,23.68326950,68.00000000,-1,-1,15); //Monster B
- AddStaticVehicleEx(415,2227.56689453,-1177.01501465,25.57608414,272.00000000,-1,-1,15); //Cheetah
- AddStaticVehicleEx(429,2227.69433594,-1169.94641113,25.47656250,270.00000000,-1,-1,15); //Banshee
- AddStaticVehicleEx(402,2227.41503906,-1166.52807617,25.67675781,270.00000000,-1,-1,15); //Buffalo
- AddStaticVehicleEx(477,2227.66796875,-1162.79418945,25.61143494,270.00000000,-1,-1,15); //ZR-350
- AddStaticVehicleEx(565,2227.59277344,-1159.52087402,25.47064781,270.00000000,-1,-1,15); //Flash
- AddStaticVehicleEx(405,2227.50708008,-1155.95678711,25.80955315,270.00000000,-1,-1,15); //Sentinel
- AddStaticVehicleEx(500,2227.57958984,-1152.20812988,26.05872726,270.00000000,-1,-1,15); //Mesa
- AddStaticVehicleEx(470,2217.56396484,-1169.69653320,25.83657455,270.00000000,-1,-1,15); //Patriot
- AddStaticVehicleEx(559,2217.11645508,-1165.46899414,25.48062515,268.00000000,-1,1,15); //Jester
- AddStaticVehicleEx(560,2217.10107422,-1161.27001953,25.53153801,268.00000000,-1,-1,15); //Sultan
- AddStaticVehicleEx(496,2206.65039062,-1172.85632324,25.51428986,270.00000000,-1,-1,15); //Blista Compact
- AddStaticVehicleEx(411,2206.40307617,-1176.80346680,25.52656174,270.00000000,-1,-1,15); //Infernus
- AddStaticVehicleEx(541,2206.55810547,-1169.09216309,25.42656326,270.00000000,-1,-1,15); //Bullet
- AddStaticVehicleEx(545,2206.49707031,-1165.26818848,25.67656326,270.00000000,-1,-1,15); //Hustler
- AddStaticVehicleEx(576,2206.72802734,-1161.46691895,25.47656250,270.00000000,-1,-1,15); //Tornado
- AddStaticVehicleEx(492,2206.61401367,-1157.62634277,25.63197136,272.00000000,-1,-1,15); //Greenwood
- AddStaticVehicleEx(522,2206.17797852,-1154.07177734,25.39795113,284.00000000,-1,-1,15); //NRG-500
- AddStaticVehicleEx(533,2136.16699219,-1126.19982910,25.30875397,90.00000000,-1,-1,15); //Feltzer
- AddStaticVehicleEx(560,2136.33154297,-1130.89416504,25.48489761,92.00000000,-1,-1,15); //Sultan
- AddStaticVehicleEx(506,2136.12988281,-1135.61535645,25.49552155,92.00000000,-1,-1,15); //Super GT
- AddStaticVehicleEx(445,2135.95800781,-1140.67834473,25.26137352,88.00000000,-1,-1,15); //Admiral
- AddStaticVehicleEx(480,2136.18115234,-1145.62402344,24.58524132,88.00000000,-1,-1,15); //Comet
- AddStaticVehicleEx(411,2122.30834961,-1155.96411133,23.83267975,0.00000000,-1,-1,15); //Infernus
- AddStaticVehicleEx(411,2117.88769531,-1155.86364746,24.01649475,0.00000000,-1,-1,15); //Infernus
- AddStaticVehicleEx(559,2117.80371094,-1145.33007812,24.37621307,268.00000000,-1,-1,15); //Jester
- AddStaticVehicleEx(496,2118.04809570,-1139.94555664,24.80297279,270.00000000,-1,-1,15); //Blista Compact
- AddStaticVehicleEx(551,2119.39306641,-1134.63037109,25.17325974,272.00000000,-1,-1,15); //Merit
- AddStaticVehicleEx(405,2149.51391602,-1203.27185059,23.84881401,272.00000000,-1,-1,15); //Sentinel
- AddStaticVehicleEx(426,2149.09521484,-1198.86621094,23.70987701,272.00000000,-1,-1,15); //Premier
- AddStaticVehicleEx(565,2148.86181641,-1194.59936523,23.52724266,272.00000000,-1,-1,15); //Flash
- AddStaticVehicleEx(541,2149.07519531,-1189.75976562,23.52031326,271.99951172,-1,-1,15); //Bullet
- AddStaticVehicleEx(436,2148.77319336,-1184.95739746,23.69830513,272.00000000,-1,-1,15); //Previon
- AddStaticVehicleEx(405,2149.02319336,-1180.38183594,23.82031250,271.99951172,-1,-1,15); //Sentinel
- AddStaticVehicleEx(541,2149.11621094,-1175.62365723,23.52031326,271.99951172,-1,-1,15); //Bullet
- AddStaticVehicleEx(566,2148.94067383,-1171.37475586,23.72031212,272.00000000,-1,-1,15); //Tahoma
- AddStaticVehicleEx(481,2148.05444336,-1167.44653320,23.37552643,292.00000000,-1,-1,15); //BMX
- AddStaticVehicleEx(481,2148.41943359,-1165.95996094,23.41281891,292.00000000,-1,-1,15); //BMX
- AddStaticVehicleEx(436,2149.35546875,-1162.04406738,23.84730530,271.99951172,-1,-1,15); //Previon
- AddStaticVehicleEx(522,2148.84155273,-1157.25097656,23.50624084,283.99963379,-1,-1,15); //NRG-500
- AddStaticVehicleEx(460,152.88497925,-1980.31445312,2.32049561,0.00000000,-1,-1,15); //Skimmer
- AddStaticVehicleEx(446,172.09252930,-1904.51062012,0.00000000,84.00000000,1,106,15); //Squalo
- AddStaticVehicleEx(446,171.93359375,-1909.68017578,0.00000000,83.99597168,1,103,15); //Squalo
- AddStaticVehicleEx(446,171.90078735,-1915.17700195,0.00000000,83.99597168,1,6,15); //Squalo
- AddStaticVehicleEx(446,171.61907959,-1920.16296387,0.00000000,83.99597168,1,6,15); //Squalo
- AddStaticVehicleEx(446,135.95578003,-1918.29760742,0.00000000,269.99572754,1,103,15); //Squalo
- AddStaticVehicleEx(446,135.90161133,-1906.50280762,0.00000000,269.99450684,1,6,15); //Squalo
- AddStaticVehicleEx(446,136.17175293,-1912.53051758,0.00000000,269.99450684,1,103,15); //Squalo
- AddStaticVehicleEx(446,135.92077637,-1900.69458008,0.00000000,269.99450684,1,6,15); //Squalo
- AddStaticVehicleEx(471,353.39218140,-1808.28125000,4.13443279,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,350.10656738,-1808.30786133,4.13044262,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,347.04287720,-1808.21301270,4.13022995,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,344.21844482,-1808.47412109,4.11981678,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,356.77261353,-1808.73242188,4.12451172,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,340.46200562,-1808.95581055,4.10202789,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,337.25958252,-1809.21105957,4.08792305,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,334.26635742,-1809.55261230,4.05621529,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,331.58764648,-1809.02954102,4.06538200,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,327.99478149,-1809.23889160,4.05943489,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,324.55862427,-1809.83911133,4.04573727,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(471,321.60049438,-1809.44824219,4.05211926,0.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(467,2148.08471680,-1153.43933105,23.73820305,272.00000000,-1,-1,15); //Oceanic
- AddStaticVehicleEx(585,2148.64843750,-1148.35034180,24.09928322,272.00000000,-1,-1,15); //Emperor
- AddStaticVehicleEx(420,2148.90136719,-1143.55065918,24.78487015,272.00000000,6,1,15); //Taxi
- AddStaticVehicleEx(561,2149.19189453,-1138.40844727,25.42096329,272.00000000,-1,-1,15); //Stratum
- AddStaticVehicleEx(503,2149.42065430,-1134.11352539,25.53817558,272.00000000,-1,-1,15); //Hotring Racer B
- AddStaticVehicleEx(576,2161.20947266,-1196.66076660,23.61199188,92.00000000,-1,-1,15); //Tornado
- AddStaticVehicleEx(506,2161.20214844,-1192.17895508,23.61238480,92.00000000,-1,-1,15); //Super GT
- AddStaticVehicleEx(582,2160.95849609,-1187.35339355,23.97409439,92.00000000,-1,-1,15); //Newsvan
- AddStaticVehicleEx(541,2161.17260742,-1182.26684570,23.51785278,89.99938965,-1,-1,15); //Bullet
- AddStaticVehicleEx(533,2161.18334961,-1177.74951172,23.61674881,92.00000000,-1,-1,15); //Feltzer
- AddStaticVehicleEx(470,2161.47534180,-1172.99194336,23.92999649,88.00000000,-1,-1,15); //Patriot
- AddStaticVehicleEx(504,2161.51269531,-1167.80834961,23.75546455,90.00000000,-1,-1,15); //Bloodring Banger
- AddStaticVehicleEx(471,2161.54565430,-1162.78173828,23.39172554,90.00000000,-1,-1,15); //Quad
- AddStaticVehicleEx(508,2160.60107422,-1163.10168457,24.26572418,90.00000000,-1,-1,15); //Journey
- AddStaticVehicleEx(503,2161.05102539,-1157.83996582,23.81021500,92.00000000,-1,-1,15); //Hotring Racer B
- AddStaticVehicleEx(528,2160.80493164,-1143.94323730,25.00555611,90.00000000,-1,-1,15); //FBI Truck
- AddStaticVehicleEx(411,2161.12695312,-1148.39428711,24.16581726,88.00000000,-1,-1,15); //Infernus
- AddStaticVehicleEx(470,2161.07153320,-1152.92980957,24.01491737,87.99499512,-1,-1,15); //Patriot
- AddStaticVehicle(549,1844.3156,-1871.2266,13.0855,359.0572,1,1); // AUTO ZA VOZNJU KOLODVOR
- AddStaticVehicle(560,1841.3876,-1871.4535,13.0950,0.7021,1,1); // AUTO ZA VOZNJU KOLODVOR
- AddStaticVehicle(559,1838.1338,-1871.5898,13.0461,0.8997,1,1); // AUTO ZA VOZNJU KOLODVOR
- AddStaticVehicle(600,1834.9243,-1871.3600,13.1029,357.4289,1,1); // AUTO ZA VOZNJU KOLODVOR
- AddStaticVehicle(451,1839.9908,-1853.4060,13.0918,1.6951,1,1); // AUTO ZA VOZNJU KOLODVOR
- AddStaticVehicle(429,1836.6028,-1853.5426,13.1133,0.7284,1,1); // AUTO ZA VOZNJU KOLODVOR
- AddStaticVehicle(431,1780.8108,-1900.5187,13.4568,269.9322,82,87); // BUS KOLODVOR!
- AddStaticVehicle(431,1780.8344,-1905.5265,13.4568,269.8409,71,59); // BUS KOLODVOR!
- AddStaticVehicle(431,1780.8705,-1910.4974,13.4569,269.9059,75,59); // BUS KOLODVOR!
- AddStaticVehicle(431,1780.7150,-1915.5104,13.4567,269.8739,92,72); // BUS KOLODVOR!
- AddStaticVehicle(431,1780.8486,-1920.2805,13.4567,270.0005,47,74); // BUS KOLODVOR!
- //---------------------------------------------------------------------------CH DM-
- for(new h = 0; h < sizeof(BizzInfo); h++)
- {
- if(BizzInfo[h][bOwned] == 0)
- {
- AddStaticPickup(1272, 50, BizzInfo[h][bEntrancex], BizzInfo[h][bEntrancey], BizzInfo[h][bEntrancez]);
- pickups++;
- }
- if(BizzInfo[h][bOwned] == 1)
- {
- AddStaticPickup(1239, 50, BizzInfo[h][bEntrancex], BizzInfo[h][bEntrancey], BizzInfo[h][bEntrancez]);
- pickups++;
- }
- }
- for(new h = 0; h < sizeof(SBizzInfo); h++)
- {
- if(SBizzInfo[h][sbOwned] == 0)
- {
- AddStaticPickup(1272, 50, SBizzInfo[h][sbEntrancex], SBizzInfo[h][sbEntrancey], SBizzInfo[h][sbEntrancez]);
- pickups++;
- }
- if(SBizzInfo[h][sbOwned] == 1)
- {
- AddStaticPickup(1239, 50, SBizzInfo[h][sbEntrancex], SBizzInfo[h][sbEntrancey], SBizzInfo[h][sbEntrancez]);
- pickups++;
- }
- }
- AddStaticPickup(371, 2, 1536.0, -1360.0, 1150.0);
- AddStaticPickup(3013, 2, 997.7,-921.1,42.1);//cashbox
- AddStaticPickup(3013, 2, 2421.5, -1221.7, 25.3);
- AddStaticPickup(3013, 2, 2069.7,-1780.1,13.5);
- AddStaticPickup(3013, 2, 1352.4,-1756.7,13.5);
- AddStaticPickup(3013, 2, 1831.1,-1842.8,13.5);
- AddStaticPickup(1242, 2, 1527.5,-12.1,1002.0); //binco armor
- pickups=pickups+9;
- printf("Pickups Max = 100, Current Pickups = %d",pickups);
- //---------------------
- if (gRoundTime > 0)
- {
- SetTimer("GameModeInitExitFunc", gRoundTime, 0);
- }
- if (realtime)
- {
- new tmphour;
- new tmpminute;
- new tmpsecond;
- gettime(tmphour, tmpminute, tmpsecond);
- FixHour(tmphour);
- tmphour = shifthour;
- SetWorldTime(tmphour);
- }
- if (fow)
- {
- SetTimer("CopScanner", radarfreq, 1);
- }
- synctimer = SetTimer("SyncUp", 60000, 1);
- newmistimer = SetTimer("PrePlayerNewMission", jobdelay, 1);
- unjailtimer = SetTimer("SetPlayerUnjail", 1000, 1);
- if (nocasino)
- {
- playertimer = SetTimer("PlayerInArea", 1000, 1);
- }
- cartimer = SetTimer("CarCheck", 30000, 1);
- celltimer = SetTimer("CellPhoneTimer", 1000, 1);
- SetTimer("RingToner", 500, 0);
- SetTimer("SetPlayerFlash", 1000, 0);
- SetTimer("CustomPickups", 1000, 1);
- SetTimer("InHouse", 1000, 1);
- SetTimer("GameTicks", 500, 1);
- SetTimer("VoteKickTimer", 1000, 1);
- SetTimer("DMDetect", 1000, 1);
- SetTimer("Spectator", 2000, 1);
- SetTimer("PenInArea", 2000, 1);
- SetTimer("IdleKick", idletime, 1);
- SetTimer("AntiTeleport", 1000, 1);
- SetTimer("AntiCamp", 1000, 1);
- SetTimer("SkyDive", 1000, 1);
- SetTimer("Production", 300000, 1); //5 mins
- for(new i = 0; i < sizeof(CarSpawns); i++)
- {
- new randcol = random(126);
- new randcol2 = 1;
- if (rccounter == 14)
- {
- rccounter = 0;
- }
- hotwires[i] = CreateVehicle(carselect[rccounter], CarSpawns[i][pos_x], CarSpawns[i][pos_y], CarSpawns[i][pos_z], CarSpawns[i][z_angle], randcol, randcol2, 10000);
- rccounter++;
- }
- CarInit();
- TeamCarLockInit();
- return 1;
- }
- public SyncUp()
- {
- if (gdebug >= 3){printf("DEBUG SyncUp()");}
- SyncTime();
- DollahScoreUpdate();
- }
- public SyncTime()
- {
- if (gdebug >= 3){printf("DEBUG SyncTime()");}
- new string[64];
- new tmphour;
- new tmpminute;
- new tmpsecond;
- gettime(tmphour, tmpminute, tmpsecond);
- FixHour(tmphour);
- tmphour = shifthour;
- if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
- {
- format(string, sizeof(string), "{FFAA00}CroHerze: {FFFFFF}Sada je {33BBFF}%d:00 {FFFFFF}sati",tmphour);
- BroadCast(COLOR_WHITE,string);
- if (numplayers == 0)
- {
- GameModeInitExitFunc();
- }
- if (gdebug){printf("DEBUG tmphour=%d ghour=%d",tmphour,ghour);}
- ghour = tmphour;
- PayDay();
- if (realtime)
- {
- SetWorldTime(tmphour);
- }
- }
- }
- public SkyDive()
- {
- skydivecount--;
- new string[256];
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && gSkyDive[i] == 1)
- {
- if(skydivecount > 10)
- {
- format(string, sizeof(string), "~W~%d",skydivecount);
- }
- else
- {
- format(string, sizeof(string), "~r~%d",skydivecount);
- }
- GameTextForPlayer(i, string, 2000, 6);
- if(skydivecount == 0)
- {
- GivePlayerWeapon(i, 46, 0);
- SetPlayerPos(i,SBizzInfo[0][sbEntrancex]+i, SBizzInfo[0][sbEntrancey], 1350.0);
- SetPlayerInterior(i,0);
- PlayerInfo[i][pInt] = 0;
- SendClientMessage(i, TEAM_GROVE_COLOR, "MOZE: GO!! GO!! GO!!");
- gSkyDive[i] = 0;
- }
- }
- }
- if(skydivecount == 0)
- {
- skydivecount = 60;
- }
- }
- public Production()
- {
- for(new i = 0; i < sizeof(BizzInfo); i++)
- {
- if(BizzInfo[i][bComp] > 0)
- {
- //printf("BizzInfo[i][bComp] %d BizzInfo[i][bProdCost] %d",BizzInfo[i][bComp],BizzInfo[i][bProdCost])
- if(BizzInfo[i][bProd] < BizzInfo[i][bProdCap])
- {
- //printf("BizzInfo[i][bProd] %d BizzInfo[i][bProdCap] %d",BizzInfo[i][bProd],BizzInfo[i][bProdCap])
- BizzInfo[i][bProd] = BizzInfo[i][bProd]+BizzInfo[i][bProdCost];
- BizzInfo[i][bComp]--;
- }
- }
- }
- for(new i = 0; i < sizeof(SBizzInfo); i++)
- {
- if(SBizzInfo[i][sbComp] > 0)
- {
- if(SBizzInfo[i][sbProd] < SBizzInfo[i][sbProdCap])
- {
- SBizzInfo[i][sbProd] = SBizzInfo[i][sbProd]+SBizzInfo[i][sbProdCost];
- SBizzInfo[i][sbComp]--;
- }
- }
- }
- }
- public DateProp(playerid)
- {
- new playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername, sizeof(playername));
- new curdate = getdate();
- for(new h = 0; h < sizeof(HouseInfo); h++)
- {
- if (strcmp(playername, HouseInfo[h][hOwner], true) == 0)
- {
- HouseInfo[h][hDate] = curdate;
- OnPropUpdate();
- }
- }
- for(new b = 0; b < sizeof(BizzInfo); b++)
- {
- if (strcmp(playername, BizzInfo[b][bOwner], true) == 0)
- {
- BizzInfo[b][bDate] = curdate;
- OnPropUpdate();
- }
- }
- for(new c = 0; c < sizeof(SBizzInfo); c++)
- {
- if (strcmp(playername, SBizzInfo[c][sbOwner], true) == 0)
- {
- SBizzInfo[c][sbDate] = curdate;
- OnPropUpdate();
- }
- }
- return 1;
- }
- public Checkprop()
- {
- new olddate;
- new string[256];
- new curdate = getdate();
- for(new h = 0; h < sizeof(HouseInfo); h++)
- {
- if(HouseInfo[h][hOwned] == 1 && HouseInfo[h][hDate] > 9)
- {
- olddate = HouseInfo[h][hDate];
- if(curdate-olddate >= 3)
- {
- HouseInfo[h][hHel] = 0;
- HouseInfo[h][hArm] = 0;
- HouseInfo[h][hHealthx] = 0;
- HouseInfo[h][hHealthy] = 0;
- HouseInfo[h][hHealthz] = 0;
- HouseInfo[h][hArmourx] = 0;
- HouseInfo[h][hArmoury] = 0;
- HouseInfo[h][hArmourz] = 0;
- HouseInfo[h][hLock] = 1;
- HouseInfo[h][hOwned] = 0;
- HouseInfo[h][hVec] = 418;
- HouseInfo[h][hVcol1] = -1;
- HouseInfo[h][hVcol2] = -1;
- strmid(HouseInfo[h][hOwner], "The State", 0, strlen("The State"), 255);
- format(string, sizeof(string), "Oglasavanje | Autor: CroHerza | {F3FF02}Kontakt broj: 0", HouseInfo[h][hOwner]);
- SendClientMessageToAll(COLOR_GREEN,string);
- format(string, sizeof(string), "{FFFFFF}-Kuca je na prodaju za %d$", HouseInfo[h][hValue]);
- SendClientMessageToAll(COLOR_WHITE, string);
- OnPropUpdate();
- }
- }
- }
- for(new b = 0; b < sizeof(BizzInfo); b++)
- {
- if(BizzInfo[b][bOwned] == 1 && BizzInfo[b][bDate] > 9)
- {
- olddate = BizzInfo[b][bDate];
- if(curdate-olddate >= 3)
- {
- BizzInfo[b][bHel] = 0;
- BizzInfo[b][bArm] = 0;
- BizzInfo[b][bLock] = 1;
- BizzInfo[b][bOwned] = 0;
- strmid(BizzInfo[b][bOwner], "The State", 0, strlen("The State"), 255);
- format(string, sizeof(string), "Oglasavanje | Autor: CroHerza | {F3FF02}Kontakt broj: 0", BizzInfo[b][bOwner]);
- SendClientMessageToAll(COLOR_GREEN,string);
- format(string, sizeof(string), "{FFFFFF}-Slobodna firma za %d$", BizzInfo[b][bValue]);
- SendClientMessageToAll(COLOR_WHITE, string);
- OnPropUpdate();
- }
- }
- }
- for(new c = 0; c < sizeof(SBizzInfo); c++)
- {
- if(SBizzInfo[c][sbOwned] == 1 && SBizzInfo[c][sbDate] > 9)
- {
- olddate = SBizzInfo[c][sbDate];
- if(curdate-olddate >= 3)
- {
- SBizzInfo[c][sbHel] = 0;
- SBizzInfo[c][sbArm] = 0;
- SBizzInfo[c][sbLock] = 1;
- SBizzInfo[c][sbOwned] = 0;
- strmid(SBizzInfo[c][sbOwner], "The State", 0, strlen("The State"), 255);
- format(string, sizeof(string), "Oglasavanje | Autor: CroHerza | {F3FF02}Kontakt broj: 0", SBizzInfo[c][sbOwner]);
- SendClientMessageToAll(COLOR_GREEN,string);
- format(string, sizeof(string), "{FFFFFF}-Slobodna mala firma za %d$", SBizzInfo[c][sbValue]);
- SendClientMessageToAll(COLOR_WHITE, string);
- OnPropUpdate();
- }
- }
- }
- return 1;
- }
- public PayDay()
- {
- if (gdebug >= 1){printf("DEBUG PayDay()");}
- new string[128];
- new pay,account,interest;
- new rent = 0;
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pLevel] > 0)
- {
- new playername2[MAX_PLAYER_NAME];
- GetPlayerName(i, playername2, sizeof(playername2));
- account = PlayerInfo[i][pAccount];
- new key = PlayerInfo[i][pPhousekey];
- if(key != 255)
- {
- rent = HouseInfo[key][hRent];
- if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
- {
- rent = 0;
- }
- else if(rent > GetPlayerMoney(i))
- {
- PlayerInfo[i][pPhousekey] = 255;
- SendClientMessage(i, COLOR_WHITE, "Optuzen si");
- rent = 0;
- }
- HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
- }
- new tmpintrate;
- if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
- {
- tmpintrate = intrate+HouseInfo[key][hLevel];
- }
- else
- {
- tmpintrate = 1;
- }
- interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate);
- pay = PlayerInfo[i][pLevel]*paycheck;
- PlayerInfo[i][pExp]++;
- PlayerPlayMusic(i);
- GivePlayerMoney(i,pay-rent);
- PlayerInfo[i][pAccount] = account+interest;
- BizzInfo[4][bTakings] = BizzInfo[4][bTakings]+((PlayerInfo[i][pAccount]/1000)+intrate);
- new coordsstring[400];
- SendAdminMessage(0xDB023EFF, "| ZeroAS | Dynamicno snimanje vlasnistva,moguc lag sljedecih 40sekundi!");
- new cash = GetPlayerMoney(i);
- format(coordsstring, sizeof(coordsstring), "\nBanka Los Santos\n\nPostovani,ovo je bankovno izvijesce za proteklo razdoblje.\n\nPrihodi\n-Stari iznos racuna: $%d\n-Iznos uplate place na vas racun: $%d, Dodatci: $0\n\nRashodi\n-Struja: | Voda: 0$ | Smece: 0$ | Plin: 0$ \n-Najamnina: Kuca: -$%d\n-Porez na luksuz: 0\n\n\nNovo stanje na vasem racunu iznosi: %d", account,cash,rent,PlayerInfo[i][pAccount]+cash );
- ShowPlayerDialog(i, 1, DIALOG_STYLE_MSGBOX, "{33BBFF}LS BANKA | Izlistanje racuna", coordsstring, "U redu", "Odustani");
- SendAdminMessage(COLOR_GREEN, "[PAYDAY][provjera] - U redu.");
- rent = 0;
- }
- }
- Checkprop();
- return 1;
- }
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- split(const strsrc[], strdest[][], delimiter)
- {
- new i, li;
- new aNum;
- new len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
- public DelPrint(string1[])
- {
- strmid(string1, string1, 0, strlen(string1)-1, 255);
- printf("%s", string1);
- }
- public LoadPlayer(loaderid,const string[])
- {
- new string2[64];
- new loaded = loaderid;
- new valtmp[128];
- format(string2, sizeof(string2), "%s.ini", string);
- new File: file = fopen(string2, io_read);
- if (file)
- {
- fread(file, valtmp);strmid(PLlayerInfo[loaded][plKey], valtmp, 0, strlen(valtmp)-1, 255);
- fread(file, valtmp);PLlayerInfo[loaded][plCash] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plAccount] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plAdmin] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plLevel] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plExp] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][glPupgrade] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plKills] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plCB] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plHW] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plSR] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plWA] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plPEN] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plGun1] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plGun2] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plGun3] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plGun4] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plGun5] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plGun6] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plAmmo1] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plAmmo2] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plAmmo3] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plAmmo4] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plAmmo5] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plAmmo6] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plSHealth] = floatstr(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plHealth] = floatstr(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plPos_x] = floatstr(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plPos_y] = floatstr(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plPos_z] = floatstr(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plInt] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plLocal] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plTeam] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plLeader] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plFMember] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plMember] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plRank] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plChar] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plModel] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plWarns] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plPnumber] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plPhousekey] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plPbiskey] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plTVec] = strval(valtmp);DelPrint(valtmp);
- fread(file, valtmp);PLlayerInfo[loaded][plReg] = strval(valtmp);DelPrint(valtmp);
- SendClientMessage(loaderid, COLOR_WHITE, "CroHerze: Account ucitan");
- }
- else
- {
- SendClientMessage(loaderid, COLOR_WHITE, "CroHerze: nije nadjen Account s tim imenom");
- return 0;
- }
- return 1;
- }
- public SavePlayer(loaderid,const string[])
- {
- new string3[32];
- new saved = loaderid;
- format(string3, sizeof(string3), "%s.ini", string);
- new File: pFile = fopen(string3, io_write);
- if (pFile)
- {
- new var[32];
- format(var, 32, "pKey=%s\n", PLlayerInfo[saved][plKey]);fwrite(pFile, var);
- fclose(pFile);
- new File: hFile = fopen(string3, io_append);
- format(var, 32, "pCash=%d\n",PLlayerInfo[saved][plCash]);fwrite(hFile, var);
- format(var, 32, "pAccount=%d\n",PLlayerInfo[saved][plAccount]);fwrite(hFile, var);
- format(var, 32, "pAdmin=%d\n",PLlayerInfo[saved][plAdmin]);fwrite(hFile, var);
- format(var, 64, "MuteTime=%d\n",PlayerInfo[saved][pMuteTime]);fwrite(hFile, var);
- format(var, 64, "Muted=%d\n",PlayerInfo[saved][pMuted]);fwrite(hFile, var);
- format(var, 32, "CHBodovi=%d\n",PlayerInfo[saved][pCHBodovi]);fwrite(hFile, var);
- format(var, 32, "pLevel=%d\n",PLlayerInfo[saved][plLevel]);fwrite(hFile, var);
- format(var, 32, "pExp=%d\n",PLlayerInfo[saved][plExp]);fwrite(hFile, var);
- format(var, 32, "gPupgrade=%d\n",PLlayerInfo[saved][glPupgrade]);fwrite(hFile, var);
- format(var, 32, "pKills=%d\n",PLlayerInfo[saved][plKills]);fwrite(hFile, var);
- format(var, 32, "pCB=%d\n",PLlayerInfo[saved][plCB]);fwrite(hFile, var);
- format(var, 32, "pHW=%d\n",PLlayerInfo[saved][plHW]);fwrite(hFile, var);
- format(var, 32, "pSR=%d\n",PLlayerInfo[saved][plSR]);fwrite(hFile, var);
- format(var, 32, "pWA=%d\n",PLlayerInfo[saved][plWA]);fwrite(hFile, var);
- format(var, 32, "pPEN=%d\n",PLlayerInfo[saved][plPEN]);fwrite(hFile, var);
- format(var, 32, "pGun1=%d\n",PLlayerInfo[saved][plGun1]);fwrite(hFile, var);
- format(var, 32, "pGun2=%d\n",PLlayerInfo[saved][plGun2]);fwrite(hFile, var);
- format(var, 32, "pGun3=%d\n",PLlayerInfo[saved][plGun3]);fwrite(hFile, var);
- format(var, 32, "pGun4=%d\n",PLlayerInfo[saved][plGun4]);fwrite(hFile, var);
- format(var, 32, "pGun5=%d\n",PLlayerInfo[saved][plGun5]);fwrite(hFile, var);
- format(var, 32, "pGun6=%d\n",PLlayerInfo[saved][plGun6]);fwrite(hFile, var);
- format(var, 32, "pAmmo1=%d\n",PLlayerInfo[saved][plAmmo1]);fwrite(hFile, var);
- format(var, 32, "pAmmo2=%d\n",PLlayerInfo[saved][plAmmo2]);fwrite(hFile, var);
- format(var, 32, "pAmmo3=%d\n",PLlayerInfo[saved][plAmmo3]);fwrite(hFile, var);
- format(var, 32, "pAmmo4=%d\n",PLlayerInfo[saved][plAmmo4]);fwrite(hFile, var);
- format(var, 32, "pAmmo5=%d\n",PLlayerInfo[saved][plAmmo5]);fwrite(hFile, var);
- format(var, 32, "pAmmo6=%d\n",PLlayerInfo[saved][plAmmo6]);fwrite(hFile, var);
- format(var, 32, "pSHealth=%.lf\n", PLlayerInfo[saved][plSHealth]);fwrite(hFile, var);
- format(var, 32, "pHealth=%.lf\n", PLlayerInfo[saved][plHealth]);fwrite(hFile, var);
- format(var, 32, "pPos_x=%.lf\n", PLlayerInfo[saved][plPos_x]);fwrite(hFile, var);
- format(var, 32, "pPos_y=%.lf\n", PLlayerInfo[saved][plPos_y]);fwrite(hFile, var);
- format(var, 32, "pPos_z=%.lf\n", PLlayerInfo[saved][plPos_z]);fwrite(hFile, var);
- format(var, 32, "pInt=%d\n",PLlayerInfo[saved][plInt]);fwrite(hFile, var);
- format(var, 32, "pLocal=%d\n",PLlayerInfo[saved][plLocal]);fwrite(hFile, var);
- format(var, 32, "pTeam=%d\n",PLlayerInfo[saved][plTeam]);fwrite(hFile, var);
- format(var, 32, "pLeader=%d\n",PlayerInfo[saved][pLeader]);fwrite(hFile, var);
- format(var, 32, "pMember=%d\n",PlayerInfo[saved][pMember]);fwrite(hFile, var);
- format(var, 32, "pFMember=%d\n",PlayerInfo[saved][pFMember]);fwrite(hFile, var);
- format(var, 32, "pRank=%d\n",PlayerInfo[saved][pRank]);fwrite(hFile, var);
- format(var, 32, "pChar=%d\n",PlayerInfo[saved][pChar]);fwrite(hFile, var);
- format(var, 32, "pModel=%d\n",PLlayerInfo[saved][plModel]);fwrite(hFile, var);
- format(var, 32, "pWarns=%d\n",PLlayerInfo[saved][plWarns]);fwrite(hFile, var);
- format(var, 32, "pPnumber=%d\n",PLlayerInfo[saved][plPnumber]);fwrite(hFile, var);
- format(var, 32, "pPhousekey=%d\n",PLlayerInfo[saved][plPhousekey]);fwrite(hFile, var);
- format(var, 32, "pPbiskey=%d\n",PLlayerInfo[saved][plPbiskey]);fwrite(hFile, var);
- format(var, 32, "pTVec=%d\n",PLlayerInfo[saved][plTVec]);fwrite(hFile, var);
- format(var, 32, "pReg=%d\n",PLlayerInfo[saved][plReg]);fwrite(hFile, var);
- fclose(hFile);
- }
- return 1;
- }
- public OnPlayerLogin(playerid,password[])
- {
- new string2[64];
- new playername2[MAX_PLAYER_NAME];
- new tmp2[256];
- GetPlayerName(playerid, playername2, sizeof(playername2));
- format(string2, sizeof(string2), "%s.ini", playername2);
- new File: file = fopen(string2, io_read);
- if (file)
- {
- new PassData[256];
- new keytmp[256], valtmp[256];
- fread( file , PassData , sizeof( PassData ) );
- keytmp = ini_GetKey( PassData );
- if( strcmp( keytmp , "pKey" , true ) == 0 )
- {
- valtmp = ini_GetValue( PassData );
- strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
- }
- if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
- {
- new key[ 256 ] , val[ 256 ];
- new Data[ 256 ];
- while ( fread( file , Data , sizeof( Data ) ) )
- {
- key = ini_GetKey( Data );
- if( strcmp( key , "pCash" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCash] = strval( val ); }
- if( strcmp( key , "pAccount" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAccount] = strval( val ); }
- if( strcmp( key , "pAdmin" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
- if( strcmp( key , "CHBodovi" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCHBodovi] = strval( val ); }
- if( strcmp( key , "GameSageLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGameSage] = strval( val ); }
- if( strcmp( key , "pLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
- if( strcmp( key , "pExp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pExp] = strval( val ); }
- if( strcmp( key , "gPupgrade" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][gPupgrade] = strval( val ); }
- if( strcmp( key , "pKills" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pKills] = strval( val ); }
- if( strcmp( key , "MuteTime" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuteTime] = strval( val ); }
- if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); }
- if( strcmp( key , "pCB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pCB] = strval( val ); }
- if( strcmp( key , "pHW" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHW] = strval( val ); }
- if( strcmp( key , "pSR" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSR] = strval( val ); }
- if( strcmp( key , "pWA" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWA] = strval( val ); }
- if( strcmp( key , "pPEN" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPEN] = strval( val ); }
- if( strcmp( key , "pGun1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun1] = strval( val ); }
- if( strcmp( key , "pGun2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun2] = strval( val ); }
- if( strcmp( key , "pGun3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun3] = strval( val ); }
- if( strcmp( key , "pGun4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun4] = strval( val ); }
- if( strcmp( key , "pGun5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun5] = strval( val ); }
- if( strcmp( key , "pGun6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pGun6] = strval( val ); }
- if( strcmp( key , "pAmmo1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo1] = strval( val ); }
- if( strcmp( key , "pAmmo2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo2] = strval( val ); }
- if( strcmp( key , "pAmmo3" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo3] = strval( val ); }
- if( strcmp( key , "pAmmo4" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo4] = strval( val ); }
- if( strcmp( key , "pAmmo5" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo5] = strval( val ); }
- if( strcmp( key , "pAmmo6" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAmmo6] = strval( val ); }
- if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = strval( val ); }
- if( strcmp( key , "pPHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pHealth] = strval( val ); }
- if( strcmp( key , "pPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_x] = strval( val ); }
- if( strcmp( key , "pPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_y] = strval( val ); }
- if( strcmp( key , "pPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPos_z] = strval( val ); }
- if( strcmp( key , "pInt" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pInt] = strval( val ); }
- if( strcmp( key , "pLocal" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLocal] = strval( val ); }
- if( strcmp( key , "pTeam" , true ) == 0 ) { val = ini_GetValue( Data );PlayerInfo[playerid][pTeam] = strval(val); }
- if( strcmp( key , "pLeader" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLeader] = strval( val ); }
- if( strcmp( key , "pMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMember] = strval( val ); }
- if( strcmp( key , "pFMember" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pFMember] = strval( val ); }
- if( strcmp( key , "pRank" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pRank] = strval( val ); }
- if( strcmp( key , "pChar" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pChar] = strval( val ); }
- if( strcmp( key , "pModel" , true ) == 0 ) { val = ini_GetValue( Data );PlayerInfo[playerid][pModel] = strval(val); }
- if( strcmp( key , "pWarns" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pWarns] = strval( val ); }
- if( strcmp( key , "pPnumber" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPnumber] = strval( val ); }
- if( strcmp( key , "pPhousekey" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPhousekey] = strval( val ); }
- if( strcmp( key , "pPbiskey" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pPbiskey] = strval( val ); }
- if( strcmp( key , "pTVec" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pTVec] = strval( val ); }
- if( strcmp( key , "pReg" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pReg] = strval( val ); }
- }//end while
- fclose(file);//close the file after everything has been read in the while
- }
- else
- {
- new loginstring[400];
- new loginname[64];
- GetPlayerName(playerid,loginname,sizeof(loginname));
- format(loginstring,sizeof(loginstring),"{33BBFF}___________________________________________\n{F81414}[Greska] {FFFF22}Unijeli ste pogresnu lozinku\n\n{33BBFF}%s\n{FFFFFF}Tvoj korisnicki racun je pronadjen!\n\nMolimo upisi svoju lozinku da udjes na server:\n{33BBFF}___________________________________________",loginname);
- ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"{FFFFFF}Logiranje",loginstring,"Logiraj","Odustani");
- gPlayerLogTries[playerid] += 1;
- if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
- return 1;
- }
- ResetPlayerMoney(playerid);
- SetPlayerToTeamColor(playerid);
- GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
- if(PlayerInfo[playerid][pReg] == 0)
- {
- SetPlayerInterior(playerid,0);
- PlayerInfo[playerid][pLevel] = 1;
- PlayerInfo[playerid][pSHealth] = 0.0;
- PlayerInfo[playerid][pHealth] = 50.0;
- PlayerInfo[playerid][pPos_x] = 2223.8;
- PlayerInfo[playerid][pPos_y] = -1147.1;
- PlayerInfo[playerid][pPos_z] = 1025.7;
- PlayerInfo[playerid][pInt] = 15;
- PlayerInfo[playerid][pLocal] = 255;
- PlayerInfo[playerid][pTeam] = 3;
- PlayerInfo[playerid][pModel] = 101;
- new randphone = 1000 + random(8999);//minimum 1000 max 9999 //giving one at the start
- PlayerInfo[playerid][pPnumber] = randphone;
- PlayerInfo[playerid][pPhousekey] = 255;
- PlayerInfo[playerid][pPbiskey] = 255;
- PlayerInfo[playerid][pAccount] = 50000;
- PlayerInfo[playerid][pReg] = 1;
- GivePlayerMoney(playerid, 5000);
- }
- //if (gdebug){printf("DEBUG phonenumber = %d",pnumber);}
- if(PlayerInfo[playerid][pLevel] == -999) //autoban
- {
- Ban(playerid);
- }
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- SendClientMessage(playerid,0x000000AA, " ");
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "*Dobrodosao %s na server,ljepo te opet vidjeti na serveru!",playername2);
- SendClientMessage(playerid, COLOR_LIGHTBLUE,coordsstring);
- new level = PlayerInfo[playerid][pLevel];
- new exp = PlayerInfo[playerid][pExp];
- new nxtlevel = PlayerInfo[playerid][pLevel]+1;
- new expamount = nxtlevel*levelexp;
- format(coordsstring, sizeof(coordsstring), "*Tvoj dosadasnji zivot: Level [%d] | Respekti [%d/%d]",level,exp,expamount);
- SendClientMessage(playerid, COLOR_WHITE,coordsstring);
- SetPlayerHealth(playerid,0.0);
- SendClientMessage(playerid, 0xFFFF00FF, RandomPoslovice[random(sizeof(RandomPoslovice))]);
- new hour,minuite,second;
- new year, month,day;
- getdate(year, month, day);
- gettime(hour,minuite,second);
- format(coordsstring, sizeof(coordsstring), "*Sada je: %d:%d h | Datum: %d.%d.%d",hour,minuite,day,month,year);
- SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
- SetPlayerWeapons(playerid);
- SetPlayerHealth(playerid,0.0);
- if (PlayerInfo[playerid][pCHBodovi] > 1)
- {
- format(string2, sizeof(string2), "*Vi imate jos %d CroHerze Bodova",PlayerInfo[playerid][pCHBodovi]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE,string2);
- SetPlayerHealth(playerid,0.0);
- }
- if (PlayerInfo[playerid][pAdmin] > 1)
- {
- format(string2, sizeof(string2), "| ZeroASL | Aktiviram tihi mod...",PlayerInfo[playerid][pAdmin],playername2);
- ABroadCast(COLOR_LIGHTRED,string2,1);
- SetPlayerHealth(playerid,0.0);
- }
- if (PlayerInfo[playerid][pAdmin] > 0)
- {
- format(string2, sizeof(string2), "CroHerza: logiran si kao level admin: %d",PlayerInfo[playerid][pAdmin]);
- SendClientMessage(playerid, COLOR_BISQUE,string2);
- }
- if (PlayerInfo[playerid][pAdmin] > 1)
- {
- format(string2, sizeof(string2), "...CH_Admin %s , level: %d , je usao na server...",playername2,PlayerInfo[playerid][pAdmin]);
- ABroadCast(COLOR_BM,string2,1);
- SetPlayerHealth(playerid,0.0);
- }
- SetSpawnInfo(playerid, 1, PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
- if(gTeam[playerid] == 0)
- {
- gTeam[playerid] = 3;
- }
- else
- {
- gTeam[playerid] = PlayerInfo[playerid][pTeam];
- }
- gPlayerLogged[playerid] = 1;
- if(accountplay)
- {
- gPlayerSpawned[playerid] = 0;
- }
- SpawnPlayer(playerid);
- GetPlayerName(playerid, playername2, sizeof(playername2));
- format(tmp2, sizeof(tmp2), "~w~~n~~n~~n~~n~~n~Dobrodosao~n~~r~%s", playername2);
- DateProp(playerid);
- GameTextForPlayer(playerid, tmp2, 5000, 3);
- SendClientMessage(playerid, COLOR_YELLOW, motd);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "CroHerze: Nemate korisnicki racun,registrirajte se!");
- }
- return 1;
- }
- public CopCheck(playerid)
- {
- if (gdebug >= 1){printf("DEBUG CopCheck(%d) (%s)", playerid);}
- new playername2[MAX_PLAYER_NAME];
- new storedcopname[64];
- GetPlayerName(playerid, playername2, sizeof(playername2));
- new File: file = fopen("cops.cfg", io_read);
- if (file)
- {
- new valtmp[MAX_PLAYER_NAME];
- while (fread(file, valtmp) > 0)
- {
- //printf("%s",valtmp);
- strmid(storedcopname, valtmp, 0, strlen(playername2), 255);
- if ((strcmp(storedcopname, playername2, true, strlen(playername2)) == 0) && (strlen(playername2) == strlen(storedcopname)))
- {
- fclose(file);
- return 1;
- }
- }
- }
- fclose(file);
- return 0;
- }
- public MedCheck(playerid)
- {
- if (gdebug >= 1){printf("DEBUG MedCheck(%d) (%s)", playerid);}
- new playername2[MAX_PLAYER_NAME];
- new storedcopname[64];
- GetPlayerName(playerid, playername2, sizeof(playername2));
- new File: file = fopen("meds.cfg", io_read);
- if (file)
- {
- new valtmp[MAX_PLAYER_NAME];
- while (fread(file, valtmp) > 0)
- {
- //printf("%s",valtmp);
- strmid(storedcopname, valtmp, 0, strlen(playername2), 255);
- if ((strcmp(storedcopname, playername2, true, strlen(playername2)) == 0) && (strlen(playername2) == strlen(storedcopname)))
- {
- fclose(file);
- return 1;
- }
- }
- }
- fclose(file);
- return 0;
- }
- public OnPlayerRegister(playerid, password[])
- {
- if(IsPlayerConnected(playerid))
- {
- new string3[32];
- new playername3[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername3, sizeof(playername3));
- format(string3, sizeof(string3), "%s.ini", playername3);
- new File: hFile = fopen(string3, io_write);
- if (hFile)
- {
- strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
- new var[32];
- format(var, 32, "pKey=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
- format(var, 32, "pCash=%d\n", PlayerInfo[playerid][pCash]);fwrite(hFile, var);
- format(var, 32, "pAccount=%d\n", PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
- format(var, 64, "MuteTime=%d\n",PlayerInfo[playerid][pMuteTime]);fwrite(hFile, var);
- format(var, 64, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
- format(var, 32, "pAdmin=%d\n", PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
- format(var, 32, "CHBodovi=%d\n",PlayerInfo[playerid][pCHBodovi]);fwrite(hFile, var);
- format(var, 32, "GameSageLevel=%d\n",PlayerInfo[playerid][pGameSage]);fwrite(hFile, var);
- format(var, 32, "pLevel=%d\n", PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
- format(var, 32, "pExp=%d\n", PlayerInfo[playerid][pExp]);fwrite(hFile, var);
- format(var, 32, "gPupgrade=%d\n", PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
- format(var, 32, "pKills=%d\n", PlayerInfo[playerid][pKills]);fwrite(hFile, var);
- format(var, 32, "pCB=%d\n", PlayerInfo[playerid][pCB]);fwrite(hFile, var);
- format(var, 32, "pHW=%d\n", PlayerInfo[playerid][pHW]);fwrite(hFile, var);
- format(var, 32, "pSR=%d\n", PlayerInfo[playerid][pSR]);fwrite(hFile, var);
- format(var, 32, "pWA=%d\n", PlayerInfo[playerid][pWA]);fwrite(hFile, var);
- format(var, 32, "pPEN=%d\n", PlayerInfo[playerid][pPEN]);fwrite(hFile, var);
- format(var, 32, "pGun1=%d\n", PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
- format(var, 32, "pGun2=%d\n", PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
- format(var, 32, "pGun3=%d\n", PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
- format(var, 32, "pGun4=%d\n", PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
- format(var, 32, "pGun5=%d\n", PlayerInfo[playerid][pGun5]);fwrite(hFile, var);
- format(var, 32, "pGun6=%d\n", PlayerInfo[playerid][pGun6]);fwrite(hFile, var);
- format(var, 32, "pAmmo1=%d\n", PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
- format(var, 32, "pAmmo2=%d\n", PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
- format(var, 32, "pAmmo3=%d\n", PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
- format(var, 32, "pAmmo4=%d\n", PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
- format(var, 32, "pAmmo5=%d\n", PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
- format(var, 32, "pAmmo6=%d\n", PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
- format(var, 32, "pSHealth=%f\n", PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
- format(var, 32, "pHealth=%f\n", PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
- format(var, 32, "pPos_x=%f\n", PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
- format(var, 32, "pPos_y=%f\n", PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
- format(var, 32, "pPos_z=%f\n", PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
- if(accountplay)
- {
- PlayerInfo[playerid][pInt] = 0;
- }
- format(var, 32, "pInt=%d\n", PlayerInfo[playerid][pInt]);fwrite(hFile, var);
- format(var, 32, "pLocal=%d\n", PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
- format(var, 32, "pTeam=%d\n", PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
- format(var, 32, "pLeader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
- format(var, 32, "pMember=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
- format(var, 32, "pFMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
- format(var, 32, "pRank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
- format(var, 32, "pChar=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
- format(var, 32, "pModel=%d\n", PlayerInfo[playerid][pModel]);fwrite(hFile, var);
- format(var, 32, "pWarns=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
- format(var, 32, "pPnumber=%d\n", PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
- format(var, 32, "pPhousekey=%d\n", PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
- format(var, 32, "pPbiskey=%d\n", PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
- format(var, 32, "pTVec=%d\n", PlayerInfo[playerid][pTVec]);fwrite(hFile, var);
- format(var, 32, "pReg=%d\n", PlayerInfo[playerid][pReg]);fwrite(hFile, var);
- fclose(hFile);
- printf(">>> %s je napravio account",playername3);
- format(string3, sizeof(string3), "ZeroASL: %s | se registrirao na CroHerze DM |Admin Poruka|",playername3);
- if (PlayerInfo[playerid][pAdmin] >= 1339)
- SendAdminMessage(COLOR_LIGHTRED,string3);
- new loginstring[400];
- new loginname[64];
- GetPlayerName(playerid,loginname,sizeof(loginname));
- format(loginstring,sizeof(loginstring),"{33BBFF}___________________________________________\n\n{FFFFFF}Dobrodosao na CroHerze DeathMatch Server\n\n{33BBFF}%s\n{FFFFFF}Tvoj korisnicki racun je pronadjen!\n\nMolimo upisi svoju lozinku da udjes na server:\n{33BBFF}___________________________________________",loginname);
- ShowPlayerDialog(playerid,12346,DIALOG_STYLE_INPUT,"{FFFFFF}Logiranje",loginstring,"Logiraj","Odustani");
- }
- }
- return 1;
- }
- public OnUpdatePlayer(playerid)
- {
- if (gdebug >= 1){printf("DEBUG OnUpdatePlayer(%d)", playerid);}
- if (gPlayerLogged[playerid] != 0)
- {
- new string3[32];
- new playername3[MAX_PLAYER_NAME];
- GetPlayerName(playerid, playername3, sizeof(playername3));
- format(string3, sizeof(string3), "%s.ini", playername3);
- new File: hFile = fopen(string3, io_write);
- if (gdebug){printf("DEBUG OnUpdatePlayer(%d)8.5", playerid);}
- if (hFile)
- {
- new var[32];
- format(var, 32, "pKey=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
- PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
- format(var, 32, "pCash=%d\n", PlayerInfo[playerid][pCash]);fwrite(hFile, var);
- format(var, 32, "pAccount=%d\n", PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
- format(var, 64, "MuteTime=%d\n",PlayerInfo[playerid][pMuteTime]);fwrite(hFile, var);
- format(var, 64, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
- format(var, 32, "CHBodovi=%d\n",PlayerInfo[playerid][pCHBodovi]);fwrite(hFile, var);
- format(var, 32, "pAdmin=%d\n", PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
- format(var, 32, "pLevel=%d\n", PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
- format(var, 32, "pExp=%d\n", PlayerInfo[playerid][pExp]);fwrite(hFile, var);
- format(var, 32, "gPupgrade=%d\n", PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
- format(var, 32, "pKills=%d\n", PlayerInfo[playerid][pKills]);fwrite(hFile, var);
- format(var, 32, "pCB=%d\n", PlayerInfo[playerid][pCB]);fwrite(hFile, var);
- format(var, 32, "pHW=%d\n", PlayerInfo[playerid][pHW]);fwrite(hFile, var);
- format(var, 32, "pSR=%d\n", PlayerInfo[playerid][pSR]);fwrite(hFile, var);
- format(var, 32, "pWA=%d\n", PlayerInfo[playerid][pWA]);fwrite(hFile, var);
- format(var, 32, "pPEN=%d\n", PlayerInfo[playerid][pPEN]);fwrite(hFile, var);
- format(var, 32, "pGun1=%d\n", PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
- format(var, 32, "pGun2=%d\n", PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
- format(var, 32, "pGun3=%d\n", PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
- format(var, 32, "pGun4=%d\n", PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
- format(var, 32, "pGun5=%d\n", PlayerInfo[playerid][pGun5]);fwrite(hFile, var);
- format(var, 32, "pGun6=%d\n", PlayerInfo[playerid][pGun6]);fwrite(hFile, var);
- format(var, 32, "pAmmo1=%d\n", PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
- format(var, 32, "pAmmo2=%d\n", PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
- format(var, 32, "pAmmo3=%d\n", PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
- format(var, 32, "pAmmo4=%d\n", PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
- format(var, 32, "pAmmo5=%d\n", PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
- format(var, 32, "pAmmo6=%d\n", PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
- format(var, 32, "pSHealth=%.1f\n", PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
- GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
- format(var, 32, "pHealth=%.1f\n", PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
- GetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
- if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0) || (gPlayerFighter[playerid] != 0))
- {
- PlayerInfo[playerid][pPos_x] = 1684.9;
- PlayerInfo[playerid][pPos_y] = -2244.5;
- PlayerInfo[playerid][pPos_z] = 13.5;
- }
- if(Spectate[playerid] != 255)
- {
- PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
- PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
- PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
- PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
- PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
- }
- format(var, 32, "pPos_x=%.lf\n", PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
- format(var, 32, "pPos_y=%.lf\n", PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
- format(var, 32, "pPos_z=%.lf\n", PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
- format(var, 32, "pInt=%d\n", PlayerInfo[playerid][pInt]);fwrite(hFile, var);
- format(var, 32, "pLocal=%d\n", PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
- format(var, 32, "pTeam=%d\n", PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
- format(var, 32, "pLeader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
- format(var, 32, "pMember=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
- format(var, 32, "pFMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
- format(var, 32, "pRank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
- format(var, 32, "pChar=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
- format(var, 32, "pModel=%d\n", PlayerInfo[playerid][pModel]);fwrite(hFile, var);
- format(var, 32, "pWarns=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
- format(var, 32, "pPnumber=%d\n", PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
- format(var, 32, "pPhousekey=%d\n", PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
- format(var, 32, "pPbiskey=%d\n", PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
- format(var, 32, "pTVec=%d\n", PlayerInfo[playerid][pTVec]);fwrite(hFile, var);
- format(var, 32, "pReg=%d\n", PlayerInfo[playerid][pReg]);fwrite(hFile, var);
- fclose(hFile);
- }
- }
- else
- {
- SendClientMessage(playerid, 0xDB023EFF, "ZeroAS: Vas acc je trenutno iskljucen sa servera! Izbaceni ste!");
- }
- if (gdebug){printf("DEBUG OnUpdatePlayer(%d)End", playerid);}
- return 1;
- }
- public OnPlayerRename(name[],string[],playerid)
- {
- if (gdebug >= 1){printf("DEBUG OnPlayerRename(%d)", playerid);}
- if (gPlayerLogged[playerid] != 0)
- {
- new File: hFile = fopen(string, io_write);
- if (gdebug){printf("DEBUG OnUpdatePlayer(%d)8.5", playerid);}
- if (hFile)
- {
- new var[32];
- format(var, 32, "pKey=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
- PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
- format(var, 32, "pCash=%d\n", PlayerInfo[playerid][pCash]);fwrite(hFile, var);
- format(var, 32, "pAccount=%d\n", PlayerInfo[playerid][pAccount]);fwrite(hFile, var);
- format(var, 32, "pAdmin=%d\n", PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
- format(var, 32, "pLevel=%d\n", PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
- format(var, 32, "pExp=%d\n", PlayerInfo[playerid][pExp]);fwrite(hFile, var);
- format(var, 32, "gPupgrade=%d\n", PlayerInfo[playerid][gPupgrade]);fwrite(hFile, var);
- format(var, 32, "pKills=%d\n", PlayerInfo[playerid][pKills]);fwrite(hFile, var);
- format(var, 32, "pCB=%d\n", PlayerInfo[playerid][pCB]);fwrite(hFile, var);
- format(var, 32, "pHW=%d\n", PlayerInfo[playerid][pHW]);fwrite(hFile, var);
- format(var, 32, "pSR=%d\n", PlayerInfo[playerid][pSR]);fwrite(hFile, var);
- format(var, 32, "pWA=%d\n", PlayerInfo[playerid][pWA]);fwrite(hFile, var);
- format(var, 32, "pPEN=%d\n", PlayerInfo[playerid][pPEN]);fwrite(hFile, var);
- format(var, 32, "pGun1=%d\n", PlayerInfo[playerid][pGun1]);fwrite(hFile, var);
- format(var, 32, "pGun2=%d\n", PlayerInfo[playerid][pGun2]);fwrite(hFile, var);
- format(var, 32, "pGun3=%d\n", PlayerInfo[playerid][pGun3]);fwrite(hFile, var);
- format(var, 32, "pGun4=%d\n", PlayerInfo[playerid][pGun4]);fwrite(hFile, var);
- format(var, 32, "pGun5=%d\n", PlayerInfo[playerid][pGun5]);fwrite(hFile, var);
- format(var, 32, "pGun6=%d\n", PlayerInfo[playerid][pGun6]);fwrite(hFile, var);
- format(var, 32, "pAmmo1=%d\n", PlayerInfo[playerid][pAmmo1]);fwrite(hFile, var);
- format(var, 32, "pAmmo2=%d\n", PlayerInfo[playerid][pAmmo2]);fwrite(hFile, var);
- format(var, 32, "pAmmo3=%d\n", PlayerInfo[playerid][pAmmo3]);fwrite(hFile, var);
- format(var, 32, "pAmmo4=%d\n", PlayerInfo[playerid][pAmmo4]);fwrite(hFile, var);
- format(var, 32, "pAmmo5=%d\n", PlayerInfo[playerid][pAmmo5]);fwrite(hFile, var);
- format(var, 32, "pAmmo6=%d\n", PlayerInfo[playerid][pAmmo6]);fwrite(hFile, var);
- format(var, 32, "pSHealth=%.1f\n", PlayerInfo[playerid][pSHealth]);fwrite(hFile, var);
- GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
- format(var, 32, "pHealth=%.1f\n", PlayerInfo[playerid][pHealth]);fwrite(hFile, var);
- GetPlayerPos(playerid, PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z]);
- if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0) || (gPlayerFighter[playerid] != 0))
- {
- PlayerInfo[playerid][pPos_x] = 1684.9;
- PlayerInfo[playerid][pPos_y] = -2244.5;
- PlayerInfo[playerid][pPos_z] = 13.5;
- }
- if(Spectate[playerid] != 255)
- {
- PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
- PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
- PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
- PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
- PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
- }
- format(var, 32, "pPos_x=%.lf\n", PlayerInfo[playerid][pPos_x]);fwrite(hFile, var);
- format(var, 32, "pPos_y=%.lf\n", PlayerInfo[playerid][pPos_y]);fwrite(hFile, var);
- format(var, 32, "pPos_z=%.lf\n", PlayerInfo[playerid][pPos_z]);fwrite(hFile, var);
- format(var, 32, "pInt=%d\n", PlayerInfo[playerid][pInt]);fwrite(hFile, var);
- format(var, 32, "pLocal=%d\n", PlayerInfo[playerid][pLocal]);fwrite(hFile, var);
- format(var, 32, "pTeam=%d\n", PlayerInfo[playerid][pTeam]);fwrite(hFile, var);
- format(var, 32, "pLeader=%d\n",PlayerInfo[playerid][pLeader]);fwrite(hFile, var);
- format(var, 32, "pMember=%d\n",PlayerInfo[playerid][pMember]);fwrite(hFile, var);
- format(var, 32, "pFMember=%d\n",PlayerInfo[playerid][pFMember]);fwrite(hFile, var);
- format(var, 32, "pRank=%d\n",PlayerInfo[playerid][pRank]);fwrite(hFile, var);
- format(var, 32, "pChar=%d\n",PlayerInfo[playerid][pChar]);fwrite(hFile, var);
- format(var, 32, "pModel=%d\n", PlayerInfo[playerid][pModel]);fwrite(hFile, var);
- format(var, 32, "pWarns=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
- format(var, 32, "pPnumber=%d\n", PlayerInfo[playerid][pPnumber]);fwrite(hFile, var);
- format(var, 32, "pPhousekey=%d\n", PlayerInfo[playerid][pPhousekey]);fwrite(hFile, var);
- format(var, 32, "pPbiskey=%d\n", PlayerInfo[playerid][pPbiskey]);fwrite(hFile, var);
- format(var, 32, "pTVec=%d\n", PlayerInfo[playerid][pTVec]);fwrite(hFile, var);
- format(var, 32, "pReg=%d\n", PlayerInfo[playerid][pReg]);fwrite(hFile, var);
- fclose(hFile);
- }
- new bkey = PlayerInfo[playerid][pPbiskey];
- new hkey = PlayerInfo[playerid][pPhousekey];
- new playername[32];
- if(bkey != 255)
- {
- if(bkey >= 100)
- {
- strmid(SBizzInfo[bkey-100][sbOwner], name, 0, strlen(name), 255);
- }
- else
- {
- strmid(BizzInfo[bkey][bOwner], name, 0, strlen(name), 255);
- }
- }
- GetPlayerName(playerid, playername, sizeof(playername));
- if (hkey != 255 && strcmp(playername, HouseInfo[hkey][hOwner], true) == 0)
- {
- strmid(HouseInfo[hkey][hOwner], name, 0, strlen(name), 255);
- }
- OnPropUpdate();
- }
- else
- {
- SendClientMessage(playerid, COLOR_YELLOW, "CroHerze: Nemas account, acc mozes napravit tako da upises /regnick <password>");
- }
- if (gdebug){printf("DEBUG OnUpdatePlayer(%d)End", playerid);}
- return 1;
- }
- public OnPropUpdate()
- {
- if (gdebug >= 1){printf("| ZeroAS | DEBUG OnPropUpdate()");}
- new idx;
- new File: file2;
- while (idx < sizeof(HouseInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n", HouseInfo[idx][hEntrancex],
- HouseInfo[idx][hEntrancey],
- HouseInfo[idx][hEntrancez],
- HouseInfo[idx][hExitx],
- HouseInfo[idx][hExity],
- HouseInfo[idx][hExitz],
- HouseInfo[idx][hHealthx],
- HouseInfo[idx][hHealthy],
- HouseInfo[idx][hHealthz],
- HouseInfo[idx][hArmourx],
- HouseInfo[idx][hArmoury],
- HouseInfo[idx][hArmourz],
- HouseInfo[idx][hOwner],
- HouseInfo[idx][hDiscription],
- HouseInfo[idx][hValue],
- HouseInfo[idx][hHel],
- HouseInfo[idx][hArm],
- HouseInfo[idx][hInt],
- HouseInfo[idx][hLock],
- HouseInfo[idx][hOwned],
- HouseInfo[idx][hRooms],
- HouseInfo[idx][hRent],
- HouseInfo[idx][hRentabil],
- HouseInfo[idx][hTakings],
- HouseInfo[idx][hVec],
- HouseInfo[idx][hVcol1],
- HouseInfo[idx][hVcol2],
- HouseInfo[idx][hDate],
- HouseInfo[idx][hLevel],
- HouseInfo[idx][hWorld]);
- if(idx == 0)
- {
- file2 = fopen("property.cfg", io_write);
- }
- else
- {
- file2 = fopen("property.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- idx = 0;
- while (idx < sizeof(BizzInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%f,%f,%f,%d,%d,%d,%d,%d,%d,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
- BizzInfo[idx][bEntrancex],
- BizzInfo[idx][bEntrancey],
- BizzInfo[idx][bEntrancez],
- BizzInfo[idx][bExitx],
- BizzInfo[idx][bExity],
- BizzInfo[idx][bExitz],
- BizzInfo[idx][bHealthx],
- BizzInfo[idx][bHealthy],
- BizzInfo[idx][bHealthz],
- BizzInfo[idx][bArmourx],
- BizzInfo[idx][bArmoury],
- BizzInfo[idx][bArmourz],
- BizzInfo[idx][bOwner],
- BizzInfo[idx][bDiscription],
- BizzInfo[idx][bValue],
- BizzInfo[idx][bHel],
- BizzInfo[idx][bArm],
- BizzInfo[idx][bInt],
- BizzInfo[idx][bLock],
- BizzInfo[idx][bOwned],
- BizzInfo[idx][bEntcost],
- BizzInfo[idx][bTakings],
- BizzInfo[idx][bDate],
- BizzInfo[idx][bLevel],
- BizzInfo[idx][bProd],
- BizzInfo[idx][bProdCap],
- BizzInfo[idx][bComp],
- BizzInfo[idx][bCompCap],
- BizzInfo[idx][bProdCost],
- BizzInfo[idx][bPayComp],
- BizzInfo[idx][bPriceMod]);
- if(idx == 0)
- {
- file2 = fopen("bizz.cfg", io_write);
- }
- else
- {
- file2 = fopen("bizz.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- idx = 0;
- while (idx < sizeof(SBizzInfo))
- {
- new coordsstring[256];
- format(coordsstring, sizeof(coordsstring), "%f,%f,%f,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n",
- SBizzInfo[idx][sbEntrancex],
- SBizzInfo[idx][sbEntrancey],
- SBizzInfo[idx][sbEntrancez],
- SBizzInfo[idx][sbOwner],
- SBizzInfo[idx][sbDiscription],
- SBizzInfo[idx][sbValue],
- SBizzInfo[idx][sbHel],
- SBizzInfo[idx][sbArm],
- SBizzInfo[idx][sbInt],
- SBizzInfo[idx][sbLock],
- SBizzInfo[idx][sbOwned],
- SBizzInfo[idx][sbEntcost],
- SBizzInfo[idx][sbTakings],
- SBizzInfo[idx][sbDate],
- SBizzInfo[idx][sbLevel],
- SBizzInfo[idx][sbProd],
- SBizzInfo[idx][sbProdCap],
- SBizzInfo[idx][sbComp],
- SBizzInfo[idx][sbCompCap],
- SBizzInfo[idx][sbProdCost],
- SBizzInfo[idx][sbPayComp]);
- if(idx == 0)
- {
- file2 = fopen("sbizz.cfg", io_write);
- }
- else
- {
- file2 = fopen("sbizz.cfg", io_append);
- }
- fwrite(file2, coordsstring);
- idx++;
- fclose(file2);
- }
- return 1;
- }
- public BroadCast(color,const string[])
- {
- printf("%s", string);
- SendClientMessageToAll(color, string);
- return 1;
- }
- public ABroadCast(color,const string[],level)
- {
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- if ((IsPlayerAdmin(i)) || PlayerInfo[i][pAdmin] >= level)
- {
- SendClientMessage(i, color, string);
- printf("%s", string);
- }
- }
- }
- return 1;
- }
- public OOCOff(color,const string[])
- {
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && !gOoc[i])
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- public PlaySoundAll(playerid, soundid, Float:psx ,Float:psy ,Float:psz)
- {
- if (gdebug >= 1){printf("DEBUG PlaySoundAll(%d)", playerid);}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- PlayerPlaySound(i, soundid, psx, psy, psz);
- }
- }
- }
- public SendTeamMessage(team, color, string[])
- {
- if (gdebug >= 1){printf("DEBUG SendTeamMessage(%d)", team);}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && gTeam[i] == team)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- public SendTeamBeepMessage(team, color, string[])
- {
- if (gdebug >= 1){printf("DEBUG SendTeamMessage(%d)", team);}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && gTeam[i] == team)
- {
- SendClientMessage(i, color, string);
- RingTone[i] = 20;
- }
- }
- }
- public SendEnemyMessage(color, string[])
- {
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && gTeam[i] >= 3)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- public SendAdminMessage(color, string[])
- {
- if (gdebug >= 1){printf("DEBUG SendAdminMessage()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1 && PlayerInfo[i][pAdmin] > 1)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- public SendAdminSageMessage(color,const string[],level)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (PlayerInfo[i][pAdmin] >= level || PlayerInfo[i][pGameSage] >= level)
- {
- SendClientMessage(i, color, string);
- printf("%s", string);
- }
- }
- }
- return 1;
- }
- public SendSageMessage(color,const string[],level)
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if (PlayerInfo[i][pGameSage] >= level)
- {
- SendClientMessage(i, color, string);
- printf("%s", string);
- }
- }
- }
- return 1;
- }
- public PlayerPlayMusic(playerid)
- {
- if (gdebug >= 1){printf("DEBUG PlayerPlayMusic(%d)",playerid);}
- SetTimer("StopMusic", 5000, 0);
- PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
- }
- public StopMusic()
- {
- if (gdebug >= 1){printf("DEBUG StopMusic()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- PlayerPlaySound(i, 1069, 0.0, 0.0, 0.0);
- }
- }
- }
- public PlayerFixRadio(playerid)
- {
- if (gdebug >= 1){printf("DEBUG PlayerPlayMusic(%d)",playerid);}
- SetTimer("PlayerFixRadio2", 50, 0);
- PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
- Fixr[playerid] = 1;
- }
- public PlayerFixRadio2()
- {
- if (gdebug >= 1){printf("DEBUG StopMusic()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- if(Fixr[i])
- {
- PlayerPlaySound(i, 1069, 0.0, 0.0, 0.0);
- Fixr[i] = 0;
- }
- }
- }
- }
- public PlayJailSound(sound , stopsound, duration, Float:jailx, Float:jaily, Float:jailz)
- {
- if (gdebug >= 1){printf("DEBUG PlayJailSound()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- PlayerPlaySound(i, sound, jailx, jaily, jailz);
- //printf("startjail %d",i);
- stopsoundt = stopsound;
- jailxt = jailx;
- jailyt = jaily;
- jailzt = jailz;
- }
- }
- SetTimer("StopJail", duration, 0);
- }
- public StopJail()
- {
- if (gdebug >= 1){printf("DEBUG StopJail()");}
- for(new i = 0; i <= MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) == 1)
- {
- PlayerPlaySound(i, stopsoundt, jailxt, jailyt, jailzt);
- //printf("stopjail %d",i);
- }
- }
- }
- /* KOMANDE */
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (gdebug >= 1){printf("DEBUG OnPlayerCommandText(%d)",playerid);}
- CmdLog(cmdtext);
- new string[256];
- new playermoney;
- new sendername[MAX_PLAYER_NAME];
- new giveplayer[MAX_PLAYER_NAME];
- new playername[MAX_PLAYER_NAME];
- new cmd[256];
- new tmp[256];
- new giveplayerid, moneys, idx;
- cmd = strtok(cmdtext, idx);
- if (strcmp(cmd, "/getip", true)==0)
- {
- tmp=strtok(cmdtext,idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_YELLOW, "/getip [id]");
- return 1;
- }
- new id = strval(tmp);
- new ip[16];
- new pname[24];
- GetPlayerName(id,pname,sizeof(pname));
- GetPlayerIp(id,ip,15);
- new ipstr[255];
- format(ipstr,sizeof(ipstr),"%s | IP: %s",pname,ip);
- if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 2)
- SendClientMessage(playerid,COLOR_YELLOW,ipstr);
- return 1;
- }
- // -------------------report
- if(strcmp(cmd,"/report",true,6)==0)
- {
- if(PlayerInfo[playerid][pMuted] == 1)
- {
- new string[128];
- format(string, sizeof(string), "ZeroAS | Vi ste utisani! | Sekundi koliko ste jos utisani: %d", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 0;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/report [text]");
- return 1;
- }
- new report[256];
- new name[30];
- GetPlayerName(playerid,name,30);
- strmid(report,cmdtext,7,strlen(cmdtext));
- format(string,256," |R| %s[%d/BAL]: %s",name,playerid,report);
- SendAdminMessage(COLOR_ORANGE, string);
- format(string, sizeof(string), "*Vas report glasi: %s", report);
- SendClientMessage(playerid,COLOR_WHITE, string);
- SendClientMessage(playerid,COLOR_YELLOW,"*CroHerze: Hvala na upitu,admini ce odgovoriti u najkracem roku!");
- printf("%s",string);
- new File:reports;
- reports = fopen("report.txt",io_append);
- format(string,256,"%s\r\n",string);
- fwrite(reports,string);
- fclose(reports);
- return 1;
- }
- //-----------------fixcar - za admine -------------
- if (strcmp("/fixcar", cmdtext, true, 4) == 0)
- {
- if(IsPlayerInAnyVehicle(playerid) == 1)
- if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1338)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
- SendClientMessage(playerid,COLOR_LIGHTBLUE," |A| {FFFFFF}Uspjesno ste popravili vase vozilo!");
- printf("(auto popravka) igrac %s je popravio auto",sendername);
- }
- else
- {
- SendClientMessage(playerid,COLOR_GRAD2," Morate biti u vozilu da bi ga popravili ili niste Head Admin!");
- }
- return 1;
- }
- //-----------------fixcar - za admine -------------
- if (strcmp("/NEKORISTI2", cmdtext, true) == 0)
- {
- if (PlayerToPoint(3, playerid,-2494.7139,-603.2803,132.5625))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(IsPlayerInAnyVehicle(playerid) == 1)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- AddVehicleComponent(vehicleid,1010);//nitro x10
- SendClientMessage(playerid,COLOR_LIGHTBLUE,"Nitro ugradjen!");
- printf("(Nitro ugradjivanje) igrac %s je ugradio nitro kod drift staze",sendername);
- format(string, sizeof(string), "(Nitro ugradjivanje) igrac %s je ugradio nitro kod drift staze",sendername);
- SendAdminMessage(COLOR_PINK, string);
- }
- else
- {
- SendClientMessage(playerid,COLOR_LIGHTRED,"(Odbijeno){FFFFFF}Morate biti u vozilu!");
- }
- }
- else
- {
- SendClientMessage(playerid,COLOR_YELLOW,"Kod ikone za ugradnju moras bit(nalazi se na vrhu drift staze)");
- }
- return 1;
- }
- //--------------------health i armor---
- if (!strcmp(cmdtext, "/ha", true) || !strcmp(cmdtext, "/healtharmor", true) || !strcmp(cmdtext, "/stit", true))
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] >= 2)
- {
- SetPlayerHealth(playerid, 150);
- SetPlayerArmour(playerid, 100);
- SendClientMessage(playerid, COLOR_GREEN, "--- healt i armor dodani ---");
- return 1;
- }
- if((strcmp(cmdtext,"/nos",true)==0)||(strcmp(cmdtext,"/nitro",true)==0))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(GetPlayerMoney(playerid) < 50000)
- {
- if(IsPlayerInAnyVehicle(playerid) == 1)
- {
- GivePlayerMoney(playerid,-50000);
- SendClientMessage(playerid,COLOR_LIGHTRED,"Kupili ste Nitro za vase vozilo!");
- AddVehicleComponent(vehicleid,1010);
- }
- else
- {
- SendClientMessage(playerid,COLOR_LIGHTRED,"(Odbijeno){FFFFFF}Morate biti u vozilu!");
- }
- }
- else
- {
- SendClientMessage(playerid,COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Nemate Dovoljno novaca!");
- }
- return 1;
- }
- //----------------------
- if((strcmp(cmdtext,"/iddad",true)==0)||(strcmp(cmdtext,"/god",true)==0))
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdmin] == 1338)
- {
- if(God[playerid] == 0)
- {
- God[playerid] = 1;
- SendClientMessage(playerid,COLOR_GREEN,"GODMODE ON");
- }
- else
- {
- God[playerid] = 0;
- SendClientMessage(playerid,COLOR_RED,"GODMODE OFF");
- SetPlayerHealth(playerid, 100);
- }
- }
- else
- {
- SendClientMessage(playerid,COLOR_RED,"{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
- }
- return 1;
- }
- //-------------------------------[Pay]--------------------------------------------------------------------------
- if(strcmp(cmd, "/pay", true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/pay [Korisnicki ID ili Ime Korisnika] [kolicina]");
- return 1;
- }
- if(IsStringAName(tmp))
- {
- giveplayerid = GetPlayerID(tmp);
- }
- else
- {
- giveplayerid = strval(tmp);
- }
- if(PlayerInfo[giveplayerid][pLocal] == 106)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Nije dopusteno na ovoj lokaciji");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/pay [Korisnicki ID ili Ime Korisnika] [kolicina]");
- return 1;
- }
- moneys = strval(tmp);
- if(moneys > 1000 && PlayerInfo[playerid][pLevel] < 3)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF}Morate biti lv3 da platite preko 1000");
- return 1;
- }
- //if (gdebug){printf("DEBUG givecash_command: %d %d",giveplayerid,moneys);}
- if (IsPlayerConnected(giveplayerid))
- {
- if (ProxDetectorS(5.0, playerid, giveplayerid))
- {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- playermoney = GetPlayerMoney(playerid);
- if (moneys > 0 && playermoney >= moneys)
- {
- GivePlayerMoney(playerid, (0 - moneys));
- GivePlayerMoney(giveplayerid, moneys);
- format(string, sizeof(string), " Poslao si %s(Igrac: %d), $%d.", giveplayer,giveplayerid, moneys);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- format(string, sizeof(string), " Primio si $%d od %s(Igrac: %d).", moneys, sendername, playerid);
- SendClientMessage(giveplayerid, COLOR_GRAD1, string);
- printf(">>>(transakcija) %s je platio $%d igracu %s", sendername, moneys, giveplayer);
- format(string, sizeof(string), "*%s vadi novcanik i daje novce igracu %s", sendername, giveplayer);
- SendClientMessage(giveplayerid, COLOR_PINK, string);
- PayLog(string);
- if(moneys >= 100000)
- {
- ABroadCast(COLOR_YELLOW,string,1);
- }
- PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
- printf(">>>(transakcija) %s je uzeo nesto casha i dao igracu %s.", sendername ,giveplayer);
- format(string, sizeof(string), "* %s je uzeo nesto casha i dao igracu %s.", sendername ,giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Pogresna transakcija.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Predaleko si.");
- }
- }
- else
- {
- format(string, sizeof(string), " %d nije aktivan igrac.", giveplayerid);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- return 1;
- }
- if(strcmp(cmd, "/charity", true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/charity [suma]");
- return 1;
- }
- if(PlayerInfo[giveplayerid][pLocal] == 106)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Nije dopusteno na ovoj lokaciji");
- return 1;
- }
- moneys = strval(tmp);
- if(moneys < 0)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Nije dovoljno.");
- return 1;
- }
- GivePlayerMoney(playerid, (-moneys));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "%s Hvala na vasoj donaciji koja iznosi $%d.",sendername, moneys);
- printf("%s", string);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- PayLog(string);
- return 1;
- }
- //-------------------------------[Register]--------------------------------------------------------------------------
- if (strcmp(cmd, "/badafjf", true)==0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "{66CCEE}CroHerze: {FFFFFF}Vec si logiran!");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), "%s.ini", sendername);
- new File: hFile = fopen(string, io_read);
- if (hFile)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {C3C3C3}Taj nick vec postoji, molimo izaberite drugi!");
- fclose(hFile);
- return 1;
- }
- new tmppass[64];
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Koristite: /regnafsfick [sifra]");
- return 1;
- }
- strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
- Encript(tmppass);
- OnPlayerRegister(playerid,tmppass);
- }
- return 1;
- }
- //-------------------------------[Register]--------------------------------------------------------------------------
- if (strcmp(cmd, "/changepass", true)==0)
- {
- tmp = strtok(cmdtext, idx);
- if (gPlayerLogged[playerid] != 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Nisi Logiran");
- return 1;
- }
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/changepass [nova sifra]");
- return 1;
- }
- strmid(PlayerInfo[playerid][pKey], tmp, 0, strlen(cmdtext), 255);
- format(string, sizeof(string), "Vasa nova lozinka je {66CCEE}%s{FFFFFF} , nemojte ju zaboraviti.", PlayerInfo[playerid][pKey]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- Encript(PlayerInfo[playerid][pKey]);
- OnUpdatePlayer(playerid);
- GetPlayerName(playerid, playername, sizeof(playername));
- printf("%s je promijenio lozinku.", playername);
- return 1;
- }
- //-------------------------------[Level]--------------------------------------------------------------------------
- if(strcmp(cmd, "/stats", true) == 0 || strcmp(cmd, "/ucp", true) == 0)
- {
- if (gPlayerLogged[playerid] != 0)
- {
- PrintPlayerWeapons(playerid,playerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Nisi logiran");
- }
- return 1;
- }
- if(strcmp(cmd, "/up", true) == 0)
- {
- if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly, slz+2);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
- }
- return 1;
- }
- if (strcmp(cmd, "/fly", true) == 0)
- {
- if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 2)
- {
- new Float:px, Float:py, Float:pz, Float:pa;
- GetPlayerFacingAngle(playerid,pa);
- if(pa >= 0.0 && pa <= 22.5) //n1
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px, py+30, pz+5);
- }
- if(pa >= 332.5 && pa < 0.0) //n2
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px, py+30, pz+5);
- }
- if(pa >= 22.5 && pa <= 67.5) //nw
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px-15, py+15, pz+5);
- }
- if(pa >= 67.5 && pa <= 112.5) //w
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px-30, py, pz+5);
- }
- if(pa >= 112.5 && pa <= 157.5) //sw
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px-15, py-15, pz+5);
- }
- if(pa >= 157.5 && pa <= 202.5) //s
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px, py-30, pz+5);
- }
- if(pa >= 202.5 && pa <= 247.5)//se
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px+15, py-15, pz+5);
- }
- if(pa >= 247.5 && pa <= 292.5)//e
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px+30, py, pz+5);
- }
- if(pa >= 292.5 && pa <= 332.5)//e
- {
- GetPlayerPos(playerid, px, py, pz);
- SetPlayerPos(playerid, px+15, py+15, pz+5);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
- }
- return 1;
- }
- if(strcmp(cmd, "/lt", true) == 0)
- {
- if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly+2, slz);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
- }
- return 1;
- }
- if(strcmp(cmd, "/rt", true) == 0)
- {
- if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1)
- {
- new Float:slx, Float:sly, Float:slz;
- GetPlayerPos(playerid, slx, sly, slz);
- SetPlayerPos(playerid, slx, sly-2, slz-2);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
- }
- return 1;
- }
- //-------------------------------[Stats]--------------------------------------------------------------------------
- if (strcmp(cmd, "/provjeri", true) == 0)
- {
- if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 1)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}/provjeri [Korisnicki ID ili Ime Korisnika]");
- return 1;
- }
- if(IsStringAName(tmp))
- {
- giveplayerid = GetPlayerID(tmp);
- }
- else
- {
- giveplayerid = strval(tmp);
- }
- if(IsPlayerConnected(giveplayerid))
- {
- PrintPlayerprovjeri(playerid,giveplayerid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Krivi ID!");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "{FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
- }
- }
- if (strcmp(cmd, "/nekoristidanumber", true) == 0)
- {
- if (gPhoneBook[playerid] == 1)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Koristite: /nekoristinumber [Korisnicki ID ili Ime Korisnika]");
- return 1;
- }
- if(IsStringAName(tmp))
- {
- giveplayerid = GetPlayerID(tmp);
- }
- else
- {
- giveplayerid = strval(tmp);
- }
- if(IsPlayerConnected(giveplayerid))
- {
- GetPlayerName(giveplayerid, sendername, sizeof(sendername));
- format(string, 256, "Name: %s, Ph: %d",sendername,PlayerInfo[giveplayerid][pPnumber]);
- SendClientMessage(playerid, COLOR_GRAD1, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " nema takvog igraca");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Nemas telefonski imenik");
- }
- }
- //-------------------------------[BuyLevel]--------------------------------------------------------------------------
- if (strcmp(cmd, "/buylevel", true) == 0)
- {
- if (gPlayerLogged[playerid] != 0)
- {
- PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);//
- if (gdebug){printf("DEBUG buylev cash = %d", PlayerInfo[playerid][pCash]);}
- if(PlayerInfo[playerid][pLevel] >= 0)
- {
- new nxtlevel = PlayerInfo[playerid][pLevel]+1;
- new costlevel = nxtlevel*levelcost;//10k for testing purposes
- new expamount = nxtlevel*levelexp;
- new infostring[256];
- if (PlayerInfo[playerid][pCash] < costlevel)
- {
- format(infostring, 256, "{F81414}(Odbijeno){FFFFFF} Nemate dovoljno novaca ($%d)",costlevel);
- SendClientMessage(playerid, COLOR_GRAD1, infostring);
- }
- if (PlayerInfo[playerid][pExp] < expamount)
- {
- format(infostring, 256, " Trebas %d Experiance poena, Trenutno imas [%d]",expamount,PlayerInfo[playerid][pExp]);
- SendClientMessage(playerid, COLOR_GRAD1, infostring);
- }
- else
- {
- format(infostring, 256, "[Level++] Cestitamo presli ste na novi level! Vas level je sada: %d", nxtlevel);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- PlayerPlayMusic(playerid);
- GivePlayerMoney(playerid, (-costlevel));
- PlayerInfo[playerid][pLevel]++;
- PlayerInfo[playerid][pExp] = 0;
- PlayerInfo[playerid][gPupgrade] = PlayerInfo[playerid][gPupgrade]+2;
- SendClientMessage(playerid, COLOR_LIGHTBLUE, infostring);
- }
- }
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Niste logirani");
- }
- }
- //-------------------------------[UPGRADE]--------------------------------------------------------------------------
- if (strcmp(cmd, "/carcolor", true) == 0)
- {
- new house = PlayerInfo[playerid][pPhousekey];
- GetPlayerName(playerid, playername, sizeof(playername));
- if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ORANGE,"Koristite: {FFFFFF}/carcolor [color 1 - 2] [color number]");
- return 1;
- }
- new colornum = strval(tmp);
- if(colornum > 2 || colornum < 1)
- {
- SendClientMessage(playerid, COLOR_GRAD3,"Choices are 1 or 2");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ORANGE,"Koristite: {FFFFFF}/carcolor [color 1 - 2] [color number]");
- }
- new color = strval(tmp);
- if(color > 126)
- {
- SendClientMessage(playerid, COLOR_GRAD3,"Maximum is 126");
- return 1;
- }
- if (GetPlayerMoney(playerid) < 5000)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Ne mozete si priustiti ($5000)");
- }
- if(colornum == 1)
- {
- HouseInfo[house][hVcol1] = color;
- format(string, sizeof(string), "Boja auta 1 je %d -$5000",color);
- SendClientMessage(playerid, COLOR_GRAD3,string);
- }
- else
- {
- HouseInfo[house][hVcol2] = color;
- format(string, sizeof(string), "Boja auta 2 je %d -$5000",color);
- SendClientMessage(playerid, COLOR_GRAD3,string);
- }
- SendClientMessage(playerid, COLOR_GRAD6, "Bojanje ce biti kompletirano u roku 24 sata");
- GivePlayerMoney(playerid,-5000);
- SBizzInfo[6][sbTakings] = SBizzInfo[6][sbTakings]+5000;
- PlayerPlaySound(giveplayerid, 1134, 0.0, 0.0, 0.0);
- OnPropUpdate();
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " Ne posjedujes kucu");
- return 1;
- }
- return 1;
- }
- if(!strcmp(cmdtext, "/carupgrade", true))
- { new house = PlayerInfo[playerid][pPhousekey];
- if (house != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
- {
- ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "{33BBFF}Kucna Vozila", "Infernus($350000)\nTurismo($300000)\nElegy($100000)\nJester($200000)\nSultan($150000)\nMonster($400000)\nHotring($450000)", "Kupi", "Odustani");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "(Odbijeno) {FFFFFF}Ne posjedujete kucu");
- return 1;
- }
- }
- if (strcmp(cmd, "/resetupgrades", true) == 0)
- {
- if (gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Nisi logiran");
- return 1;
- }
- if (GetPlayerMoney(playerid) < 100000)
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Cijena je $100000");
- return 1;
- }
- if (PlayerInfo[playerid][pLevel] < 2)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Morate biti najmanje lv2");
- return 1;
- }
- PlayerInfo[playerid][gPupgrade] = (PlayerInfo[playerid][pLevel]-1)*2;
- PlayerInfo[playerid][pGun1] = 0;
- PlayerInfo[playerid][pGun2] = 0;
- PlayerInfo[playerid][pGun3] = 0;
- PlayerInfo[playerid][pGun4] = 0;
- PlayerInfo[playerid][pGun5] = 0;
- PlayerInfo[playerid][pGun6] = 0;
- PlayerInfo[playerid][pAmmo1] = 200;
- PlayerInfo[playerid][pAmmo2] = 8;
- PlayerInfo[playerid][pAmmo3] = 30;
- PlayerInfo[playerid][pAmmo4] = 30;
- PlayerInfo[playerid][pAmmo5] = 10;
- PlayerInfo[playerid][pAmmo6] = 10;
- PlayerInfo[playerid][pSHealth] = 0.0;
- GivePlayerMoney(playerid,-100000);
- //SBizzInfo[6][sbTakings] = SBizzInfo[6][sbTakings]+100000;
- PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
- format(string, 256, " Imas %d nepotrosenih Upgrade poena",PlayerInfo[playerid][gPupgrade]);
- SendClientMessage(playerid, COLOR_GRAD2, string);
- }
- if(strcmp(cmd, "/bestbuy", true) == 0)
- {
- new tmpprice;
- new store;
- if(Locator[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "nemas taj uredjaj");
- return 1;
- }
- for(new i = 0; i < sizeof(BizzInfo); i++)
- {
- if(BizzInfo[i][bPriceMod] < tmpprice && BizzInfo[i][bEntcost] == 0 && BizzInfo[i][bProd] > 0)
- {
- tmpprice = BizzInfo[i][bPriceMod];
- store = i;
- }
- for(new j = 0; j < sizeof(BizzInfo); j++)
- {
- if(BizzInfo[j][bPriceMod] < tmpprice && BizzInfo[j][bEntcost] == 0 && BizzInfo[j][bProd] > 0)
- {
- tmpprice = BizzInfo[j][bPriceMod];
- store = j;
- }
- }
- }
- SetPlayerCheckpoint(playerid,BizzInfo[store][bEntrancex], BizzInfo[store][bEntrancey], BizzInfo[store][bEntrancez], 4.0);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME;
- GameTextForPlayer(playerid, "~w~Waypoint postavljen na ~r~Best Buy", 5000, 1);
- return 1;
- }
- if(strcmp(cmd, "/bestsale", true) == 0)
- {
- new tmpprice = 0;
- new store = 255;
- if(Locator[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GRAD2, "nemas taj uredjaj");
- return 1;
- }
- for(new i = 0; i < sizeof(BizzInfo); i++)
- {
- if(BizzInfo[i][bPayComp] > tmpprice && BizzInfo[i][bCompCap] > BizzInfo[i][bComp] && BizzInfo[i][bTakings] > BizzInfo[i][bPayComp])
- {
- tmpprice = BizzInfo[i][bPayComp];
- store = i;
- }
- for(new j = 0; j < sizeof(BizzInfo); j++)
- {
- if(store != 255 && BizzInfo[j][bPayComp] > tmpprice && BizzInfo[j][bCompCap] > BizzInfo[j][bComp] && BizzInfo[j][bTakings] > BizzInfo[j][bPayComp])
- {
- tmpprice = BizzInfo[j][bPayComp];
- store = j;
- }
- }
- }
- if(store == 255)
- {
- GameTextForPlayer(playerid, "~w~nema prodaja za tebe.", 5000, 1);
- return 1;
- }
- SetPlayerCheckpoint(playerid,BizzInfo[store][bEntrancex], BizzInfo[store][bEntrancey], BizzInfo[store][bEntrancez], 4.0);
- gPlayerCheckpointStatus[playerid] = CHECKPOINT_HOME;
- GameTextForPlayer(playerid, "~w~Waypoint postavljen na ~r~Best Sale", 5000, 1);
- return 1;
- }
- if(!strcmp(cmdtext, "/oruzje", true))
- {
- new location = PlayerInfo[playerid][pLocal];
- if(location < 99 || location == 255)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Niste u trgovini oruzjem!");
- return 1;
- }
- new mod = (BizzInfo[location-99][bPriceMod]);
- ShowPlayerDialog(playerid, 14, DIALOG_STYLE_LIST, "{33BBFF}Trgovina oruzjem", "Noz($40)\nPadobran($50)\nPistolj 9mm($80)\nPistolj 9mm tihi($100)\nDesert Eagle($150)\nSawnOff($200)\nSMG-MP5($250)\nAK47($400)\nM4($420)\nTec-9($450)", "Kupi", "Odustani");
- return 1;
- }
- if (strcmp(cmd, "/upgrade", true) == 0)
- {
- new gunid[16];
- new infostring[256];
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- format(string, sizeof(string), "{FFBB00}Koristite: {FFFFFF}/upgrade [ime upgradea] (Imate %d Upgrade poena)",PlayerInfo[playerid][gPupgrade]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE,"__________________________________________________");
- SendClientMessage(playerid, COLOR_LIGHTRED,"UPGRADEOVI");
- SendClientMessage(playerid, COLOR_GRAD2,string);
- if(PlayerInfo[playerid][pLevel] == 2)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 2 Oruzja: sdpistol colt45");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo");
- }
- else if(PlayerInfo[playerid][pLevel] == 3)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 3 Oruzja: sdpistol colt45 mp5");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo smgammo");
- }
- else if(PlayerInfo[playerid][pLevel] == 4)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 4 Oruzja: sdpistol colt45 mp5 shotgun");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo");
- }
- else if(PlayerInfo[playerid][pLevel] == 5)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 5 Oruzja: sdpistol colt45 mp5 shotgun spas12");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo");
- }
- else if(PlayerInfo[playerid][pLevel] == 6)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 6 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo");
- }
- else if(PlayerInfo[playerid][pLevel] == 7)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 7 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo");
- }
- else if(PlayerInfo[playerid][pLevel] == 8)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 8 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo");
- }
- else if(PlayerInfo[playerid][pLevel] == 9)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 9 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff tec9 ak47");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo assaultammo");
- }
- else if(PlayerInfo[playerid][pLevel] == 10)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 10 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff tec9 ak47 m4");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo assaultammo");
- }
- else if(PlayerInfo[playerid][pLevel] == 11)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 11 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff tec9 ak47 m4 rifle");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo assaultammo rifleammo");
- }
- else if(PlayerInfo[playerid][pLevel] == 12)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Level 12 Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff tec9 ak47 m4 rifle flamethrower");
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo assaultammo rifleammo heavyammo");
- }
- else if(PlayerInfo[playerid][pLevel] >= 13)
- {
- format(infostring, 256, "Level %d Oruzja: sdpistol colt45 mp5 shotgun spas12 deagle uzi sawnoff tec9 ak47 m4 rifle",PlayerInfo[playerid][pLevel]);
- SendClientMessage(playerid, COLOR_WHITE, "Dodatna Municija: pistolammo shotgunammo smgammo assaultammo rifleammo heavyammo");
- SendClientMessage(playerid, COLOR_WHITE, infostring);
- }
- SendClientMessage(playerid, COLOR_WHITE, "Dodatni Health: health");
- SendClientMessage(playerid, COLOR_LIGHTBLUE,"__________________________________________________");
- return 1;
- }
- strmid(gunid, tmp, 0, strlen(cmdtext), 255);
- if (PlayerInfo[playerid][gPupgrade] > 0)
- {
- if (PlayerInfo[playerid][pLevel] >= 5 && (strcmp(gunid, "parachute", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s parachute");
- PlayerInfo[playerid][pGun5] = 46;
- }
- else if (PlayerInfo[playerid][pLevel] >= 11 && (strcmp(gunid, "rifle", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s rifle");
- PlayerInfo[playerid][pGun5] = 33;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "m4", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati sn m4");
- PlayerInfo[playerid][pGun4] = 31;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "golfclub", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s golfclub");
- PlayerInfo[playerid][pGun6] = 2;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "nightstick", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s nightstick");
- PlayerInfo[playerid][pGun6] = 3;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "knife", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s knife");
- PlayerInfo[playerid][pGun6] = 4;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "baseballbat", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s baseballbat");
- PlayerInfo[playerid][pGun6] = 5;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "shovel", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s shovel");
- PlayerInfo[playerid][pGun6] = 6;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "poolcue", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s poolcue");
- PlayerInfo[playerid][pGun6] = 7;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "purpledildo", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s purpledildo");
- PlayerInfo[playerid][pGun6] = 10;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "whitedildo", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s whitedildo");
- PlayerInfo[playerid][pGun6] = 11;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "longwhitedildo", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s longwhitedildo");
- PlayerInfo[playerid][pGun6] = 12;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "whitedildo2", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s whitedildo2");
- PlayerInfo[playerid][pGun6] = 13;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "flowers", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "New Upgrade: You Will Now Spawn With flowers");
- PlayerInfo[playerid][pGun6] = 14;
- }
- else if (PlayerInfo[playerid][pLevel] >= 10 && (strcmp(gunid, "cane", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s cane");
- PlayerInfo[playerid][pGun6] = 15;
- }
- else if (PlayerInfo[playerid][pLevel] >= 9 && (strcmp(gunid, "ak47", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati sn ak47");
- PlayerInfo[playerid][pGun4] = 30;
- }
- else if (PlayerInfo[playerid][pLevel] >= 9 && (strcmp(gunid, "Tec9", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s Tec9");
- PlayerInfo[playerid][pGun3] = 32;
- }
- else if (PlayerInfo[playerid][pLevel] >= 8 && (strcmp(gunid, "sawnoff", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s sawnoff");
- PlayerInfo[playerid][pGun2] = 26;
- }
- else if (PlayerInfo[playerid][pLevel] >= 7 && (strcmp(gunid, "uzi", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "SNovi dodatak: sad ce se spawnati sn uzi");
- PlayerInfo[playerid][pGun3] = 28;
- }
- else if (PlayerInfo[playerid][pLevel] >= 6 && (strcmp(gunid, "deagle", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s deagle");
- PlayerInfo[playerid][pGun1] = 24;
- }
- else if (PlayerInfo[playerid][pLevel] >= 5 && (strcmp(gunid, "spas12", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s spas12");
- PlayerInfo[playerid][pGun2] = 27;
- }
- else if (PlayerInfo[playerid][pLevel] >= 4 && (strcmp(gunid, "shotgun", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s shotgun");
- PlayerInfo[playerid][pGun2] = 25;
- }
- else if (PlayerInfo[playerid][pLevel] >= 3 && (strcmp(gunid, "mp5", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati sn mp5");
- PlayerInfo[playerid][pGun3] = 29;
- }
- else if (PlayerInfo[playerid][pLevel] >= 2 && (strcmp(gunid, "colt45", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati s colt45");
- PlayerInfo[playerid][pGun1] = 22;
- }
- else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "sdpistol", true, strlen(gunid)) == 0))
- {
- SendClientMessage(playerid, COLOR_GRAD6, "Novi dodatak: sad ce se spawnati sn sdpistol");
- PlayerInfo[playerid][pGun1] = 23;
- }
- else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "pistolammo", true, strlen(gunid)) == 0))
- {
- PlayerInfo[playerid][pAmmo1] = PlayerInfo[playerid][pAmmo1]+50;
- format(infostring, 256, "New Upgrade: You Will Now Spawn With %d Pistol Ammo (+50)",PlayerInfo[playerid][pAmmo1]);
- SendClientMessage(playerid, COLOR_GRAD6, infostring);
- }
- else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "shotgunammo", true, strlen(gunid)) == 0))
- {
- PlayerInfo[playerid][pAmmo2] = PlayerInfo[playerid][pAmmo2]+50;
- format(infostring, 256, "New Upgrade: You Will Now Spawn With %d Shotgun Ammo (+50)",PlayerInfo[playerid][pAmmo2]);
- SendClientMessage(playerid, COLOR_GRAD6, infostring);
- }
- else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "smgammo", true, strlen(gunid)) == 0))
- {
- PlayerInfo[playerid][pAmmo3] = PlayerInfo[playerid][pAmmo3]+100;
- format(infostring, 256, "New Upgrade: You Will Now Spawn With %d SMG Ammo (+100)",PlayerInfo[playerid][pAmmo3]);
- SendClientMessage(playerid, COLOR_GRAD6, infostring);
- }
- else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "assaultammo", true, strlen(gunid)) == 0))
- {
- PlayerInfo[playerid][pAmmo4] = PlayerInfo[playerid][pAmmo4]+50;
- format(infostring, 256, "New Upgrade: You Will Now Spawn With %d Assault Ammo (+50)",PlayerInfo[playerid][pAmmo4]);
- SendClientMessage(playerid, COLOR_GRAD6, infostring);
- }
- else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "rifleammo", true, strlen(gunid)) == 0))
- {
- PlayerInfo[playerid][pAmmo5] = PlayerInfo[playerid][pAmmo5]+10;
- format(infostring, 256, "New Upgrade: You Will Now Spawn With %d Rifleammo Ammo (+10)",PlayerInfo[playerid][pAmmo5]);
- SendClientMessage(playerid, COLOR_GRAD6, infostring);
- }
- else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "heavyammo", true, strlen(gunid)) == 0))
- {
- PlayerInfo[playerid][pAmmo6] = PlayerInfo[playerid][pAmmo6]+10;
- format(infostring, 256, "New Upgrade: You Will Now Spawn With %d Heavyammo Ammo (+50)",PlayerInfo[playerid][pAmmo6]);
- SendClientMessage(playerid, COLOR_GRAD6, infostring);
- }
- else if (PlayerInfo[playerid][pLevel] >= 1 && (strcmp(gunid, "health", true, strlen(gunid)) == 0))
- {
- if (PlayerInfo[playerid][pSHealth] < 100)
- {
- PlayerInfo[playerid][pSHealth] = PlayerInfo[playerid][pSHealth]+5.0;
- format(infostring, 256, "Novi dodatak: sad ces se spavnati s %.2f Health (+5)",PlayerInfo[playerid][pSHealth]+50);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " Imas maksimalni spawn Health!");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " Nepoznata nadogranja");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD6, " Imas 0 Upgrade poena");
- return 1;
- }
- SetPlayerWeapons(playerid);
- PlayerInfo[playerid][gPupgrade]--;
- return 1;
- }
- //-------------------------------[Login]--------------------------------------------------------------------------
- if (strcmp(cmd, "/ložfgin", true) ==0 )
- {
- if(IsPlayerConnected(playerid))
- {
- new tmppass[64];
- if(gPlayerLogged[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "{66CCEE}CroHerze: {FFFFFF}Vec ste logirani!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Koristite: /ložfagin [sifra]");
- return 1;
- }
- strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
- Encript(tmppass);
- OnPlayerLogin(playerid,tmppass);
- }
- return 1;
- }
- //--------------------------------------------------------------------------------------
- if(strcmp(cmd,"/Otvori",true)==0)
- {
- if(PlayerInfo[playerid][pMember] == 9||PlayerInfo[playerid][pLeader] == 9)
- {
- MoveDynamicObject(BMK, 1282.3792724609, -2056.4567871094, 54.976421356201, 2.0);
- SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Otvaras vrata u BM BAZI!");
- }
- else if(PlayerInfo[playerid][pMember] == 8||PlayerInfo[playerid][pLeader] == 8)
- {
- MoveDynamicObject(RMK, 1642.8372802734, -1707.1586914063, 22.73189163208, 2.0);
- SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Otvaras vrata u RM BAZI!");
- }
- else if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
- {
- MoveDynamicObject(GMK, 2443.83984375, -1658.8203125, 9.4607181549072, 2.0);
- SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Otvaras vrata u GM BAZI!");
- }
- else if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
- {
- MoveDynamicObject(FAK, 1244.9997558594, -757.40399169922, 89.317375183105, 2.0);
- SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Otvaras vrata u FA BAZI!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Niste clan organizacije/bande !");
- }
- return 1;
- }
- if(strcmp(cmd,"/Zatvori",true)==0)
- {
- if(PlayerInfo[playerid][pMember] == 9||PlayerInfo[playerid][pLeader] == 9)
- {
- MoveDynamicObject(BMK, 1282.37890625, -2056.4560546875, 60.626445770264, 2.0);
- SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Zatvaras vrata u BM BAZI!");
- }
- else if(PlayerInfo[playerid][pMember] == 8||PlayerInfo[playerid][pLeader] == 8)
- {
- MoveDynamicObject(RMK, 1642.8533935547, -1714.8718261719, 22.73189163208, 2.0);
- SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Zatvaras vrata u RM BAZI!");
- }
- else if(PlayerInfo[playerid][pMember] == 5||PlayerInfo[playerid][pLeader] == 5)
- {
- MoveDynamicObject(GMK, 2443.83984375, -1658.8203125, 15.085716247559, 2.0);
- SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Zatvaras vrata u GM BAZI!");
- }
- else if(PlayerInfo[playerid][pMember] == 6||PlayerInfo[playerid][pLeader] == 6)
- {
- MoveDynamicObject(FAK, 1244.9997558594, -757.40399169922, 94.96736907959, 2.0);
- SendClientMessage(playerid, COLOR_WHITE, "{99CCDD}(Vrata) Zatvaras vrata u FA BAZI!");
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Niste clan organizacije/bande !");
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------
- if(strcmp(cmd, "/sethp", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /sethp [Korisnicki ID ili Ime Korisnika] [HP]");
- return 1;
- }
- new playa;
- new health;
- playa = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- health = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 3)
- {
- if(IsPlayerConnected(playa))
- {
- if(playa != INVALID_PLAYER_ID)
- {
- SetPlayerHealth(playa, health);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " {FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
- }
- }
- return 1;
- }
- //----------------------------------[ooc]-----------------------------------------------
- if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
- {
- if(PlayerInfo[playerid][pMuted] == 1)
- {
- new string[128];
- format(string, sizeof(string), "ZeroAS | Vi ste utisani! | Sekundi koliko ste jos utisani: %d", PlayerInfo[playerid][pMuteTime], (PlayerInfo[playerid][pMuteTime]/60));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 0;
- }
- if(IsPlayerConnected(playerid))
- {
- if(gPlayerLogged[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED,"(Odbijeno){FFFFFF} Niste logirani!");
- return 1;
- }
- if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, " (Odbijeno) {C3C3C3}OOC kanal je iskljucen od strane admina!");
- return 1;
- }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_ORANGE, "Koristite: {FFFFFF}(/o)oc [ooc chat]");
- return 1;
- }
- format(string, sizeof(string), "(( %s: %s ))", sendername, result);
- OOCOff(COLOR_ORANGE,string);
- printf("%s", string);
- }
- return 1;
- }
- if(strcmp(cmd, "/noooc", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 1 && (!noooc))
- {
- noooc = 1;
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), " OOC kanal je iskljucen od %s", sendername);
- SendClientMessageToAll(COLOR_GRAD2, string);
- }
- else if (PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
- {
- noooc = 0;
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, sizeof(string), " OOC kanal je ukljucen od %s", sendername);
- SendClientMessageToAll(COLOR_GRAD2, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " {FFFFFF}[{F81414}ZeroAS{FFFFFF}]{CCCCCC}Admini samo!");
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/speedo", true) == 0)
- {
- if (gSpeedo[playerid] == 1)
- {
- gSpeedo[playerid] = 2;
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~on", 5000, 5);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- }
- else if (gSpeedo[playerid] == 2)
- {
- gSpeedo[playerid] = 1;
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~off", 5000, 5);
- PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, "nemas speedometer");
- }
- return 1;
- }
- //----------------------------------[advertise]-----------------------------------------------
- if(strcmp(cmd, "/NEKORISTI3", true) == 0 || strcmp(cmd, "/NEKORISTI1", true) == 0)
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Koristite: (/ad)vertise [advert text]");
- return 1;
- }
- if ((noooc) && (PlayerInfo[playerid][pAdmin] < 1))
- {
- SendClientMessage(playerid, COLOR_GRAD2, " advertisment kanal je onemogucen od Admina");
- return 1;
- }
- if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
- {
- format(string, sizeof(string), " Molimo pokusajte za %d sekundi", (addtimer/1000));
- SendClientMessage(playerid, COLOR_GRAD2, string);
- return 1;
- }
- format(string, sizeof(string), "Plavi Oglasnik: %s, Kontakt: %s Mob: %d", result, sendername,PlayerInfo[playerid][pPnumber]);
- OOCOff(TEAM_GROVE_COLOR,string);
- if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
- printf("%s", string);
- return 1;
- }
- //----------------------------------[togooc]-----------------------------------------------
- if(strcmp(cmd, "/togooc", true) == 0)
- if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >=4)
- {
- if (!gOoc[playerid])
- {
- gOoc[playerid] = 1;
- SendClientMessage(playerid, COLOR_GRAD2, " ooc chat kanal onemogucen");
- }
- else if (gOoc[playerid])
- {
- (gOoc[playerid] = 0);
- SendClientMessage(playerid, COLOR_GRAD2, " ooc chat kanal omogucen");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment