Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <YSI\y_ini>
- #include <zcmd>
- #include <dini>
- #include <string>
- #include <core>
- #include <dutils>
- #include <dudb>
- new gTeam[MAX_PLAYERS];
- #define CIVILIAN 0//
- forward SetupPlayerForClassSelection(playerid);
- forward SetPlayerTeamFromClass(playerid,classid);
- forward StreamerCheck();
- forward SetAreaWeather(areaid, weatherid);
- forward GetAreaWeather(areaid, weatherid);
- forward GetPlayerWeatherArea(playerid);
- forward GetPlayerWeather(playerid);
- forward Counting(playerid);
- forward Counting2(playerid);
- forward Counting1(playerid);
- forward CountingGO(playerid);
- forward IsAtFishPlace(playerid);
- forward FishTime(playerid);
- forward SendRPMessage(playerid, Float:radius, color, string[]);
- forward StopFish(playerid);
- forward UnJail(pId);
- forward UnJail2(playerid);
- forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
- forward ExpireRoadblock(blockid);
- forward IsValidName(playerid);
- forward NeedToEat(playerid);
- #pragma unused ret_memcpy
- #define yellow 0xDABB3EAA
- #define white 0xFFFFFFAA
- #define green 0x33AA33AA
- #define red 0xAA3333AA
- #define blue 0x5D00FFFF
- #define purple 0xC2A2DAAA
- #define gray 0x808080FF
- #define aqua 0x00FFFFFF
- #define royalblue 0x4169E1FF
- #define pink 0xFFC0CBFF
- //Colors
- #define COLOR_INTERFACE_BODY 0xFDE39DAA
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW2 0xF5DEB3AA
- #define COLOR_GREENYELLOW 0xADFF2FFF
- #define COL_WHITE "{FFFFFF}"
- #define COL_RED "{F81414}"
- #define COL_GREEN "{00FF22}"
- #define COL_LIGHTBLUE "{00CED1}"
- #define COLOR_RED 0xAA3333AA
- #define COLOR_PURPLE 0xC2A2DAAA
- #define COLOUR_WHITE 0xFFFFFFFF
- #define COLOUR_GREEN 0x33AA33AA
- #define COLOUR_RED 0xFF3333AA
- #define COLOUR_YELLOW 0xFFFF00AA
- #undef MAX_PLAYERS //
- #define MAX_PLAYERS 50 //Change this to your player slot amount
- #define N2E_TIME 600000//Edit this value to change the timer, now = 10 mins
- #define LOOSING_HP 21 //The HP the player will lose You can set it |
- #define COLOR_LIGHTBLUE 0x7ED5F2FF
- #define COLOR_BLUE 0x5D00FFFF
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- #define RED 0xFF0000FF
- #define YELLOW 0xFFFF00FF
- #define WHITE 0xFFFFFFFF
- #define MAX_QUESTION_SIZE 24
- #define MAX_VARIANT_SIZE 15
- #define GUI_DIALOG_ID 10
- #pragma tabsize 0
- #define SLOT 100 //By default uses slot 1, change it if you need slot 1 for other thing.
- #define PATHE "Weapons" // Folder where players data saved
- #define RANGEOFSTARTER 20 // freezes all that are in range of player(20 meters) that
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SUCCESS_1 3
- #define DIALOG_SUCCESS_2 4
- #define PATH "/Users/%s.ini"
- #define ARMEDBODY_USE_HEAVY_WEAPON (false)
- #define WEATHER_TIMER_INTERVAL 5000
- #define WEATHER_AREA_NONE 0
- #define WEATHER_AREA_LOS_SANTOS 1
- #define WEATHER_AREA_LAS_VENTURAS 2
- #define WEATHER_AREA_BONE_COUNTY 3
- #define WEATHER_AREA_TIERRA_ROBADA 4
- #define WEATHER_AREA_SAN_FIERRO 5
- #define WEATHER_AREA_RED_COUNTY 6
- #define WEATHER_AREA_FLINT_COUNTY 7
- #define WEATHER_AREA_WHETSTONE 8
- #define MAX_ZONES 9
- #define MAX_AREAS 9
- #define BaitPrice 20
- #define FishingToolPrice 250
- #define COLOR_INVISIBLE 0xFFFFFF00
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_BLACK 0x000000FF
- #define COLOR_RED 0xAA3333AA
- #define COLOR_GREEN 0x00FF00FF
- #define COLOR_PURPLE 0xC2A2DAAA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_YELLOWORANGE 0xE8D600FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_ORANGE 0xFF5F11FF
- #define ORANGE 0xF4B906FF
- #define COLOR_BROWN 0x804000FF
- #define COLOR_CYAN 0x00FFFFFF
- #define COLOR_PINK 0xFF80C0FF
- #define EXPIRE_MINUTES 10 //after x minutes the roadblocks expire
- #define MAX_ROADBLOCKS 300//maximum roadblocks in server
- #define SEND true//if someone adds a roadblock ? You want let everyone know ? true = yes, false = no
- //----------------------------------------------------||
- new Fishes[MAX_PLAYERS];
- new AlreadyFished[MAX_PLAYERS];
- new FishingTool[MAX_PLAYERS];
- new Worms[MAX_PLAYERS];
- new FishWeight[MAX_PLAYERS];
- new IsFishing[MAX_PLAYERS];
- new fishing;
- new block[MAX_ROADBLOCKS][MAX_PLAYERS], atblock[MAX_PLAYERS];
- new Text:Textdraw0 [MAX_PLAYERS],
- bool:Balsavo [MAX_PLAYERS];
- enum PollVariables
- {
- yVariant[MAX_VARIANT_SIZE],
- nVariant[MAX_VARIANT_SIZE],
- Question[MAX_QUESTION_SIZE],
- bool:Start,
- yCount,
- nCount,
- GeneralCount,
- Organizator
- }
- new Poll[PollVariables];
- new bool:AlreadyGiveWeapons[MAX_PLAYERS];
- static
- armedbody_pTick[MAX_PLAYERS];
- enum rankingEnum
- {
- player_Score,
- player_ID
- }
- enum ZoneData
- {
- zone_areaid,
- Float:zone_minx,
- Float:zone_miny,
- Float:zone_maxx,
- Float:zone_maxy,
- }
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- pDeaths,
- pLevel,
- Credits,
- Xp,
- Extra1,
- Extra2,
- Extra3,
- Extra4,
- Extra5,
- Heroin,
- Weed,
- Material,
- Police,
- CIA,
- Army,
- Medic,
- Fire,
- News,
- Goverment,
- Licenser,
- Piss,
- CarLic,
- TruckLic,
- HeliLic,
- BikeLic,
- GunLic,
- LawLic,
- Passport,
- Radio,
- Jobs,
- Faction,
- Wanted,
- Skill
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new FirstSpawn[MAX_PLAYERS];
- new Float:CurHealth[MAX_PLAYERS];
- new Text:HealthBar[MAX_PLAYERS];
- new Count;
- new MaxPlayers;
- new PlayerAreaID[MAX_PLAYERS];
- new AreaCurrentWeather[MAX_AREAS];
- new Float:zones[][ZoneData] = {
- { WEATHER_AREA_LOS_SANTOS, 44.60, -2892.90, 2997.00, -768.00},
- { WEATHER_AREA_LAS_VENTURAS, 869.40, 596.30, 2997.00, 2993.80},
- { WEATHER_AREA_BONE_COUNTY, -480.50, 596.30, 869.40, 2993.80},
- { WEATHER_AREA_TIERRA_ROBADA, -2997.40, 1659.60, -480.50, 2993.80},
- { WEATHER_AREA_TIERRA_ROBADA, -1213.90, 596.30, -480.50, 1659.60},
- { WEATHER_AREA_SAN_FIERRO, -2997.40, -1115.50, -1213.90, 1659.60},
- { WEATHER_AREA_RED_COUNTY, -1213.90, -768.00, 2997.00, 596.30},
- { WEATHER_AREA_FLINT_COUNTY, -1213.90, -2892.90, 44.60, -768.00},
- { WEATHER_AREA_WHETSTONE, -2997.40, -2892.90, -1213.90, -1115.50}
- };
- #define yellow 0xDABB3EAA
- #define white 0xFFFFFFAA
- #define green 0x33AA33AA
- #define red 0xAA3333AA
- #define blue 0x5D00FFFF
- #define purple 0xC2A2DAAA
- #define gray 0x808080FF
- #define aqua 0x00FFFFFF
- #define royalblue 0x4169E1FF
- #define pink 0xFFC0CBFF
- #define brown 0xA52A2AFF
- #define orange 0xFF8C00FF
- public IsValidName(playerid)
- {
- new pname[MAX_PLAYER_NAME],underline=0;
- GetPlayerName(playerid, pname, sizeof(pname));
- if(strfind(pname,"[",true) != (-1)) return 0;
- else if(strfind(pname,".",true) != (-1)) return 0;
- else if(strfind(pname,"]",true) != (-1)) return 0;
- else if(strfind(pname,"$",true) != (-1)) return 0;
- else if(strfind(pname,"(",true) != (-1)) return 0;
- else if(strfind(pname,")",true) != (-1)) return 0;
- else if(strfind(pname,"=",true) != (-1)) return 0;
- else if(strfind(pname,"@",true) != (-1)) return 0;
- else if(strfind(pname,"1",true) != (-1)) return 0;
- else if(strfind(pname,"2",true) != (-1)) return 0;
- else if(strfind(pname,"3",true) != (-1)) return 0;
- else if(strfind(pname,"4",true) != (-1)) return 0;
- else if(strfind(pname,"5",true) != (-1)) return 0;
- else if(strfind(pname,"6",true) != (-1)) return 0;
- else if(strfind(pname,"7",true) != (-1)) return 0;
- else if(strfind(pname,"8",true) != (-1)) return 0;
- else if(strfind(pname,"9",true) != (-1)) return 0;
- new maxname = strlen(pname);
- for(new i=0; i<maxname; i++) { if(pname[i] == '_') underline ++; }
- if(underline != 1) return 0;
- pname[0] = toupper(pname[0]);
- for(new x=1; x<maxname; x++)
- {
- if(pname[x] == '_') pname[x+1] = toupper(pname[x+1]);
- else if(pname[x] != '_' && pname[x-1] != '_') pname[x] = tolower(pname[x]);
- }
- SetPlayerName(playerid, "New_Name");
- SetPlayerName(playerid, pname);
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(PlayerInfo[playerid][Police] == 5)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{5D00FF}[Êàïèòàí]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Police] == 4)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{5D00FF}[Ñåðæàíò]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Police] == 3)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{5D00FF}[SWAT]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Police] == 2)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{5D00FF}[Ïîëèöàé]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Police] == 1)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{5D00FF}[Êàäåò]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Medic] == 1)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{FFC0CB}[Ëåêàð]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Army] == 3)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{A52A2A}[Ãåíåðàë]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Army] == 2)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{A52A2A}[Ëåéòàíàíò]%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Army] == 1)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{A52A2A}[Âîåíåí]%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][CIA] == 3)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{0088FF}[Òàåí Àãåíò]%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][CIA] == 2)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{0088FF}[Àãåíò]%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][CIA] == 1)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{0088FF}[Èíñïåêòîð]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Fire] == 1)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{AA3333}[Ïîæàðíèêàð]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][News] == 1)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{33AA33}[Íîâèíàð]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Goverment] == 1)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{DABB3E}[Êìåò]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][Licenser] == 1)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{FFFFFF}[Èíñòðóêòîð]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][pAdmin] == 8)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{C2A2DA}[Îñíîâàòåë]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][pAdmin] == 7)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{C2A2DA}[Çàìåñíèê Îñíîâàòåë]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][pAdmin] == 6)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{4169E1}[Ãëàâåí Àäìèí]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][pAdmin] == 5)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{00FFFF}[Ñêðèïòúð]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][pAdmin] == 4)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{4169E1}[Ãëîáàëåí Àäìèí]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][pAdmin] == 3)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{4169E1}[Àäìèí]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][pAdmin] == 2)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{FF8C00}[Ìîäåðàòîð]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][pAdmin] == 1)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{DABB3E}[Âèï]{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- else if(PlayerInfo[playerid][pAdmin] == 0)
- {
- new pName[MAX_PLAYER_NAME], String[128];
- GetPlayerName(playerid, pName, 24);
- format(String, sizeof(String), "{808080}%s: %s", pName, text);
- ProxDetector(30.0, playerid, String,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- return 0;
- }
- return 0;
- }
- forward PayDay(playerid);
- public PayDay(playerid)
- {
- for (new i; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerConnected(i))
- {
- new string1[58];
- new string2[58];
- new string3[58];
- new string4[58];
- new nxtlevel = PlayerInfo[playerid][pLevel];
- new payday = nxtlevel*1000;
- GivePlayerMoney(i,payday);
- PlayerInfo[playerid][Xp]++;
- new wanted = GetPlayerWantedLevel(playerid);
- new faction = PlayerInfo[playerid][Faction];
- new jobs = PlayerInfo[playerid][Jobs];
- new level = PlayerInfo[playerid][pLevel];
- new xp = PlayerInfo[playerid][Xp];
- new skill = PlayerInfo[playerid][Skill];
- format(string1,sizeof(string1),"Wanted Level: $-%d () Level: $%d () Tax: $-%d ",wanted*3667, level*1715 , level*300-faction*350-xp*60-skill*10-jobs*300);
- format(string2,sizeof(string2),"Faction: $%d () Respect point: $%d",faction*2000, xp*300);
- format(string3,sizeof(string3),"Skill Point : $%d () Have Job: $%d",skill*50, jobs*1500);
- format(string4,sizeof(string4),"Your Balance is: $%d",level*1715+faction*2000+xp*300+skill*50+jobs*1500-wanted*3667-level*300-faction*350-xp*60-skill*10-jobs*300);
- GivePlayerMoney(playerid,-wanted*3667);
- GivePlayerMoney(playerid,level*1715);
- GivePlayerMoney(playerid,faction*2000);
- GivePlayerMoney(playerid,xp*300);
- GivePlayerMoney(playerid,skill*50);
- GivePlayerMoney(playerid,jobs*1500);
- SendClientMessage(playerid,COLOUR_YELLOW,"Balance:");
- SendClientMessage(playerid,COLOUR_YELLOW,string1);
- SendClientMessage(playerid,COLOUR_YELLOW,string2);
- SendClientMessage(playerid,COLOUR_YELLOW,string3);
- SendClientMessage(playerid,COLOUR_YELLOW,string4);
- GameTextForPlayer(i," ~p~ PayDay ++",6,5000);
- }
- }
- }
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_Int("Password",PlayerInfo[playerid][pPass]);
- INI_Int("Cash",PlayerInfo[playerid][pCash]);
- INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
- INI_Int("Kills",PlayerInfo[playerid][pKills]);
- INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
- INI_Int("Level",PlayerInfo[playerid][pLevel]);
- INI_Int("Credits",PlayerInfo[playerid][Credits]);
- INI_Int("Xp",PlayerInfo[playerid][Xp]);
- INI_Int("Extra1",PlayerInfo[playerid][Extra1]);
- INI_Int("Extra2",PlayerInfo[playerid][Extra2]);
- INI_Int("Extra3",PlayerInfo[playerid][Extra3]);
- INI_Int("Extra4",PlayerInfo[playerid][Extra4]);
- INI_Int("Extra5",PlayerInfo[playerid][Extra5]);
- INI_Int("Heroin",PlayerInfo[playerid][Heroin]);
- INI_Int("Weed",PlayerInfo[playerid][Weed]);
- INI_Int("Material",PlayerInfo[playerid][Material]);
- INI_Int("Police",PlayerInfo[playerid][Police]);
- INI_Int("CIA",PlayerInfo[playerid][CIA]);
- INI_Int("Army",PlayerInfo[playerid][Army]);
- INI_Int("Medic",PlayerInfo[playerid][Medic]);
- INI_Int("Fire",PlayerInfo[playerid][Fire]);
- INI_Int("News",PlayerInfo[playerid][News]);
- INI_Int("Goverment",PlayerInfo[playerid][Goverment]);
- INI_Int("Licenser",PlayerInfo[playerid][Licenser]);
- INI_Int("Piss",PlayerInfo[playerid][Piss]);
- INI_Int("Car License",PlayerInfo[playerid][CarLic]);
- INI_Int("Truck License",PlayerInfo[playerid][TruckLic]);
- INI_Int("Heli License",PlayerInfo[playerid][HeliLic]);
- INI_Int("Bike License",PlayerInfo[playerid][BikeLic]);
- INI_Int("Gun License",PlayerInfo[playerid][GunLic]);
- INI_Int("Law License",PlayerInfo[playerid][LawLic]);
- INI_Int("Passport",PlayerInfo[playerid][Passport]);
- INI_Int("Radio",PlayerInfo[playerid][Radio]);
- INI_Int("Jobs",PlayerInfo[playerid][Jobs]);
- INI_Int("Faction",PlayerInfo[playerid][Faction]);
- INI_Int("Wanted Level",PlayerInfo[playerid][Wanted]);
- INI_Int("Skill Point",PlayerInfo[playerid][Skill]);
- return 1;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- main()
- {
- print("\n----------------------------------");
- print(" Bulgarian RolePlay");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("BGRP alfa v0.3 ");
- SendRconCommand("mapname .•BG-RP•.");
- DisableInteriorEnterExits();
- EnableStuntBonusForAll(0);
- ShowPlayerMarkers(0);
- UsePlayerPedAnims();
- SetTimer("PayDay", 3600000, true); //60 min 3600000
- SetTimer("PlayTime", 60000, true); //1 min
- AddPlayerClass(62, 1568.6295,-1689.9706,6.2188, 260, 0, 0, 0, 0, 0, 0);// 1
- AddPlayerClass(106, 1568.6295,-1689.9706,6.2188, 260, 0, 0, 0, 0, 0, 0);// 2
- AddPlayerClass(42, 1568.6295,-1689.9706,6.2188, 260, 0, 0, 0, 0, 0, 0);// 3
- AddPlayerClass(49, 1568.6295,-1689.9706,6.2188, 260, 0, 0, 0, 0, 0, 0);// 4
- AddPlayerClass(103, 1568.6295,-1689.9706,6.2188, 260, 0, 0, 0, 0, 0, 0);// 5
- AddPlayerClass(67, 1568.6295,-1689.9706,6.2188, 260, 0, 0, 0, 0, 0, 0);// 6
- AddPlayerClass(91, 1568.6295,-1689.9706,6.2188, 260, 0, 0, 0, 0, 0, 0);// 7
- return 1;
- }
- public SetupPlayerForClassSelection(playerid)
- {
- // Set the player's orientation when they're selecting a class.
- SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
- SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
- SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
- SetPlayerFacingAngle(playerid,0.0);
- SetWeather(18);
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerWeather(playerid,0);
- SetPlayerTime(playerid, 12, 0);
- SetupPlayerForClassSelection(playerid);
- if(classid == 0 || classid == 1 || classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 7 ) {
- GameTextForPlayer(playerid,"~w~Welcome",5000,6);
- gTeam[playerid] = CIVILIAN;
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawSetString(HealthBar[playerid],"..........");
- TextDrawShowForPlayer(playerid,HealthBar[playerid]);
- FirstSpawn[playerid] += 1;
- new Float:health;
- GetPlayerHealth(playerid, health);
- CurHealth[playerid] = health;
- if(FirstSpawn[playerid] == 1) SetTimerEx("Hungry",N2E_TIME,1,"i",playerid);
- new level = PlayerInfo[playerid][pLevel];
- SetPlayerScore(playerid,level);
- new wlevel = PlayerInfo[playerid][Wanted];
- SetPlayerWantedLevel(playerid,wlevel);
- new WantedLevel = GetPlayerWantedLevel(playerid);
- if (GetPlayerWantedLevel(playerid) > 1)
- {
- SetTimerEx("UnJail2",WantedLevel*1000*120,0,"i",playerid);
- }
- if (!AlreadyGiveWeapons[playerid]) SetTimerEx("LoadWeaponsToFile",250,false,"i",playerid);
- if(gTeam[playerid] == CIVILIAN) {
- SetPlayerHealth(playerid,100);
- }
- return 1;}
- public UnJail2(playerid)
- {
- SetPlayerPos(playerid,1568.6295,-1689.9706,6.2188);
- SetPlayerInterior(playerid, 0);
- SendClientMessage(playerid, 0xFF0000AA, "Òè ñè ïóñíàò îò çàòâîðà!");
- SetPlayerWantedLevel(playerid,0);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- HealthBar[playerid] = TextDrawCreate(549.000000,52.000000,"..........");
- TextDrawAlignment(HealthBar[playerid],1);
- TextDrawBackgroundColor(HealthBar[playerid],0x00ff00ff);
- TextDrawFont(HealthBar[playerid],3);
- TextDrawLetterSize(HealthBar[playerid],0.569999,2.549999);
- TextDrawColor(HealthBar[playerid],0x00ff0033);
- TextDrawSetOutline(HealthBar[playerid],1);
- TextDrawSetProportional(HealthBar[playerid],1);
- TextDrawSetShadow(HealthBar[playerid],1);
- AlreadyGiveWeapons[playerid] = false;
- new string[64], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
- new plrIP[16];
- GetPlayerIp(playerid, plrIP, sizeof(plrIP));
- format(string,sizeof string,"%s has joined the server - %s!",pName,plrIP);
- SendClientMessageToAll(green,string);
- new string1[64], pName1[MAX_PLAYER_NAME];
- GetPlayerName(playerid,pName1,MAX_PLAYER_NAME);
- format(string1,sizeof string1,"Welcome %s!",pName);
- GameTextForPlayer(playerid, string1, 5000, 3);
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Ëîãèí",""COL_WHITE"Ïîïúëíåòå ïàðîëàòà ñè ïðåäè äà ñå ëîãíåòå.","Ëîãèí","Èçëåç");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Ðåãèñòðèðàíå...",""COL_WHITE"Ïîïúëíåòå ïàðîëàòà ñè ïðåäè äà ðåãèñòðèðàòå íîâ àêàóíò.","Ðåãèñòðèðàíå","Èçëåç");
- }
- new formatZ[256];
- format(formatZ,sizeof(formatZ),"Fish_%s.ini",PlayerName(playerid));
- if(!udb_Exists(formatZ))
- {
- udb_Create(formatZ,"209010");
- }
- Fishes[playerid] = dUserINT(formatZ).("Fishes");
- FishingTool[playerid] = dUserINT(formatZ).("FishingTool");
- Worms[playerid] = dUserINT(formatZ).("Worms");
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- TextDrawDestroy(HealthBar[playerid]);
- SaveWeaponsToFile(playerid);
- new
- string[64],
- name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,MAX_PLAYER_NAME);
- switch(reason)
- {
- case 0: format(string,sizeof string,"%s left the server. (Timed out)",name);
- case 1: format(string,sizeof string,"%s left the server. (Leaving)",name);
- case 2: format(string,sizeof string,"%s left the server. (Kicked/Banned)",name);
- }
- SendClientMessageToAll(red, string);
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- fremove(UserPath(playerid));
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",PlayerInfo[playerid][pPass]);
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
- INI_WriteInt(File,"Level",PlayerInfo[playerid][pLevel]);
- INI_WriteInt(File,"Credits",PlayerInfo[playerid][Credits]);
- INI_WriteInt(File,"Xp",PlayerInfo[playerid][Xp]);
- INI_WriteInt(File,"Extra1",PlayerInfo[playerid][Extra1]);
- INI_WriteInt(File,"Extra2",PlayerInfo[playerid][Extra2]);
- INI_WriteInt(File,"Extra3",PlayerInfo[playerid][Extra3]);
- INI_WriteInt(File,"Extra4",PlayerInfo[playerid][Extra4]);
- INI_WriteInt(File,"Extra5",PlayerInfo[playerid][Extra5]);
- INI_WriteInt(File,"Heroin",PlayerInfo[playerid][Heroin]);
- INI_WriteInt(File,"Weed",PlayerInfo[playerid][Weed]);
- INI_WriteInt(File,"Material",PlayerInfo[playerid][Material]);
- INI_WriteInt(File,"Police",PlayerInfo[playerid][Police]);
- INI_WriteInt(File,"CIA",PlayerInfo[playerid][CIA]);
- INI_WriteInt(File,"Army",PlayerInfo[playerid][Army]);
- INI_WriteInt(File,"Medic",PlayerInfo[playerid][Medic]);
- INI_WriteInt(File,"Fire",PlayerInfo[playerid][Fire]);
- INI_WriteInt(File,"News",PlayerInfo[playerid][News]);
- INI_WriteInt(File,"Goverment",PlayerInfo[playerid][Goverment]);
- INI_WriteInt(File,"Licenser",PlayerInfo[playerid][Licenser]);
- INI_WriteInt(File,"Piss",PlayerInfo[playerid][Piss]);
- INI_WriteInt(File,"Car License",PlayerInfo[playerid][CarLic]);
- INI_WriteInt(File,"Truck License",PlayerInfo[playerid][TruckLic]);
- INI_WriteInt(File,"Heli License",PlayerInfo[playerid][HeliLic]);
- INI_WriteInt(File,"Bike License",PlayerInfo[playerid][BikeLic]);
- INI_WriteInt(File,"Gun License",PlayerInfo[playerid][GunLic]);
- INI_WriteInt(File,"Law License",PlayerInfo[playerid][LawLic]);
- INI_WriteInt(File,"Passport",PlayerInfo[playerid][Passport]);
- INI_WriteInt(File,"Radio",PlayerInfo[playerid][Radio]);
- INI_WriteInt(File,"Jobs",PlayerInfo[playerid][Jobs]);
- INI_WriteInt(File,"Faction",PlayerInfo[playerid][Faction]);
- INI_WriteInt(File,"Wanted Level",GetPlayerWantedLevel(playerid));
- INI_WriteInt(File,"Skill Point",PlayerInfo[playerid][Skill]);
- INI_Close(File);
- new formatZ2[256];
- format(formatZ2,sizeof(formatZ2),"Fish_%s.ini",PlayerName(playerid));
- dUserSetINT(formatZ2).("Fishes",Fishes[playerid]);
- dUserSetINT(formatZ2).("FishingTool",FishingTool[playerid]);
- dUserSetINT(formatZ2).("Worms",Worms[playerid]);
- return 1;
- }
- SaveWeaponsToFile(playerid)
- {
- new i, pathe[50], string[128], weaponid, ammo;
- pathe = GetPlayerFormattedName(playerid);
- if (!dini_Exists(pathe)) dini_Create(pathe);
- for (i=0; i<13; i++)
- {
- GetPlayerWeaponData(playerid,i,weaponid,ammo);
- format(string,sizeof(string),"Weapon - %d",i);
- dini_IntSet(pathe,string,weaponid);
- format(string,sizeof(string),"AmmoID - %d",i);
- dini_IntSet(pathe,string,ammo == 65535 ? 0 : ammo);
- }
- }
- forward LoadWeaponsToFile(playerid);
- public LoadWeaponsToFile(playerid)
- {
- new i, pathe[50], string[128], weaponid, ammo;
- pathe = GetPlayerFormattedName(playerid);
- ResetPlayerWeapons(playerid);
- for (i=0; i<13; i++)
- {
- format(string,sizeof(string),"Weapon - %d",i);
- weaponid = dini_Int(pathe,string);
- format(string,sizeof(string),"AmmoID - %d",i);
- ammo = dini_Int(pathe,string);
- GivePlayerWeapon(playerid,weaponid,ammo);
- }
- AlreadyGiveWeapons[playerid] = true;
- }
- GetPlayerFormattedName(playerid)
- {
- new name[24], full[50];
- GetPlayerName(playerid,name,sizeof(name));
- format(full,sizeof(full),"%s/%s.txt",PATHE,name);
- return full;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- TextDrawHideForPlayer(playerid,HealthBar[playerid]);
- Worms[playerid] = 0; FishWeight[playerid] = 0;
- Fishes[playerid] = 0; FishingTool[playerid] = 0;
- PlayerInfo[killerid][pKills]++;
- PlayerInfo[playerid][pDeaths]++;
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch( dialogid )
- {
- case DIALOG_REGISTER:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Ðåãèñòðèðàíå...",""COL_RED"Âúâåëè ñòå ãðåøíà ïàðîëà.\n"COL_WHITE"Ïîïúëíåòå ïàðîëàòà ñè ïðåäè äà ðåãèñòðèðàòå íîâ àêàóíò.","Ðåãèñòðèðàé","Èçëåç");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_WriteInt(File,"Cash",0);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteInt(File,"Level",0);
- INI_WriteInt(File,"Vip",0);
- INI_WriteInt(File,"Credits",0);
- INI_WriteInt(File,"Xp",0);
- INI_WriteInt(File,"Extra1",0);
- INI_WriteInt(File,"Extra2",0);
- INI_WriteInt(File,"Extra3",0);
- INI_WriteInt(File,"Extra4",0);
- INI_WriteInt(File,"Extra5",0);
- INI_WriteInt(File,"Heroin",0);
- INI_WriteInt(File,"Weed",0);
- INI_WriteInt(File,"Material",0);
- INI_WriteInt(File,"Police",0);
- INI_WriteInt(File,"CIA",0);
- INI_WriteInt(File,"Army",0);
- INI_WriteInt(File,"Medic",0);
- INI_WriteInt(File,"Fire",0);
- INI_WriteInt(File,"News",0);
- INI_WriteInt(File,"Goverment",0);
- INI_WriteInt(File,"Licenser",0);
- INI_WriteInt(File,"Piss",0);
- INI_WriteInt(File,"Car License",0);
- INI_WriteInt(File,"Truck License",0);
- INI_WriteInt(File,"Heli License",0);
- INI_WriteInt(File,"Bike Lecense",0);
- INI_WriteInt(File,"Gun License",0);
- INI_WriteInt(File,"Law License",0);
- INI_WriteInt(File,"Passport",0);
- INI_WriteInt(File,"Time Played",0);
- INI_WriteInt(File,"Radio",0);
- INI_WriteInt(File,"Jobs",0);
- INI_WriteInt(File,"Faction",0);
- INI_WriteInt(File,"Wanted Level",0);
- INI_WriteInt(File,"Skill Point",0);
- INI_Close(File);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Óñïåøíî!",""COL_GREEN"×óäåñíî! Âàøèÿ àêàóíò å ñúçäàäåí óñïåøíî è ðàáîòè. Ðåëîãíåòå çà äà çàïèøåòå ñòàòèñòèêàòà ñè!","Ok","");
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- }
- }
- case DIALOG_LOGIN:
- {
- if ( !response ) return Kick ( playerid );
- if( response )
- {
- if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
- {
- //INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Óñïåøíî!",""COL_GREEN"Âèå óñïåøíî ñå ëîãíàõòå!","Ok","");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Ëîãèí",""COL_RED"Âèå ñòå âúâåëè ãðåøíà ïàðîëà.\n"COL_WHITE"Ïîïúëíåòå ïàðîëàòà ñè ïðåäè äà ñå ëîãíåòå.","Ëîãèí","Èçëåç");
- }
- return 1;
- }
- }
- }
- new string[256];
- if(dialogid == 360)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) >= FishingToolPrice)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Successfully purchased Fishing tool! You can now use /fish");
- SendClientMessage(playerid, COLOR_YELLOW, ", but you also need some baits");
- FishingTool[playerid] = 1;
- GivePlayerMoney(playerid, -FishingToolPrice);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have enough money");
- }
- }
- if(listitem == 1)
- {
- format(string,sizeof(string),"Enter below how much baits do you want.\n$%d per one",BaitPrice);
- ShowPlayerDialog(playerid, 361, DIALOG_STYLE_INPUT, "Baits",string,"Purchase","Exit");
- }
- }
- if(dialogid == 361 && response)
- {
- new price = BaitPrice;
- new baits = strval(inputtext);
- if(baits > 0)
- {
- new price1 = price*baits;
- if(GetPlayerMoney(playerid) >= price1)
- {
- GivePlayerMoney(playerid, -price1);
- format(string,sizeof(string),"You just purchased %d worms for $%d", baits, price1);
- SendClientMessage(playerid, COLOR_GREEN, string);
- Worms[playerid] += baits;
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have that much money.");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You can't buy baits less than 0");
- }
- }
- switch(dialogid)
- {
- case GUI_DIALOG_ID:
- {
- switch(listitem)
- {
- case 0: if(response) return ShowPlayerDialog(playerid, (GUI_DIALOG_ID + 1), DIALOG_STYLE_INPUT, "{ffffff}Set poll question", "{ffffff}Enter a poll question text.\n{ff0000}[!] - There must be no longer than 24 characters.", "Set", "Close");
- case 1: if(response) return ShowPlayerDialog(playerid, (GUI_DIALOG_ID + 2), DIALOG_STYLE_INPUT, "{ffffff}Set Y variant", "{ffffff}Enter a Y variant text.\n{ff0000}[!] - There must be no longer than 15 characters.", "Set", "Close");
- case 2: if(response) return ShowPlayerDialog(playerid, (GUI_DIALOG_ID + 3), DIALOG_STYLE_INPUT, "{ffffff}Set N variant", "{ffffff}Enter a N variant text.\n{ff0000}[!] - There must be no longer than 15 characters.", "Set", "Close");
- case 3:
- {
- if(response)
- {
- new Masyvas[169];
- if(Poll[Start])
- {
- Poll[Start] = false;
- format(Masyvas,135,"{ffff00}Y variant votes: {ff0000}%d {ffff00}people(-s).\n{ffff00}N variant votes: {ff0000}%d {ffff00}people(-s).",Poll[yCount],Poll[nCount]);
- ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, "{ffffff}Results", Masyvas, " ", "");
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i)) TextDrawHideForPlayer(i, Textdraw0[i]);
- }
- NullVariables();
- return 1;
- }
- else
- {
- if(!strcmp(Poll[Question],"None",true)) return SendClientMessage(playerid, RED, "[]: {ffffff}The question is not entered.");
- else if(!strcmp(Poll[yVariant],"None",true)) return SendClientMessage(playerid, RED, "[]: {ffffff}The Y variant is not entered.");
- else if(!strcmp(Poll[nVariant],"None",true)) return SendClientMessage(playerid, RED, "[]: {ffffff}The N variant is not entered.");
- Poll[Start] = true;
- SendClientMessageToAll(WHITE, "[ . ]: {ffff00}Poll start! Everybody can vote.");
- Poll[Organizator] = playerid;
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- TextDrawShowForPlayer(playerid, Textdraw0[i]);
- format(Masyvas,169," ~y~:: ~w~POLL ~y~::~n~~n~~r~(?):~w~ %s~n~~n~~p~(Y)~w~ %s~n~~p~(N)~w~ %s~n~~n~PRESS ~y~Y~w~ OR ~y~N",Poll[Question],Poll[yVariant],Poll[nVariant]);
- TextDrawSetString(Textdraw0[i], Masyvas);
- Poll[GeneralCount]++;
- }
- }
- }
- }
- }
- case 4:
- {
- if(response)
- {
- NullVariables();
- SendClientMessage(playerid, YELLOW, "[ * ]: {ffffff} Parameters clear.");
- }
- }
- }
- }
- case (GUI_DIALOG_ID + 1):
- {
- if(response)
- {
- if(isnull(inputtext)) return ShowPlayerDialog(playerid, (GUI_DIALOG_ID + 1), DIALOG_STYLE_INPUT, "{ffffff}Set poll question", "{ffffff}Enter a poll question text.\n{ff0000}[!] - There must be no longer than 24 characters.", "Set", "Close");
- else if(strlen(inputtext) > MAX_QUESTION_SIZE) return SendClientMessage(playerid, RED, "[]: {ffffff}The question is too long.");
- format(Poll[Question], strlen(inputtext) + 1, "%s", inputtext);
- SendClientMessage(playerid, YELLOW, "[ * ]: {ffffff} Poll question set.");
- }
- }
- case (GUI_DIALOG_ID + 2):
- {
- if(response)
- {
- if(isnull(inputtext)) return ShowPlayerDialog(playerid, (GUI_DIALOG_ID + 2), DIALOG_STYLE_INPUT, "{ffffff}Set Y variant", "{ffffff}Enter a Y variant text.\n{ff0000}[!] - There must be no longer than 15 characters.", "Set", "Close");
- else if(strlen(inputtext) > MAX_VARIANT_SIZE) return SendClientMessage(playerid, RED, "[]: {ffffff}Per ilgas tekstas.");
- format(Poll[yVariant], strlen(inputtext) + 1, "%s", inputtext);
- SendClientMessage(playerid, YELLOW, "[ * ]: {ffffff} Y variant set.");
- }
- }
- case (GUI_DIALOG_ID + 3):
- {
- if(response)
- {
- if(isnull(inputtext)) return ShowPlayerDialog(playerid, (GUI_DIALOG_ID + 3), DIALOG_STYLE_INPUT, "{ffffff}Set N variant", "{ffffff}Enter a N variant text.\n{ff0000}[!] - There must be no longer than 15 characters.", "Set", "Close");
- else if(strlen(inputtext) > MAX_VARIANT_SIZE) return SendClientMessage(playerid, RED, "[]: {ffffff}Per ilgas tekstas.");
- format(Poll[nVariant], strlen(inputtext) + 1, "%s", inputtext);
- SendClientMessage(playerid, YELLOW, "[ * ]: {ffffff} N variant set.");
- }
- }
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(Poll[Start])
- {
- if(!Balsavo[playerid])
- {
- if(newkeys == KEY_YES)
- {
- Poll[yCount]++;
- Balsavo[playerid] = false;
- if((Poll[yCount] + Poll[nCount]) == Poll[GeneralCount])
- {
- new Masyvas[135];
- Poll[Start] = false;
- format(Masyvas,135,"{ffff00}Y variant votes: {ff0000}%d {ffff00}people(-s).\n{ffff00}N variant votes: {ff0000}%d {ffff00}people(-s).",Poll[yCount],Poll[nCount]);
- ShowPlayerDialog(Poll[Organizator], 0, DIALOG_STYLE_MSGBOX, "{ffffff}Results", Masyvas, " ", "");
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i)) TextDrawHideForPlayer(i, Textdraw0[i]);
- }
- NullVariables();
- }
- }
- else if(newkeys == KEY_NO)
- {
- Poll[nCount]++;
- Balsavo[playerid] = false;
- if((Poll[yCount] + Poll[nCount]) == Poll[GeneralCount])
- {
- new Masyvas[135];
- Poll[Start] = false;
- format(Masyvas,135,"{ffff00}Y variant votes: {ff0000}%d {ffff00}people(-s).\n{ffff00}N variant votes: {ff0000}%d {ffff00}people(-s).",Poll[yCount],Poll[nCount]);
- ShowPlayerDialog(Poll[Organizator], 0, DIALOG_STYLE_MSGBOX, "{ffffff}Rezultatai", Masyvas, " ", "");
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i)) TextDrawHideForPlayer(i, Textdraw0[i]);
- }
- NullVariables();
- }
- }
- }
- }
- return 1;
- }
- public GetPlayerWeatherArea(playerid)
- {
- new Float:x, Float:y, Float:z;
- if (!GetPlayerPos(playerid, x, y, z) || z > 900) return 0;
- for (new zoneid; zoneid < MAX_ZONES; zoneid++)
- {
- if(x > zones[zoneid][zone_minx] &&
- x < zones[zoneid][zone_maxx] &&
- y > zones[zoneid][zone_miny] &&
- y < zones[zoneid][zone_maxy] ) return zones[zoneid][zone_areaid];
- }
- return 0;
- }
- public GetPlayerWeather(playerid)
- {
- return AreaCurrentWeather[GetPlayerWeatherArea(playerid)];
- }
- public GetAreaWeather(areaid)
- {
- return AreaCurrentWeather[areaid];
- }
- public SetAreaWeather(areaid, weatherid)
- {
- if (areaid >= MAX_AREAS) return false;
- AreaCurrentWeather[areaid] = weatherid;
- for (new playerid; playerid < MaxPlayers; playerid++) if (IsPlayerConnected(playerid))
- {
- if (PlayerAreaID[playerid] == areaid) SetPlayerWeather(playerid, weatherid);
- }
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- if (newinteriorid) SetPlayerWeather(playerid, 0);
- }
- public StreamerCheck()
- {
- for (new playerid; playerid < MaxPlayers; playerid++) if (GetPlayerState(playerid) && !GetPlayerInterior(playerid))
- {
- new areaid = GetPlayerWeatherArea(playerid);
- if (PlayerAreaID[playerid] == areaid) continue;
- //Player entered new area
- PlayerAreaID[playerid] = areaid;
- SetPlayerWeather(playerid, AreaCurrentWeather[areaid]);
- CallRemoteFunction("OnPlayerEnterWeatherArea", "ddd", playerid, areaid, AreaCurrentWeather[areaid]);
- }
- }
- public OnFilterScriptInit()
- {
- //Labels
- Create3DTextLabel("Equipment Room - /enter ", COLOR_WHITE, 1568.6295,-1689.9706,6.2188, 10.0, 0, 0);
- Create3DTextLabel("Los Santos Police Department", COLOR_WHITE, 1554.0641,-1708.2268,6.2188, 10.0, 0, 0);
- Create3DTextLabel("Los Santos Police Department", COLOR_WHITE, 1550.8027,-1697.4136,6.2188, 10.0, 0, 0);
- Create3DTextLabel("Los Santos Police Department", COLOR_WHITE, 1532.0746,-1672.9426,6.2188, 10.0, 0, 0);
- Create3DTextLabel("Los Santos Police Department", COLOR_WHITE, 1549.7200,-1656.8212,6.2188, 10.0, 0, 0);
- //Vehicles
- AddStaticVehicle(596,1528.7388,-1687.8563,5.6116,89.5453,0,1); // PD car 1
- AddStaticVehicle(596,1528.4889,-1683.9357,5.6126,90.9261,0,1); // PD car 2
- AddStaticVehicle(596,1544.7776,-1684.2469,5.6126,88.8893,0,1); // PD car 3
- AddStaticVehicle(596,1545.6973,-1680.6071,5.6106,90.6858,0,1); // PD car 4
- AddStaticVehicle(596,1546.1519,-1667.9142,5.6102,268.5811,0,1); // PD car 5
- AddStaticVehicle(596,1544.9795,-1655.1194,5.6118,269.7381,0,1); // PD car 6
- AddStaticVehicle(596,1545.2738,-1650.8409,5.6079,268.8639,0,1); // PD car 7
- AddStaticVehicle(596,1564.4762,-1713.1947,5.6106,90.1474,0,1); // PD car 8
- AddStaticVehicle(596,1564.3260,-1709.4965,5.6115,87.3918,0,1); // PD car 9
- AddStaticVehicle(596,1574.3693,-1711.2539,5.6111,179.7121,0,1); // PD car 10
- MaxPlayers = GetMaxPlayers();
- SetTimer("StreamerCheck", WEATHER_TIMER_INTERVAL, true);
- SetTimer("Weather", 60 * 300000, 10);
- Count = 0;
- fishing = AddStaticPickup(1239, 23, 153.9523,-1946.2955,5.1874);
- NullVariables();
- for(new i; i < MAX_PLAYERS; i++)
- {
- Textdraw0[i] = TextDrawCreate(434.000000, 110.000000, " ~y~:: ~w~APKLAUSA ~y~::~n~~n~~r~(?):~w~ Ka jus?~n~~n~~p~(Y)~w~ Nieko.~n~~p~(N)~w~ Eik nx!~n~~n~Spausk ~y~Y~w~ arba ~y~N");
- TextDrawBackgroundColor(Textdraw0[i], 255);
- TextDrawFont(Textdraw0[i], 2);
- TextDrawLetterSize(Textdraw0[i], 0.320000, 0.899999);
- TextDrawColor(Textdraw0[i], -1);
- TextDrawSetOutline(Textdraw0[i], 0);
- TextDrawSetProportional(Textdraw0[i], 1);
- TextDrawSetShadow(Textdraw0[i], 0);
- TextDrawUseBox(Textdraw0[i], 1);
- TextDrawBoxColor(Textdraw0[i], 572661640);
- TextDrawTextSize(Textdraw0[i], 647.000000, 0.000000);
- }
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- OnPlayerConnect(i);
- }
- }
- return 1;
- }
- public OnFilterScriptExit()
- {
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- TextDrawDestroy(HealthBar[i]);
- }
- }
- return 1;
- }
- forward Weather();
- public Weather()
- {
- switch(random(45))
- {
- case 0:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 1);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 13);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 25);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 13);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 6);
- SetAreaWeather(WEATHER_AREA_NONE, 9);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 16);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 5);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 4);
- SendClientMessage(0, 0x20F709C8, " Its working 1 ");
- }
- case 1:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 11);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 25);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 9);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 24);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 15);
- SetAreaWeather(WEATHER_AREA_NONE, 5);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 15);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 17);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 43);
- SendClientMessage(0, 0x20F709C8, " Its working 2 ");
- }
- case 2:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 16);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 8);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 24);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 2);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 43);
- SetAreaWeather(WEATHER_AREA_NONE, 17);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 14);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 18);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 3);
- }
- case 3:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 45);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 24);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 5);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 39);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 14);
- SetAreaWeather(WEATHER_AREA_NONE, 37);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 13);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 3);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 20);
- }
- case 4:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 38);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 31);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 23);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 18);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 41);
- SetAreaWeather(WEATHER_AREA_NONE, 4);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 12);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 16);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 27);
- }
- case 5:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 39);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 30);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 31);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 38);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 0);
- SetAreaWeather(WEATHER_AREA_NONE, 42);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 11);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 4);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 37);
- }
- case 6:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 37);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 45);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 22);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 37);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 30);
- SetAreaWeather(WEATHER_AREA_NONE, 23);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 10);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 25);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 36);//////////////////////
- }
- case 7:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 10);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 23);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 31);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 12);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 5);
- SetAreaWeather(WEATHER_AREA_NONE, 36);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 9);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 13);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 26);
- }
- case 8:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 3);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 7);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 30);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 31);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 13);
- SetAreaWeather(WEATHER_AREA_NONE, 3);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 8);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 14);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 2);
- }
- case 9:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 6);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 18);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 21);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 23);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 21);
- SetAreaWeather(WEATHER_AREA_NONE, 41);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 7);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 15);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 18);
- }
- case 10:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 17);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 32);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 15);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 21);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 26);
- SetAreaWeather(WEATHER_AREA_NONE, 22);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 6);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 20);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 43);
- }
- case 11:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 40);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 44);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 8);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 3);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 22);
- SetAreaWeather(WEATHER_AREA_NONE, 16);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 5);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 43);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 25);
- }
- case 12:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 41);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 4);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 31);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 36);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 7);
- SetAreaWeather(WEATHER_AREA_NONE, 20);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 24);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 44);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 14);
- }
- case 13:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 43);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 33);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 6);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 30);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 18);
- SetAreaWeather(WEATHER_AREA_NONE, 21);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 43);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 38);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 35);
- }
- case 14:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 36);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 29);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 33);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 17);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 29);
- SetAreaWeather(WEATHER_AREA_NONE, 35);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 42);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 26);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 21);
- }
- case 15:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 2);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 26);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 35);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 34);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 31);
- SetAreaWeather(WEATHER_AREA_NONE, 6);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 4);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 12);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 38);
- }
- case 16:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 35);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 34);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 34);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 35);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 12);
- SetAreaWeather(WEATHER_AREA_NONE, 14);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 41);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 6);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 42);
- }
- case 17:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 19);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 12);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 20);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 32);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 32);
- SetAreaWeather(WEATHER_AREA_NONE, 15);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 40);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 14);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 1);
- }
- case 18:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 20);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 35);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 10);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 4);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 33);
- SetAreaWeather(WEATHER_AREA_NONE, 2);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 39);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 42);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 24);
- }
- case 19:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 4);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 20);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 17);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 29);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 1);
- SetAreaWeather(WEATHER_AREA_NONE, 40);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 38);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 23);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 11);
- }
- case 20:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 18);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 6);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 11);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 34);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 20);
- SetAreaWeather(WEATHER_AREA_NONE, 18);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 37);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 32);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 12);
- }
- case 21:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 42);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 14);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 4);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 11);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 34);
- SetAreaWeather(WEATHER_AREA_NONE, 34);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 34);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 36);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 41);
- }
- case 22:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 34);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 36);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 36);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 16);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 25);
- SetAreaWeather(WEATHER_AREA_NONE, 24);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 17);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 12);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 28);
- }
- case 23:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 22);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 43);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 9);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 28);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 42);
- SetAreaWeather(WEATHER_AREA_NONE, 33);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 34);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 25);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 33);
- }
- case 24:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 33);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 37);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 26);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 36);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 22);
- SetAreaWeather(WEATHER_AREA_NONE, 13);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 33);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 16);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 34);
- }
- case 25:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 21);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 9);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 29);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 14);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 35);
- SetAreaWeather(WEATHER_AREA_NONE, 7);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 32);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 27);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 5);
- }
- case 26:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 7);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 2);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 7);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 27);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 8);
- SetAreaWeather(WEATHER_AREA_NONE, 10);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 3);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 28);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 39);
- }
- case 27:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 32);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 27);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 18);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 20);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 36);
- SetAreaWeather(WEATHER_AREA_NONE, 32);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 30);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 37);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 15);
- }
- case 28:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 30);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 38);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 1);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 5);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 27);
- SetAreaWeather(WEATHER_AREA_NONE, 1);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 31);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 7);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 32);
- }
- case 29:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 5);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 42);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 37);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 33);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 37);
- SetAreaWeather(WEATHER_AREA_NONE, 39);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 29);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 29);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 10);
- }
- case 30:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 24);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 39);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 14);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 40);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 38);
- SetAreaWeather(WEATHER_AREA_NONE, 32);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 28);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 30);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 13);
- }
- case 31:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 25);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 21);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 38);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 35);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 23);
- SetAreaWeather(WEATHER_AREA_NONE, 8);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 27);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 20);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 6);
- }
- case 32:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 23);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 3);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 39);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 41);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 2);
- SetAreaWeather(WEATHER_AREA_NONE, 28);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 25);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 31);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 29);
- }
- case 33:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 13);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 41);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 45);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 34);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 17);
- SetAreaWeather(WEATHER_AREA_NONE, 2);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 25);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 32);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 7);
- }
- case 34:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 14);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 10);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 27);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 25);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 16);
- SetAreaWeather(WEATHER_AREA_NONE, 27);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 34);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 33);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 44);
- }
- case 35:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 12);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 15);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 40);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 6);///
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 9);
- SetAreaWeather(WEATHER_AREA_NONE, 26);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 23);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 34);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 22);
- }
- case 36:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 26);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 40);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 12);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 20);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 39);
- SetAreaWeather(WEATHER_AREA_NONE, 25);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 22);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 8);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 40);
- }
- case 37:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 43);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 22);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 41);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 42);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 40);
- SetAreaWeather(WEATHER_AREA_NONE, 10);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 25);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 21);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 45);
- }
- case 38:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 8);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 4);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 2);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 43);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 24);
- SetAreaWeather(WEATHER_AREA_NONE, 11);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 20);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 35);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 31);
- }
- case 39:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 19);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 28);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 42);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 15);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 28);
- SetAreaWeather(WEATHER_AREA_NONE, 38);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 29);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 36);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 8);
- }
- case 40:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 29);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 11);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 44);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 7);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 41);
- SetAreaWeather(WEATHER_AREA_NONE, 31);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 22);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 9);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 30);
- }
- case 41:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 31);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 16);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 43);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 26);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 3);
- SetAreaWeather(WEATHER_AREA_NONE, 30);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 17);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 10);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 9);
- }
- case 42:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 27);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 5);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 13);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 9);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 10);
- SetAreaWeather(WEATHER_AREA_NONE, 29);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 2);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 37);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 23);
- }
- case 43:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 15);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 17);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 28);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 8);//
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 11);
- SetAreaWeather(WEATHER_AREA_NONE, 1);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 1);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 23);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 16);
- }
- case 44:
- {
- SetAreaWeather(WEATHER_AREA_BONE_COUNTY, 9);
- SetAreaWeather(WEATHER_AREA_WHETSTONE, 1);
- SetAreaWeather(WEATHER_AREA_RED_COUNTY, 3);
- SetAreaWeather(WEATHER_AREA_LOS_SANTOS, 10);
- SetAreaWeather(WEATHER_AREA_FLINT_COUNTY, 4);
- SetAreaWeather(WEATHER_AREA_NONE, 12);
- SetAreaWeather(WEATHER_AREA_TIERRA_ROBADA, 18);
- SetAreaWeather(WEATHER_AREA_SAN_FIERRO, 2);
- SetAreaWeather(WEATHER_AREA_LAS_VENTURAS, 17);
- }
- }
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(PlayerInfo[playerid][CarLic] == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "*Òè íåçíàåø äà êàðàø îùå íóæíè ñà òè");
- SendClientMessage(playerid, COLOR_RED, "*Ëèöåíñ çà Àâòîìîáèëè");
- SendClientMessage(playerid, COLOR_RED, "*Ëèöåíñ çà Òåæêî-òîâàðíè êàìèîíè");
- SendClientMessage(playerid, COLOR_RED, "*Ëèöåíñ çà Çà Âúçäóøíè ñðåäñòâà");
- SendClientMessage(playerid, COLOR_RED, "*Ëèöåíñ çà Ìîòîöèêëåòè");
- SendClientMessage(playerid, COLOR_RED, "*Ïàçè ñå îò ïîëèöàé");
- return 0;
- }
- else if(PlayerInfo[playerid][TruckLic] == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "*Òè íåçíàåø äà êàðàø îùå íóæíè ñà òè");
- SendClientMessage(playerid, COLOR_RED, "*Ëèöåíñ çà Òåæêî-òîâàðíè êàìèîíè");
- SendClientMessage(playerid, COLOR_RED, "*Ëèöåíñ çà Çà Âúçäóøíè ñðåäñòâà");
- SendClientMessage(playerid, COLOR_RED, "*Ëèöåíñ çà Ìîòîöèêëåòè");
- SendClientMessage(playerid, COLOR_RED, "*Ïàçè ñå îò ïîëèöàé");
- return 0;
- }
- else if(PlayerInfo[playerid][HeliLic] == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "*Òè íåçíàåø äà êàðàø îùå íóæíè ñà òè");
- SendClientMessage(playerid, COLOR_RED, "*Ëèöåíñ çà Çà Âúçäóøíè ñðåäñòâà");
- SendClientMessage(playerid, COLOR_RED, "*Ëèöåíñ çà Ìîòîöèêëåòè");
- SendClientMessage(playerid, COLOR_RED, "*Ïàçè ñå îò ïîëèöàé");
- return 0;
- }
- else if(PlayerInfo[playerid][BikeLic] == 0)
- {
- SendClientMessage(playerid, COLOR_RED, "*Òè íåçíàåø äà êàðàø îùå íóæíè ñà òè");
- SendClientMessage(playerid, COLOR_RED, "*Ëèöåíñ çà Ìîòîöèêëåòè");
- SendClientMessage(playerid, COLOR_RED, "*Ïàçè ñå îò ïîëèöàé");
- return 0;
- }
- if(PlayerInfo[playerid][CarLic] == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN, "*Òè èìàø ëèöåíñ è ìîæåø äà êàðàø");
- return 0;
- }
- else if(PlayerInfo[playerid][TruckLic] == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN, "*Òè èìàø ëèöåíñ è ìîæåø äà êàðàø");
- return 0;
- }
- else if(PlayerInfo[playerid][HeliLic] == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN, "*Òè èìàø ëèöåíñ è ìîæåø äà êàðàø");
- return 0;
- }
- else if(PlayerInfo[playerid][BikeLic] == 1)
- {
- SendClientMessage(playerid, COLOR_GREEN, "*Òè èìàø ëèöåíñ è ìîæåø äà êàðàø");
- return 0;
- }
- return 0;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0,2766.6602,-2575.1614,3.0000))
- {
- if(Fishes[playerid] >= 1)
- {
- new string[128];
- Fishes[playerid] = 0;
- format(string,sizeof(string),"You sold all your fishes for $%d.", FishWeight[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- GivePlayerMoney(playerid, FishWeight[playerid]);
- FishWeight[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- return 1;
- }
- }
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == fishing)
- {
- GameTextForPlayer(playerid, "~w~You can buy here~n~some fishing tools~n~type ~r~/buytools ~w~to buy some", 3500, 3);
- }
- return 1;
- }
- public OnPlayerUpdate(playerid){
- if(GetTickCount() - armedbody_pTick[playerid] > 113){ //prefix check itter
- new
- weaponid[13],weaponammo[13],pArmedWeapon;
- pArmedWeapon = GetPlayerWeapon(playerid);
- GetPlayerWeaponData(playerid,1,weaponid[1],weaponammo[1]);
- GetPlayerWeaponData(playerid,2,weaponid[2],weaponammo[2]);
- GetPlayerWeaponData(playerid,4,weaponid[4],weaponammo[4]);
- GetPlayerWeaponData(playerid,5,weaponid[5],weaponammo[5]);
- #if ARMEDBODY_USE_HEAVY_WEAPON
- GetPlayerWeaponData(playerid,7,weaponid[7],weaponammo[7]);
- #endif
- if(weaponid[1] && weaponammo[1] > 0){
- if(pArmedWeapon != weaponid[1]){
- if(!IsPlayerAttachedObjectSlotUsed(playerid,0)){
- SetPlayerAttachedObject(playerid,0,GetWeaponModel(weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
- RemovePlayerAttachedObject(playerid,0);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
- RemovePlayerAttachedObject(playerid,0);
- }
- if(weaponid[2] && weaponammo[2] > 0){
- if(pArmedWeapon != weaponid[2]){
- if(!IsPlayerAttachedObjectSlotUsed(playerid,1)){
- SetPlayerAttachedObject(playerid,1,GetWeaponModel(weaponid[2]),8, -0.079999, -0.039999, 0.109999, -90.100006, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
- RemovePlayerAttachedObject(playerid,1);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
- RemovePlayerAttachedObject(playerid,1);
- }
- if(weaponid[4] && weaponammo[4] > 0){
- if(pArmedWeapon != weaponid[4]){
- if(!IsPlayerAttachedObjectSlotUsed(playerid,2)){
- SetPlayerAttachedObject(playerid,2,GetWeaponModel(weaponid[4]),7, 0.000000, -0.100000, -0.080000, -95.000000, -10.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
- RemovePlayerAttachedObject(playerid,2);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
- RemovePlayerAttachedObject(playerid,2);
- }
- if(weaponid[5] && weaponammo[5] > 0){
- if(pArmedWeapon != weaponid[5]){
- if(!IsPlayerAttachedObjectSlotUsed(playerid,3)){
- SetPlayerAttachedObject(playerid,3,GetWeaponModel(weaponid[5]),1, 0.200000, -0.119999, -0.059999, 0.000000, 206.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
- RemovePlayerAttachedObject(playerid,3);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
- RemovePlayerAttachedObject(playerid,3);
- }
- #if ARMEDBODY_USE_HEAVY_WEAPON
- if(weaponid[7] && weaponammo[7] > 0){
- if(pArmedWeapon != weaponid[7]){
- if(!IsPlayerAttachedObjectSlotUsed(playerid,4)){
- SetPlayerAttachedObject(playerid,4,GetWeaponModel(weaponid[7]),1,-0.100000, 0.000000, -0.100000, 84.399932, 112.000000, 10.000000, 1.099999, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
- RemovePlayerAttachedObject(playerid,4);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
- RemovePlayerAttachedObject(playerid,4);
- }
- #endif
- armedbody_pTick[playerid] = GetTickCount();
- }
- new Float:Health;
- GetPlayerHealth(playerid,Health);
- if(Health >= 90)
- {
- TextDrawSetString(HealthBar[playerid],"..........");
- return 1;
- }
- if(Health >= 80)
- {
- TextDrawSetString(HealthBar[playerid],".........");
- return 1;
- }
- if(Health >= 70)
- {
- TextDrawSetString(HealthBar[playerid],"........");
- return 1;
- }
- if(Health >= 60)
- {
- TextDrawSetString(HealthBar[playerid],".......");
- return 1;
- }
- if(Health >= 50)
- {
- TextDrawSetString(HealthBar[playerid],"......");
- return 1;
- }
- if(Health >= 40)
- {
- TextDrawSetString(HealthBar[playerid],".....");
- return 1;
- }
- if(Health >= 30)
- {
- TextDrawSetString(HealthBar[playerid],"....");
- return 1;
- }
- if(Health >= 20)
- {
- TextDrawSetString(HealthBar[playerid],"...");
- return 1;
- }
- if(Health >= 10)
- {
- TextDrawSetString(HealthBar[playerid],"..");
- return 1;
- }
- if(Health > 0)
- {
- TextDrawSetString(HealthBar[playerid],".");
- return 1;
- }
- return 1;
- }
- public Counting(playerid)
- {
- Count = 1;
- GameTextForAll("~y~3",1000,6);
- PlayerPlaySound(playerid, 1056,0,0,0);
- SetTimer("Counting2",1000,false);
- return 1;
- }
- public Counting2(playerid)
- {
- Count = 1;
- GameTextForAll("~g~2",1000,6);
- PlayerPlaySound(playerid, 1056,0,0,0);
- SetTimer("Counting1",1000,false);
- return 1;
- }
- public Counting1(playerid)
- {
- Count = 1;
- GameTextForAll("~b~1",1000,6);
- PlayerPlaySound(playerid, 1056,0,0,0);
- SetTimer("CountingGO",1000,false);
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
- {
- if(IsABike(GetPlayerVehicleID(playerid)))
- {
- switch(GetPlayerSkin(playerid))
- {
- #define SPAO{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, SLOT, 18645, 2, (%0), (%1), (%2), (%3), (%4), (%5));
- case 0, 65, 74, 149, 208, 273: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000}
- case 1..6, 8, 14, 16, 22, 27, 29, 33, 41..49, 82..84, 86, 87, 119, 289: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 77.000000, 0.000000}
- case 7, 10: SPAO{0.090000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
- case 9: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
- case 11..13: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
- case 15: SPAO{0.059999, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
- case 17..21: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 23..26, 28, 30..32, 34..39, 57, 58, 98, 99, 104..118, 120..131: SPAO{0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 40: SPAO{0.050000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 50, 100..103, 148, 150..189, 222: SPAO{0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 51..54: SPAO{0.100000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 55, 56, 63, 64, 66..73, 75, 76, 78..81, 133..143, 147, 190..207, 209..219, 221, 247..272, 274..288, 290..293: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 59..62: SPAO{0.079999, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 77: SPAO{0.059999, 0.019999, 0.000000, 87.000000, 82.000000, 0.000000}
- case 85, 88, 89: SPAO{0.070000, 0.039999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 90..97: SPAO{0.050000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 132: SPAO{0.000000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 144..146: SPAO{0.090000, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
- case 220: SPAO{0.029999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 223, 246: SPAO{0.070000, 0.050000, 0.000000, 88.000000, 82.000000, 0.000000}
- case 224..245: SPAO{0.070000, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 294: SPAO{0.070000, 0.019999, 0.000000, 91.000000, 84.000000, 0.000000}
- case 295: SPAO{0.050000, 0.019998, 0.000000, 86.000000, 82.000000, 0.000000}
- case 296..298: SPAO{0.064999, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
- case 299: SPAO{0.064998, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
- }
- }
- }
- else
- {
- RemovePlayerAttachedObject(playerid, SLOT);
- }
- return 1;
- }
- public CountingGO(playerid)
- {
- Count = 0;
- PlayerPlaySound(playerid, 1057,0,0,0);
- GameTextForAll("~r~GO!!!",1000,6);
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- CMD:buytools(playerid, params[])
- {
- #pragma unused params
- if(IsPlayerInRangeOfPoint(playerid, 2.5,2865.6177,-1929.4780,11.1094))
- {
- new string[128];
- format(string,128,"FishingTools $%d\nWorms $%d per one",FishingToolPrice,BaitPrice);
- ShowPlayerDialog(playerid, 360, DIALOG_STYLE_LIST, "Fishing tools", string,"Purchase","Exit");
- return 1;
- }
- return 1;
- }
- CMD:inventory(playerid, params[])
- {
- #pragma unused params
- new string[128];
- new string2[128];
- new string3[128];
- SendClientMessage(playerid, COLOR_GREEN, "____|| Your inventory ||___");
- if(FishingTool[playerid]==1)
- {
- format(string,sizeof(string)," - Fishing Tool");
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- if(Worms[playerid]>0)
- {
- format(string2,sizeof(string2)," - %d Worms", Worms[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW, string2);
- }
- if(Fishes[playerid]>0)
- {
- format(string3,sizeof(string3)," - %d fishes", Fishes[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW, string3);
- }
- SendClientMessage(playerid, COLOR_GREEN, "___________________________");
- return 1;
- }
- CMD:fishhelp(playerid, params[])
- {
- #pragma unused params
- SendClientMessage(playerid,COLOR_GREEN,"________|| Fishing Help ||___________");
- SendClientMessage(playerid,COLOR_WHITE,"/inventory /buytools");
- SendClientMessage(playerid,COLOR_WHITE,"/fish");
- SendClientMessage(playerid,COLOR_WHITE,"/releaseallfishes");
- SendClientMessage(playerid,COLOR_WHITE,"/sellfishes");
- SendClientMessage(playerid,COLOR_GREEN,"_____________________________________");
- return 1;
- }
- CMD:releaseallfishes(playerid, params[])
- {
- #pragma unused params
- if(Fishes[playerid] > 0 && IsAtFishPlace(playerid))
- {
- SendClientMessage(playerid, COLOR_YELLOW2, "You released all fishes back in sea.");
- Fishes[playerid] = 0;
- FishWeight[playerid] = 0;
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You already don't have fishes or you are not at fishing place(Big Wheel)");
- return 1;
- }
- }
- COMMAND:start(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2)
- return SendClientMessage(playerid, COLOR_RED, "Äîñòúï îòêàçàí."); new Masyvas[((265 + MAX_VARIANT_SIZE) + MAX_VARIANT_SIZE) + MAX_QUESTION_SIZE];
- format(Masyvas,sizeof Masyvas,"{ffff00}1.{ffffff} Set poll question. ({ff0000}%s{ffffff})\n{ffff00}2.{ffffff} Set Y variant. ({ff0000}%s{ffffff})\n{ffff00}3.{ffffff} Set N variant. ({ff0000}%s{ffffff})\n{ffff00}4.{ffffff} %s.\n{ffff00}5.{ffffff} Null parameters.",Poll[Question],Poll[yVariant],Poll[nVariant],(Poll[Start]) ? ("Stop poll") : ("Start poll"));
- ShowPlayerDialog(playerid, GUI_DIALOG_ID, DIALOG_STYLE_LIST, "{ffffff}Poll settings", Masyvas, "Set", "Close");
- return 1;
- }
- CMD:fish(playerid, params[])
- {
- #pragma unused params
- new string[128];
- new name[MAX_PLAYER_NAME];
- if(FishingTool[playerid] == 1)
- {
- if(Worms[playerid] > 0)
- {
- if(IsAtFishPlace(playerid))
- {
- if(AlreadyFished[playerid] == 0 && IsFishing[playerid] == 0)
- {
- if(Fishes[playerid] >= 15)
- {
- SendClientMessage(playerid,COLOR_RED,"You have enough fishes and you are tiered of fishing.");
- SendClientMessage(playerid,COLOR_RED,"You can sell your fishes at Los Santos docks (/sellfish @ CheckPoint)");
- AlreadyFished[playerid] = 1;
- SetPlayerCheckpoint(playerid, 2766.6602,-2575.1614,3.0000,3.0);
- SetTimerEx("StopFish", 1000*60*10, 0, "i",playerid);
- }
- else
- {
- new random2 = randomEx(4000,14000);
- IsFishing[playerid] = 1;
- SetTimerEx("FishTime", random2, 0, "i",playerid);
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s swings fishing rod and starts to wait for fish",name);
- SendRPMessage(playerid, 20.0, COLOR_PURPLE, string);
- GameTextForPlayer(playerid, "~w~Fishing...",random2,3);
- TogglePlayerControllable(playerid, false);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You need to wait some time to fish again.");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are not at fishing place(Big Whell or on water)");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You dont have any Baits, buy them at lighthouse");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You don't have fishing tools, buy them at lighthouse");
- }
- return 1;
- }
- CMD:sellfish(playerid, params[])
- {
- #pragma unused params
- if(Fishes[playerid] >= 1)
- {
- if(IsPlayerInRangeOfPoint(playerid, 3.0,2766.6602,-2575.1614,3.0000))
- {
- new string[128];
- Fishes[playerid] = 0;
- format(string,sizeof(string),"You sold all your fishes for $%d.", FishWeight[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- GivePlayerMoney(playerid, FishWeight[playerid]);
- FishWeight[playerid] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You need to be at Los Santos docks.");
- SetPlayerCheckpoint(playerid, 2766.6602,-2575.1614,3.0000,3.0);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You dont have any fishes that you can sell.");
- return 1;
- }
- return 1;
- }
- CMD:heal(playerid, params[])
- {
- new pid;
- if(PlayerInfo[playerid][Medic] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè ëåêàð.");
- else if(sscanf(params,"u",pid)) SendClientMessage(playerid,COLOUR_RED,"USAGE: /heal [ID]");
- else if(pid == INVALID_PLAYER_ID) SendClientMessage(playerid,COLOUR_RED,"Player was not found.");
- else
- {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(pid, X, Y, Z);
- if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
- return SendClientMessage(playerid, -1, "You are not close enough to the specified player!");
- new give[42],got[51],name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- GetPlayerName(pid,name2,sizeof(name2));
- SetPlayerHealth(pid,100);
- format(give,sizeof(give),"Âèå èçëåêóâàõòå %s",name2);
- format(got,sizeof(got),"Èçëåêóâàí ñòå îò ëåêàð %s",name);
- SendClientMessage(playerid,COLOUR_YELLOW,give);
- SendClientMessage(pid,COLOUR_YELLOW,got);
- }
- return 1;
- }
- CMD:ad(playerid, params[])
- {
- new text;
- if(sscanf(params,"s",text)) SendClientMessage(playerid,COLOUR_RED,"USAGE: /ad [Òåêñò]");
- else
- {
- new got[51],name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(got,sizeof(got),"[%s]Ðåêëàìà: %s",name,text);
- SendClientMessageToAll(COLOUR_YELLOW, got);
- GivePlayerMoney(playerid,-380);
- SendClientMessage(playerid,COLOUR_RED,"Âèå ïëàòèõòå $380 çà ðåêëàìàòà");
- }
- return 1;
- }
- CMD:sethp(playerid, params[])
- {
- new pid,ammount;
- if(PlayerInfo[playerid][pAdmin] < 4)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- else if(sscanf(params,"ud",pid,ammount)) SendClientMessage(playerid,COLOUR_RED,"USAGE: /sethp [ID] [Ammount]");
- else if(pid == INVALID_PLAYER_ID) SendClientMessage(playerid,COLOUR_RED,"Player was not found");
- else
- {
- new string[50],string1[50],name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- GetPlayerName(pid,name2,sizeof(name2));
- SetPlayerHealth(pid,ammount);
- format(string,sizeof(string),"You have set %s's health",name2);
- format(string1,sizeof(string1),"Your health has been set by %s ",name);
- SendClientMessage(pid,COLOUR_YELLOW,string1);
- SendClientMessage(playerid,COLOUR_YELLOW,string);
- }
- return 1;
- }
- CMD:infernus(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 3)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- new Float:X;
- new Float:Y;
- new Float:Z;
- GetPlayerPos(playerid,X,Y,Z);
- GameTextForPlayer(playerid,"~h~~w~INFERNUS~n~~h~~w~ID:~h~~r~411",2500,1);
- CreateVehicle(411,X,Y+5,Z,1,1,1,90000);
- return 1;
- }
- CMD:setdeath(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][pAdmin] < 6)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/setdeath <playerid> <level>");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
- else
- {
- format (atext, sizeof(atext), "You Give Player Deaths:%i",level);
- SendClientMessage(gamer, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Admin Give You Deaths:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][pDeaths] = level;
- }
- return 1;
- }
- CMD:setkills(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][pAdmin] < 6)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/setkills <playerid> <level>");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
- else
- {
- format (atext, sizeof(atext), "You Give Player Kills:%i",level);
- SendClientMessage(gamer, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Admin Give You Kills:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][pKills] = level;
- }
- return 1;
- }
- CMD:setlevel(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][pAdmin] < 6)
- return SendClientMessage(playerid, COLOR_RED, "Äîñòúï îòêàçàí.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setlevel <Èãðà÷> <Íèâî>");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íå å íàìåðåí");
- else
- {
- format (atext, sizeof(atext), "Âèå íàïðàâèõòå íèâîòî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí íàïðàâè íèâîòî âè íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][pLevel] = level;
- }
- return 1;
- }
- CMD:givecash(playerid, params[])
- {
- new pid,ammount;
- if(PlayerInfo[playerid][pAdmin] < 7)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- else if(sscanf(params,"ud",pid,ammount)) SendClientMessage(playerid,COLOUR_RED,"USAGE: /givecash [ID] [Ammount]");
- else if(pid == INVALID_PLAYER_ID) SendClientMessage(playerid,COLOUR_RED,"Player was not found");
- else
- {
- new string[128],string1[128],name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- GetPlayerName(pid,name2,sizeof(name2));
- GivePlayerMoney(pid,ammount);
- format(string,sizeof(string),"You have given %s money",name2);
- format(string1,sizeof(string1),"%s has given you money using admin power ",name);
- SendClientMessage(pid,COLOUR_YELLOW,string1);
- SendClientMessage(playerid,COLOUR_YELLOW,string);
- return 1;
- }
- return 1;
- }
- CMD:setcash(playerid, params[])
- {
- new pid,ammount;
- if(PlayerInfo[playerid][pAdmin] < 7)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- else if(sscanf(params,"ud",pid,ammount)) SendClientMessage(playerid,COLOUR_RED,"USAGE: /setcash [ID] [Ammount]");
- else if(pid == INVALID_PLAYER_ID) SendClientMessage(playerid,COLOUR_RED,"Player was not found");
- else
- {
- new string[50],string1[70],name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- GetPlayerName(pid,name2,sizeof(name2));
- SetPlayerMoney(pid,ammount);
- format(string,sizeof(string),"You have set %s's money",name2);
- format(string1,sizeof(string1),"%s has set your money using admin power ",name);
- SendClientMessage(pid,COLOUR_YELLOW,string1);
- SendClientMessage(playerid,COLOUR_YELLOW,string);
- return 1;
- }
- return 1;
- }
- CMD:givew(playerid, params[])
- {
- new pid,wepid,ammo;
- if(PlayerInfo[playerid][pAdmin] < 6)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- else if(sscanf(params,"udd",pid,wepid,ammo)) SendClientMessage(playerid,COLOUR_RED,"USAGE: /givew [ID] [Wep ID] [Ammo]");
- else if(pid == INVALID_PLAYER_ID) SendClientMessage(playerid,COLOUR_RED,"Player was not found");
- else
- {
- new string[50],string1[50],name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- GetPlayerName(pid,name2,sizeof(name2));
- GivePlayerWeapon(pid,wepid,ammo);
- format(string,sizeof(string),"You have given %s a weapon",name2);
- format(string1,sizeof(string1),"%s has given you a weapon ",name);
- SendClientMessage(pid,COLOUR_YELLOW,string1);
- SendClientMessage(playerid,COLOUR_YELLOW,string);
- return 1;
- }
- return 1;
- }
- CMD:disarm(playerid, params[])
- {
- new pid;
- if(PlayerInfo[playerid][pAdmin] < 3)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- else if(sscanf(params,"u",pid)) SendClientMessage(playerid,COLOUR_RED,"USAGE: /disarm [ID]");
- else if(pid == INVALID_PLAYER_ID) SendClientMessage(playerid,COLOUR_RED,"Player was not found.");
- else
- {
- new give[42],got[51],name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- GetPlayerName(pid,name2,sizeof(name2));
- ResetPlayerWeapons(playerid);
- format(give,sizeof(give),"You have reset %s's weapons",name2);
- format(got,sizeof(got),"Your weapons have been resetted by %s",name);
- SendClientMessage(playerid,COLOUR_YELLOW,give);
- SendClientMessage(pid,COLOUR_RED,got);
- }
- return 1;
- }
- CMD:nradio(playerid, params[])
- {
- if(PlayerInfo[playerid][Radio] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Íÿìàø ðàäèî.");
- new string[100], pname[24];
- if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /nradio [msg]");
- GetPlayerName(playerid, pname, 24);
- format(string, sizeof(string), "** %s [%d] [Radio]: %s",pname,playerid,params);
- printf("%s", string);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i)) if(PlayerInfo[i][Radio] == 1) SendClientMessage(i, COLOR_WHITE, string);
- }
- return 1;
- }
- CMD:pradio(playerid, params[])
- {
- if(PlayerInfo[playerid][Police] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Íÿìàø ðàäèî.");
- new string[100], pname[24];
- if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /pradio [msg]");
- GetPlayerName(playerid, pname, 24);
- format(string, sizeof(string), "** %s [%d] [Police] [Radio]: %s",pname,playerid,params);
- printf("%s", string);
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i)) if(PlayerInfo[i][Police] <= 1) SendClientMessage(i, COLOR_WHITE, string);
- }
- return 1;
- }
- CMD:goto(playerid, params[])
- {
- new pid;
- if(PlayerInfo[playerid][pAdmin] < 2)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- else if(sscanf(params,"u",pid)) SendClientMessage(playerid,COLOUR_RED,"USAGE: /goto [ID]");
- else
- {
- new Float:X,Float:Y,Float:Z,pint,name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME],string[40],string2[39];
- GetPlayerName(playerid,name,sizeof(name));
- GetPlayerName(pid,name2,sizeof(name2));
- GetPlayerPos(pid,X,Y,Z);
- pint = GetPlayerInterior(pid);
- SetPlayerPos(playerid,X+1,Y,Z);
- SetPlayerInterior(playerid,pint);
- format(string,sizeof(string),"You have teleported to %s",name2);
- format(string2,sizeof(string2),"%s has teleported to you",name);
- SendClientMessage(playerid,COLOUR_YELLOW,string);
- SendClientMessage(pid,COLOUR_YELLOW,string2);
- return 1;
- }
- return 1;
- }
- CMD:get(playerid, params[])
- {
- new pid;
- if(PlayerInfo[playerid][pAdmin] < 3)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- else if(sscanf(params,"u",pid)) SendClientMessage(playerid,COLOUR_RED,"USAGE: /get [ID]");
- else
- {
- new Float:X,Float:Y,Float:Z,pint,name[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME],string[44],string2[45];
- GetPlayerName(playerid,name,sizeof(name));
- GetPlayerName(pid,name2,sizeof(name2));
- GetPlayerPos(playerid,X,Y,Z);
- pint = GetPlayerInterior(playerid);
- SetPlayerPos(pid,X+1,Y,Z);
- SetPlayerInterior(pid,pint);
- format(string,sizeof(string),"You have teleported %s to you",name2);
- format(string2,sizeof(string2),"You have been teleported to %s",name);
- SendClientMessage(playerid,COLOUR_YELLOW,string);
- SendClientMessage(pid,COLOUR_YELLOW,string2);
- return 1;
- }
- return 1;
- }
- CMD:warp(playerid, params[])
- {
- new pid,tid;
- if(PlayerInfo[playerid][pAdmin] < 4)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- else if(sscanf(params,"uu",tid,pid)) SendClientMessage(playerid,COLOUR_RED,"USAGE: /warp [ID] [ID]");
- else
- {
- new name1[MAX_PLAYER_NAME],name2[MAX_PLAYER_NAME],name3[MAX_PLAYER_NAME],Float:X,Float:Y,Float:Z,int,string1[58],string2[65],string3[65];
- GetPlayerName(playerid,name1,sizeof(name1));
- GetPlayerName(tid,name2,sizeof(name2));
- GetPlayerName(pid,name3,sizeof(name3));
- GetPlayerPos(pid,X,Y,Z);
- int = GetPlayerInterior(pid);
- SetPlayerPos(tid,X+1,Y,Z);
- SetPlayerInterior(tid,int);
- format(string1,sizeof(string1),"You have teleported %s to %s",name2,name3);//playerid
- format(string2,sizeof(string2),"You have been teleported to %s by %s",name3,name1);//tid
- format(string3,sizeof(string3),"%s has been teleported to you by %s",name2,name1);//pid
- SendClientMessage(playerid,COLOUR_YELLOW,string1);
- SendClientMessage(tid,COLOUR_YELLOW,string2);
- SendClientMessage(pid,COLOUR_YELLOW,string3);
- return 1;
- }
- return 1;
- }
- CMD:pay(playerid, params[])
- {
- new otherid, cash;
- if (sscanf(params, "dd", otherid, cash)) SendClientMessage(playerid, 0xFF0000AA, "Usage: /pay [ID] [Cash]");
- else
- {
- if(GetPlayerMoney(playerid) < cash) SendClientMessage(playerid, COLOR_RED, "You don't have that much!");
- if(!IsPlayerConnected(otherid)) SendClientMessage(playerid, COLOR_RED, "That PlayerID is not connected!");
- if(otherid == playerid) SendClientMessage(playerid, COLOR_RED, "It is pointless to pay yourself..");
- else
- {
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(otherid, X, Y, Z);
- if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
- return SendClientMessage(playerid, -1, "You are not close enough to the specified player!");
- GivePlayerMoney(playerid, -cash);
- GivePlayerMoney(otherid, cash);
- }
- }
- return 1;
- }
- CMD:check(playerid, params[])
- {
- new gamer;
- if(PlayerInfo[playerid][Police] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "u", gamer)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/check <Èãðà÷>");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else
- {
- new atext[128];
- new wanted = PlayerInfo[gamer][Wanted];
- format(atext, sizeof(atext), "Wanted on player: %d", wanted);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- }
- return 1;
- }
- CMD:setadmin(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(!IsPlayerAdmin(playerid))
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setadmin <Èãðà÷> <Íèâî>");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else
- {
- format (atext, sizeof(atext), "Âèå íàïðàâèõòå àäìèí íèâîòî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí íàïðàâè âàøåòî àäìèí íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][pAdmin] = level;
- }
- return 1;
- }
- CMD:setgov(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][pAdmin] < 8)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè Àäìèí.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setgov <Èãðà÷> <Íèâî>");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 1) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-1!.");
- else
- {
- format (atext, sizeof(atext), "Âèå íàïðàâèõòå êìåòñêîòî âè íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí íàïðàâè âàøåòî êìåòñêî íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Goverment] = level;
- PlayerInfo[gamer][Faction] = 1;
- }
- return 1;
- }
- CMD:updatepolice(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè êìåò.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/updatepolice <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íÿìà ñëóæáà.");
- else if(PlayerInfo[gamer][Police] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íå å ïîëèöàé.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 5) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-5!.");
- else
- {
- format (atext, sizeof(atext), "Âèå ïðîìåíèõòå ïîëèöåèñêîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Êìåòà ïðîìåíè âàøåòî ïîëèöåèñêîòî íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Police] = level;
- }
- return 1;
- }
- CMD:setpolice(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè êìåò.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setpolice <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 1) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ âå÷å èìà Ôàêöèÿ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 5) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-5!.");
- else
- {
- format (atext, sizeof(atext), "Âèå íàïðàâèõòå ïîëèöåèñêîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí íàïðàâè âàøåòî ïîëèöåèñêîòî íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Police] = level;
- PlayerInfo[gamer][Faction] = 1;
- }
- return 1;
- }
- CMD:updatemedic(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè êìåò.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/updatemedic <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íÿìà ñëóæáà.");
- else if(PlayerInfo[gamer][Medic] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íå å ëåêàð.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 1) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-1!.");
- else
- {
- format (atext, sizeof(atext), "Âèå ïðîìåíèõòå ëåêàðñêîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Êìåòà ïðîìåíè âàøåòî ëåêàðñêî íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Police] = level;
- }
- return 1;
- }
- CMD:setmedic(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setmedic <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà Ôàêöèÿ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 1) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-1!.");
- else
- {
- format (atext, sizeof(atext), "Âèå íàïðàâèõòå ìåäèöèíñêî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí íàïðàâè âàøåòî ìåäèöèíñêîòî íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Medic] = level;
- PlayerInfo[gamer][Faction] = 1;
- }
- return 1;
- }
- CMD:updatearmy(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè êìåò.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/updatearmy <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íÿìà ñëóæáà.");
- else if(PlayerInfo[gamer][Army] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íå å âîåíåí.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 3) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-3!.");
- else
- {
- format (atext, sizeof(atext), "Âèå ïðîìåíèõòå âîåííîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Êìåòà ïðîìåíè âàøåòî âîåííî íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Police] = level;
- }
- return 1;
- }
- CMD:setarmy(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setarmy <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà Ôàêöèÿ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 3) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-3!.");
- else
- {
- format (atext, sizeof(atext), "Âèå íàïðàâèõòå âîåííîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí íàïðàâè âàøåòî âîåííî âè íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Medic] = level;
- PlayerInfo[gamer][Faction] = 1;
- }
- return 1;
- }
- CMD:updatecia(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè êìåò.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/updatecia <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íÿìà ñëóæáà.");
- else if(PlayerInfo[gamer][CIA] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íå å àãåíò.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 3) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-3!.");
- else
- {
- format (atext, sizeof(atext), "Âèå ïðîìåíèõòå àãåíòñêîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Êìåòà ïðîìåíè âàøåòî àãåíòñêî íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Police] = level;
- }
- return 1;
- }
- CMD:setcia(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setcia <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà Ôàêöèÿ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 3) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-3!.");
- else
- {
- format (atext, sizeof(atext), "Âèå íàïðàâèõòå àãåíòñêîòî íèâîòî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí íàïðàâè âàøåòî àãåíòñêî âè íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Medic] = level;
- PlayerInfo[gamer][Faction] = 1;
- }
- return 1;
- }
- CMD:updatefire(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè êìåò.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/updatefire <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íÿìà ñëóæáà.");
- else if(PlayerInfo[gamer][Fire] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íå å ïîæàðíèêàð.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 1) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-1!.");
- else
- {
- format (atext, sizeof(atext), "Âèå ïðîìåíèõòå ïîæàðíèêàðñêîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Êìåòà ïðîìåíè âàøåòî ïîæàðíèêàðñêî íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Police] = level;
- }
- return 1;
- }
- CMD:setfire(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setfire <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà Ôàêöèÿ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 1) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-1!.");
- else
- {
- format (atext, sizeof(atext), "Âèå íàïðàâèõòå ïîæàðíèêàðñêîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí íàïðàâè ïàæàðíèêàðñêî âè íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Medic] = level;
- PlayerInfo[gamer][Faction] = 1;
- }
- return 1;
- }
- CMD:updatenews(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè êìåò.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/updatenews <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íÿìà ñëóæáà.");
- else if(PlayerInfo[gamer][News] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íå å íîâèíàð.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 1) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-1!.");
- else
- {
- format (atext, sizeof(atext), "Âèå ïðîìåíèõòå íîâèíàðñêîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Êìåòà ïðîìåíè âàøåòî íîâèíàðñêî íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Police] = level;
- }
- return 1;
- }
- CMD:setnews(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setnews <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà Ôàêöèÿ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 1) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-1!.");
- else
- {
- format (atext, sizeof(atext), "Âèå íàïðàâèõòå ïîæàðíèêàðñêîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí íàïðàâè ïàæàðíèêàðñêî âè íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Medic] = level;
- PlayerInfo[gamer][Faction] = 1;
- }
- return 1;
- }
- CMD:updatelic(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè êìåò.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/updatelic <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íÿìà ñëóæáà.");
- else if(PlayerInfo[gamer][Licenser] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íå å èíñòðóêòîð.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 1) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-1!.");
- else
- {
- format (atext, sizeof(atext), "Âèå ïðîìåíèõòå èíñòðóêòóðêîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Êìåòà ïðîìåíè âàøåòî èíñòðóêòóðêî íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Licenser] = level;
- }
- return 1;
- }
- CMD:setlic(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setlic <Èãðà÷> <Íèâî>");
- else if(PlayerInfo[gamer][Faction] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà Ôàêöèÿ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else if(level < 1||level > 1) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè 1-1!.");
- else
- {
- format (atext, sizeof(atext), "Âèå íàïðàâèõòå èíñòðóêòóðêîòî íèâî íà èãðà÷à íà:%i",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí íàïðàâè èíñòðóêòóðêî âè íèâî íà:%i ",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Licenser] = level;
- PlayerInfo[gamer][Faction] = 1;
- }
- return 1;
- }
- CMD:removefaction(playerid, params[])
- {
- new gamer;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Goverment] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Access Denied.");
- if (sscanf(params, "u", gamer )) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/removefaction <Èãðà÷>");
- else if(PlayerInfo[gamer][Faction] == 0) SendClientMessage(playerid, COLOR_RED, "Òîçè èãðà÷ íÿìà èçáðàíà ñëóæáà.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else
- {
- format (atext, sizeof(atext), "Âèå óâîëíèõòå %s",gamer);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Óâîëíåí ñòå â ñëóæáàòà îò êìåòà %s ",playerid);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Police] = 0;
- PlayerInfo[gamer][Medic] = 0;
- PlayerInfo[gamer][Army] = 0;
- PlayerInfo[gamer][CIA] = 0;
- PlayerInfo[gamer][Fire] = 0;
- PlayerInfo[gamer][Licenser] = 0;
- PlayerInfo[gamer][Faction] = 0;
- }
- return 1;
- }
- CMD:carlic(playerid, params[])
- {
- new gamer;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Licenser] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè Ëèöåíñ Èíñòðóêòîð.");
- if (sscanf(params, "u", gamer )) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/carlic <Èãðà÷>");
- else if(PlayerInfo[gamer][CarLic] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà òîçè ëèöåíñ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else
- {
- format (atext, sizeof(atext), "Âèå äàäàõòå Ëèöåíñ çà àâòîìîáèë íà %s",gamer);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "%s âè äàäå Ëèöåíñ çà àâòîìîáèë ",playerid);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][CarLic] = 1;
- }
- return 1;
- }
- CMD:trucklic(playerid, params[])
- {
- new gamer;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Licenser] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè Ëèöåíñ Èíñòðóêòîð.");
- if (sscanf(params, "u", gamer )) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/trucklick <Èãðà÷>");
- else if(PlayerInfo[gamer][TruckLic] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà òîçè ëèöåíñ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else
- {
- format (atext, sizeof(atext), "Âèå äàäàõòå Ëèöåíñ çà Òåæêî-òîâàðíè êàìèîíè íà %s",gamer);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "%s âè äàäå Ëèöåíñ çà Òåæêî-òîâàðíè êàìèîíè ",playerid);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][TruckLic] = 1;
- }
- return 1;
- }
- CMD:helilic(playerid, params[])
- {
- new gamer;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Licenser] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè Ëèöåíñ Èíñòðóêòîð.");
- if (sscanf(params, "u", gamer )) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/helilic <Èãðà÷>");
- else if(PlayerInfo[gamer][HeliLic] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà òîçè ëèöåíñ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else
- {
- format (atext, sizeof(atext), "Âèå äàäàõòå Ëèöåíñ çà Âúçäóøíè ñðåäñòâà íà %s",gamer);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "%s âè äàäå Ëèöåíñ çà Âúçäóøíè ñðåäñòâà ",playerid);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][HeliLic] = 1;
- }
- return 1;
- }
- CMD:bikelic(playerid, params[])
- {
- new gamer;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Licenser] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè Ëèöåíñ Èíñòðóêòîð.");
- if (sscanf(params, "u", gamer )) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/bikelic <Èãðà÷> ");
- else if(PlayerInfo[gamer][BikeLic] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà òîçè ëèöåíñ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else
- {
- format (atext, sizeof(atext), "Âèå äàäàõòå Ëèöåíñ çà Ìîòîöèêëåòè íà %s",gamer);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "%s âè äàäå Ëèöåíñ çà Ìîòîöèêëåòè ",playerid);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][BikeLic] = 1;
- }
- return 1;
- }
- CMD:gunlic(playerid, params[])
- {
- new gamer;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Police] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè Ïîëèöàé.");
- if (sscanf(params, "u", gamer )) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/gunlic <Èãðà÷>");
- else if(PlayerInfo[gamer][GunLic] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà òîçè ëèöåíñ.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else
- {
- format (atext, sizeof(atext), "Âèå äàäàõòå Ëèöåíñ çà Îðúæèÿ íà %s",gamer);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "%s âè äàäå Ëèöåíñ çà Îðúæèÿ ",playerid);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][GunLic] = 1;
- }
- return 1;
- }
- CMD:passport(playerid, params[])
- {
- new gamer;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][Police] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Òè íå ñè Ïîëèöàé.");
- if (sscanf(params, "u", gamer )) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/passport <Èãðà÷>");
- else if(PlayerInfo[gamer][Passport] == 1) SendClientMessage(playerid, COLOR_RED, "Òîé âå÷å èìà ïàñïîðò.");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Èãðà÷à íà å íàìåðåí");
- else
- {
- format (atext, sizeof(atext), "Âèå äàäàõòå ïàñïîðò íà %s",gamer);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "%s âè äàäå ïàñïîðò",playerid);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Passport] = 1;
- }
- return 1;
- }
- CMD:roadblock(playerid,params[])
- {
- new number, atrb = atblock[playerid];
- new string[256];
- new pName[MAX_PLAYER_NAME];
- if(PlayerInfo[playerid][Police] < 1)return SendClientMessage(playerid,COLOR_INTERFACE_BODY,"Íå ñè ïîëèöàé!");
- if(sscanf(params,"d",number))
- {
- SendClientMessage(playerid,COLOR_BLUE,"USAGE: /roadblock <1/2/3/4/5/6/7>");
- SendClientMessage(playerid,COLOR_BLUE,"| 1: Small Roadblock");
- SendClientMessage(playerid,COLOR_BLUE,"| 2: Medium Roadblock");
- SendClientMessage(playerid,COLOR_BLUE,"| 3: Big Roadblock");
- SendClientMessage(playerid,COLOR_BLUE,"| 4: Traffic cone");
- SendClientMessage(playerid,COLOR_BLUE,"| 5: Detour sign");
- SendClientMessage(playerid,COLOR_BLUE,"| 6: Will be sign");
- SendClientMessage(playerid,COLOR_BLUE,"| 7: Line closed sign");
- SendClientMessage(playerid,COLOR_WHITE,"----------------------");
- format(string, sizeof string,"The roadblock will expire after %i minutes, or use /deleteall",EXPIRE_MINUTES);
- SendClientMessage(playerid,COLOR_BLUE,string);
- return 1;
- }
- switch(number)
- {
- case 1:
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- if(atblock[playerid] < MAX_ROADBLOCKS)
- {
- block[atrb][playerid] = CreateObject(1459, X, Y+1, Z-0.5,0,0,A);
- GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
- #if SEND == true
- GetPlayerName(playerid,pName,32);
- format(string,sizeof (string)," %s added a roadblock(%i).",pName,number);
- SendClientMessageToAll(COLOR_GREEN, string);
- #else
- SetTimerEx("ExpireRoadblock", EXPIRE_MINUTES*60000, false, "i", block[atrb][playerid]);
- atblock[playerid] += 1;
- #endif
- } else {
- format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- return 1;
- }
- case 2:
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- if(atblock[playerid] < MAX_ROADBLOCKS)
- {
- block[atrb][playerid] = CreateObject(978, X, Y+1, Z,0,0,A);
- GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
- #if SEND == true
- GetPlayerName(playerid,pName,32);
- format(string,sizeof string,"%s added a roadblock(%i).",pName,number);
- SendClientMessageToAll(COLOR_GREEN, string);
- #else
- SetTimerEx("ExpireRoadblock", EXPIRE_MINUTES*60000, false, "i", block[atrb][playerid]);
- atblock[playerid] += 1;
- #endif
- } else {
- format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- return 1;
- }
- case 3:
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- if(atblock[playerid] < MAX_ROADBLOCKS)
- {
- block[atrb][playerid] = CreateObject(981, X, Y+1, Z,0,0,A);
- GameTextForPlayer(playerid,"~w~Roadblock ~b~Placed!",3000,1);
- #if SEND == true
- GetPlayerName(playerid,pName,32);
- format(string,sizeof string," %s added a roadblock(%i).",pName,number);
- SendClientMessageToAll(COLOR_GREEN,string);
- #else
- SetTimerEx("ExpireRoadblock", EXPIRE_MINUTES*60000, false, "i", block[atrb][playerid]);
- atblock[playerid] += 1;
- #endif
- } else {
- format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- return 1;
- }
- case 4:
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- if(atblock[playerid] < MAX_ROADBLOCKS)
- {
- block[atrb][playerid] = CreateObject(1238, X, Y+1, Z-0.5, 0, 0.0,A);
- GameTextForPlayer(playerid,"~w~Cone ~b~Placed!",3000,1);
- #if SEND == true
- GetPlayerName(playerid,pName,32);
- format(string,sizeof string," %s added a roadblock(%i).",pName,number);
- SendClientMessageToAll(COLOR_GREEN, string);
- #else
- SetTimerEx("ExpireRoadblock", EXPIRE_MINUTES*60000, false, "i", block[atrb][playerid]);
- atblock[playerid] += 1;
- #endif
- } else {
- format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- return 1;
- }
- case 5:
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- if(atblock[playerid] < MAX_ROADBLOCKS)
- {
- block[atrb][playerid] = CreateObject(1425, X, Y+1, Z-0.5, 0, 0.0,A,300);
- GameTextForPlayer(playerid,"~w~Sign ~b~Placed!",3000,1);
- #if SEND == true
- GetPlayerName(playerid,pName,32);
- format(string,sizeof string," %s added a roadblock(%i).",pName,number);
- SendClientMessageToAll(COLOR_GREEN, string);
- #else
- SetTimerEx("ExpireRoadblock", EXPIRE_MINUTES*60000, false, "i", block[atrb][playerid]);
- atblock[playerid] += 1;
- #endif
- } else {
- format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- return 1;
- }
- case 6:
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- if(atblock[playerid] < MAX_ROADBLOCKS)
- {
- block[atrb][playerid] = CreateObject(3265, X, Y+1, Z-0.9, 0, 0.0,A);
- GameTextForPlayer(playerid,"~w~Sign ~b~Placed!",3000,1);
- #if SEND == true
- GetPlayerName(playerid,pName,32);
- format(string,sizeof string," %s added a roadblock(%i).",pName,number);
- SendClientMessageToAll(COLOR_GREEN, string);
- #else
- SetTimerEx("ExpireRoadblock", EXPIRE_MINUTES*60000, false, "i", block[atrb][playerid]);
- atblock[playerid] += 1;
- #endif
- } else {
- format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- return 1;
- }
- case 7:
- {
- new Float:X, Float:Y, Float:Z, Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- if(atblock[playerid] < MAX_ROADBLOCKS)
- {
- block[atrb][playerid] = CreateObject(3091, X, Y+1, Z-0.25, 0, 0.0,A);
- GameTextForPlayer(playerid,"~w~Sign ~b~Placed!",3000,1);
- #if SEND == true
- GetPlayerName(playerid,pName,32);
- format(string,sizeof string," %s added a roadblock(%i).",pName,number);
- SendClientMessageToAll(COLOR_GREEN, string);
- #else
- SetTimerEx("ExpireRoadblock",EXPIRE_MINUTES*60000, false, "i", block[atrb][playerid]);
- atblock[playerid] += 1;
- #endif
- } else {
- format(string,sizeof string,"You cannot place more then %i Roadblocks!",MAX_ROADBLOCKS);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- return 1;
- }
- }
- return 1;
- }
- CMD:deleteall(playerid,params[])
- {
- if(PlayerInfo[playerid][Police] < 1)return SendClientMessage(playerid,COLOR_INTERFACE_BODY,"Íå ñè ïîëèöàé!");
- for(new i=0;i<=sizeof(block);i++) DestroyObject(block[i][playerid]);
- return 1;
- }
- CMD:rb(playerid, params[])
- return cmd_roadblock(playerid, params);
- CMD:suspect(playerid,params[])
- {
- new id,lvl,string[128];
- if(PlayerInfo[playerid][Police] < 1)return SendClientMessage(playerid,COLOR_INTERFACE_BODY,"Íå ñè ïîëèöàé!");
- if(sscanf(params,"ui",id,lvl)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/suspect <playerid> <level 1-6>");
- if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED,"Èãðà÷à íå å â ñúðâúðà");
- if(lvl < 0||lvl > 6) return SendClientMessage(playerid,COLOR_RED,"Ìàõèìóì ëåâåëè íà èçäèðâàíå 1-6!.");
- SetPlayerWantedLevel(id,lvl);
- format(string,sizeof(string)," Èãðà÷à %s(ID:%d)'s ïîëó÷è ëåâåë íà èçäèðâàíå %d!",GetName(id),id,lvl);
- SendClientMessage(playerid,COLOR_GREEN,string);
- format(string,sizeof(string)," Òè ïîëó÷è ñúñïåêò îò %s(ID:%d) òâîåòî íèâî íà èçäèðâàíå å %i!",GetName(playerid),playerid,lvl);
- SendClientMessage(id,COLOR_GREEN,string);
- return 1;
- }
- new Float:JailCellSpawns[][3] =
- {
- {197.3941,162.4637,1003.0300},
- {194.3641,175.6378,1003.0234},
- {197.8117,174.2043,1003.0234}
- };
- COMMAND:arrest(playerid,params[])
- {
- new pId;
- if(PlayerInfo[playerid][Police] < 1 || PlayerInfo[playerid][Army] < 1 || PlayerInfo[playerid][CIA] < 1)return SendClientMessage(playerid,COLOR_INTERFACE_BODY,"Íå ñè ïîëèöàé!");
- if(sscanf(params, "d", pId)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /arrest [ID]");
- else if(!IsPlayerConnected(pId)) return SendClientMessage(playerid, 0xFF0000AA, "The ID You Entered Was Not Found.");
- else
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(pId, x, y, z);
- if(IsPlayerInRangeOfPoint(playerid, 0.5, x, y, z))
- {
- new pname[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME], string1[250], string2[256];
- GetPlayerName(playerid, pname, sizeof(pname));
- GetPlayerName(pId, aname, sizeof(aname));
- if (GetPlayerWantedLevel(pId) == 0)
- {
- SendClientMessage(playerid, 0xFF0000AA, "Òîçè èãðà÷ íå å èçäèðâàí!");
- return 1;
- }
- else if (GetPlayerWantedLevel(pId) > 1)
- {
- new WantedLevel = GetPlayerWantedLevel(pId);
- SetPlayerInterior(pId, 3);
- new rand = random(sizeof(JailCellSpawns));
- SetPlayerPos(pId, JailCellSpawns[rand][0], JailCellSpawns[rand][1], JailCellSpawns[rand][2]);
- SetTimerEx("UnJail",WantedLevel*1000*60,0,"i",pId);
- GivePlayerMoney(playerid, WantedLevel*430);
- SetPlayerWantedLevel(pId, 0);
- format(string1, sizeof(string1), "%s(%d) Å àðåñòóâàì îò %s(%d)", aname, pId, pname, playerid);
- SendClientMessageToAll(0xFF0000AA, string1);
- format(string2, sizeof(string2), "Âèå ñòå â çàòâîðà %s ìèíóòè çà èçäèðâàíî íèâî %s ", WantedLevel, WantedLevel);
- SendClientMessage(pId, 0xFF0000AA, string2);
- return 1;
- }
- }
- return 1;
- }
- }
- public UnJail(pId)
- {
- SetPlayerPos(pId,1568.6295,-1689.9706,6.2188);
- SetPlayerInterior(pId, 0);
- SendClientMessage(pId, 0xFF0000AA, "Òè ñè ïóñíàò îò çàòâîðà!");
- SetPlayerWantedLevel(pId,0);
- return 1;
- }
- CMD:stats(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- StatsShow(playerid,playerid);
- }
- return 1;}
- forward StatsShow(playerid,targedid);
- public StatsShow(playerid,targedid)
- {
- new pass = PlayerInfo[playerid][pPass];
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(targedid, pName, sizeof(pName));
- new message[128];
- format (message, sizeof(message), "You Hungry: %i ",pass );
- SendClientMessage(playerid, green, message);
- return 1;}
- CMD:setcredits(playerid, params[])
- {
- new gamer,level;
- new text[128];
- new atext[128];
- if(PlayerInfo[playerid][pAdmin] < 7)
- return SendClientMessage(playerid, COLOR_RED, "Äîñòúï îòêàçàí.");
- if (sscanf(params, "ud", gamer , level)) SendClientMessage(playerid, COLOR_RED, "Èçïîëçâàé: \"/setcredits <Èãðà÷> <Áðîéêà>");
- else if (gamer == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, "Player not found");
- else
- {
- format (atext, sizeof(atext), "Âèå äàäàõòå íà èãðà÷ %i êðåäèòà",level);
- SendClientMessage(playerid, COLOR_PURPLE, atext);
- format (text, sizeof(text), "Àäìèí âè äàäå %i êðåäèòà",level);
- SendClientMessage(gamer, COLOR_PURPLE, text);
- PlayerInfo[gamer][Credits] = level;
- }
- return 1;
- }
- CMD:levelup(playerid, params[])
- {
- new level = PlayerInfo[playerid][pLevel];
- new info[248] , info2[248];
- if(PlayerInfo[playerid][Xp] < 8*level)
- {
- format(info2,sizeof(info2),"Òðÿáâàò âè [%d]",level*8);
- SendClientMessage(playerid,white,info2);
- return 1;
- }
- else
- {
- PlayerInfo[playerid][Xp] = 0;
- PlayerInfo[playerid][pLevel]++;
- format(info,sizeof(info)," ~g~ Level Up! ~w~ Your now level: [%d]",level);
- GameTextForPlayer(playerid,info,6000,1);
- return 1;}
- }
- CMD:ip(playerid,params[])
- {
- new id,ip[17],string[65];
- if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid,COLOR_INTERFACE_BODY,"Òè íå ñè àäìèí");
- if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_GREEN,"[ADMIN]:/ip <playerid>");
- GetPlayerIp(id,ip,17);
- format(string,sizeof(string),"» %s(ID:%d)'s IP: %s",GetPName(id),id,ip);
- SendClientMessage(playerid,COLOR_GREEN,string);
- return 1;
- }
- CMD:countdown(playerid,params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- return SendClientMessage(playerid, COLOR_RED, "Äîñòúï îòêàçàí.");
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid, x, y, z);
- if (Count == 0)
- {
- SetTimer("Counting",1000,false);
- }else{
- SendClientMessage(playerid, 0xFF0000FF,"Countdown already started!");
- }
- if IsPlayerInRangeOfPoint(playerid, RANGEOFSTARTER, x, y, z)*then
- {
- TogglePlayerControllable(playerid, 0);
- }
- return 1;
- }
- public IsAtFishPlace(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- if(IsPlayerInRangeOfPoint(playerid,10.0,2911.0813,-2073.5806,1.0749))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,10.0,2914.7356,-2105.4067,1.4454))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,10.0,2910.9504,-2037.5778,1.4346))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,10.0,2913.1492,-2011.3925,1.1975))
- {
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid,10.0,2914.6704,-2049.9504,3.5480) || IsPlayerInRangeOfPoint(playerid,10.0,2939.3528,-2051.5566,3.5480))
- {
- return 1;
- }
- else if(IsPlayerInWater(playerid))
- {
- return 1;
- }
- }
- return 0;
- }
- public FishTime(playerid)
- {
- new string[128];
- if(IsPlayerConnected(playerid))
- {
- new rand = randomEx(1,11);
- new weight = randomEx(50,180);
- new money = randomEx(20, 80);
- if(rand == 1)
- {
- SendClientMessage(playerid,COLOR_GREENYELLOW,"You just fished out some trash and throwed it back in sea");
- Worms[playerid] -= 1;
- IsFishing[playerid] = 0;
- TogglePlayerControllable(playerid,true);
- return 1;
- }
- else if(rand == 2)
- {
- SendClientMessage(playerid,COLOR_GREENYELLOW,"You just fished out tuna!");
- Fishes[playerid] += 1;
- Worms[playerid] -= 1;
- IsFishing[playerid] = 0;
- FishWeight[playerid] += weight;
- TogglePlayerControllable(playerid,true);
- return 1;
- }
- else if(rand == 3)
- {
- SendClientMessage(playerid,COLOR_GREENYELLOW,"You just fished out Swordfish!");
- Fishes[playerid] += 1;
- IsFishing[playerid] = 0;
- Worms[playerid] -= 1;
- FishWeight[playerid] += weight;
- TogglePlayerControllable(playerid,true);
- return 1;
- }
- else if(rand == 4)
- {
- SendClientMessage(playerid,COLOR_GREENYELLOW,"You just fished out Blue Marlin!");
- Fishes[playerid] += 1;
- Worms[playerid] -= 1;
- IsFishing[playerid] = 0;
- FishWeight[playerid] += weight;
- TogglePlayerControllable(playerid,true);
- return 1;
- }
- else if(rand == 5)
- {
- SendClientMessage(playerid,COLOR_GREENYELLOW,"You just fished out Shark!");
- Fishes[playerid] += 1;
- Worms[playerid] -= 1;
- IsFishing[playerid] = 0;
- FishWeight[playerid] += weight;
- TogglePlayerControllable(playerid,true);
- return 1;
- }
- else if(rand == 6)
- {
- format(string,sizeof(string),"You just fished out Wallet and in there was $%d!", money);
- SendClientMessage(playerid,COLOR_GREENYELLOW,string);
- GivePlayerMoney(playerid, money);
- Worms[playerid] -= 1;
- TogglePlayerControllable(playerid,true);
- IsFishing[playerid] = 0;
- return 1;
- }
- else if(rand == 7)
- {
- SendClientMessage(playerid,COLOR_GREENYELLOW,"You just fished out Eel!");
- Fishes[playerid] += 1;
- TogglePlayerControllable(playerid,true);
- Worms[playerid] -= 1;
- IsFishing[playerid] = 0;
- FishWeight[playerid] += weight;
- return 1;
- }
- else if(rand == 8)
- {
- SendClientMessage(playerid,COLOR_GREENYELLOW,"You just fished out Sea Bass!");
- Fishes[playerid] += 1;
- Worms[playerid] -= 1;
- TogglePlayerControllable(playerid,true);
- IsFishing[playerid] = 0;
- FishWeight[playerid] += weight;
- return 1;
- }
- else if(rand == 9)
- {
- SendClientMessage(playerid,COLOR_GREENYELLOW,"You just fished out Sail Fish!");
- Fishes[playerid] += 1;
- TogglePlayerControllable(playerid,true);
- Worms[playerid] -= 1;
- IsFishing[playerid] = 0;
- FishWeight[playerid] += weight;
- return 1;
- }
- else if(rand == 10)
- {
- SendClientMessage(playerid,COLOR_GREENYELLOW,"You didnt catch anything.");
- Worms[playerid] -= 1;
- TogglePlayerControllable(playerid,true);
- IsFishing[playerid] = 0;
- return 1;
- }
- else
- {
- SendClientMessage(playerid,COLOR_GREENYELLOW,"You didnt catch anything, but you your worm remained");
- IsFishing[playerid] = 0;
- TogglePlayerControllable(playerid,true);
- return 1;
- }
- }
- return 0;
- }
- //-----------|| Function By BumbiS* ||--------------||
- public SendRPMessage(playerid, Float:radius, color, string[])
- {
- if(IsPlayerConnected(playerid))
- {
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- if(IsPlayerInRangeOfPoint(i, radius, x,y,z))
- {
- SendClientMessage(i,color,string);
- return 1;
- }
- }
- }
- return 0;
- }
- //--------------------------------------------------||
- //-----------|| By Y_Less ||---------------||
- stock randomEx(minnum = cellmin, maxnum = cellmax) return random(maxnum - minnum + 1) + minnum;
- //----------|| Unknown creater of this, but thanks ||--||
- stock IsPlayerInWater(playerid)
- {
- new Float:x,Float:y,Float:pz;
- GetPlayerPos(playerid,x,y,pz);
- if (
- (IsPlayerInArea(playerid, 2032.1371, 1841.2656, 1703.1653, 1467.1099) && pz <= 9.0484) //lv piratenschiff
- || (IsPlayerInArea(playerid, 2109.0725, 2065.8232, 1962.5355, 10.8547) && pz <= 10.0792) //lv visage
- || (IsPlayerInArea(playerid, -492.5810, -1424.7122, 2836.8284, 2001.8235) && pz <= 41.06) //lv staucamm
- || (IsPlayerInArea(playerid, -2675.1492, -2762.1792, -413.3973, -514.3894) && pz <= 4.24) //sf südwesten kleiner teich
- || (IsPlayerInArea(playerid, -453.9256, -825.7167, -1869.9600, -2072.8215) && pz <= 5.72) //sf gammel teich
- || (IsPlayerInArea(playerid, 1281.0251, 1202.2368, -2346.7451, -2414.4492) && pz <= 9.3145) //ls neben dem airport
- || (IsPlayerInArea(playerid, 2012.6154, 1928.9028, -1178.6207, -1221.4043) && pz <= 18.45) //ls mitte teich
- || (IsPlayerInArea(playerid, 2326.4858, 2295.7471, -1400.2797, -1431.1266) && pz <= 22.615) //ls weiter südöstlich
- || (IsPlayerInArea(playerid, 2550.0454, 2513.7588, 1583.3751, 1553.0753) && pz <= 9.4171) //lv pool östlich
- || (IsPlayerInArea(playerid, 1102.3634, 1087.3705, -663.1653, -682.5446) && pz <= 112.45) //ls pool nordwestlich
- || (IsPlayerInArea(playerid, 1287.7906, 1270.4369, -801.3882, -810.0527) && pz <= 87.123) //pool bei maddog's haus oben
- || (pz < 1.5)
- )
- {
- return 1;
- }
- return 0;
- }
- stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- if (x > minx && x < maxx && y > miny && y < maxy) return 1;
- return 0;
- }
- //----------------------------------------------------||
- public StopFish(playerid)
- {
- AlreadyFished[playerid] = 0;
- SendClientMessage(playerid, COLOR_GREEN, "Hey, you can fish now!");
- return 1;
- }
- //by Double-O-Seven
- stock GetWeaponModel(weaponid)
- {
- switch(weaponid)
- {
- case 1:
- return 331;
- case 2..8:
- return weaponid+331;
- case 9:
- return 341;
- case 10..15:
- return weaponid+311;
- case 16..18:
- return weaponid+326;
- case 22..29:
- return weaponid+324;
- case 30,31:
- return weaponid+325;
- case 32:
- return 372;
- case 33..45:
- return weaponid+324;
- case 46:
- return 371;
- }
- return 0;
- }
- stock IsABike(vehicleid)
- {
- new result;
- new model = GetVehicleModel(vehicleid);
- switch(model)
- {
- case 509, 481, 510, 462, 448, 581, 522, 461, 521, 523, 463, 586, 468, 471: result = model;
- default: result = 0;
- }
- return result;
- }
- stock GetPName(playerid)
- {
- new
- pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- return pName;
- }
- // SScanf
- stock sscanf(string[], format[], {Float,_}:...)
- {
- #if defined isnull
- if (isnull(string))
- #else
- if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
- #endif
- {
- return format[0];
- }
- #pragma tabsize 4
- new
- formatPos = 0,
- stringPos = 0,
- paramPos = 2,
- paramCount = numargs(),
- delim = ' ';
- while (string[stringPos] && string[stringPos] <= ' ')
- {
- stringPos++;
- }
- while (paramPos < paramCount && string[stringPos])
- {
- switch (format[formatPos++])
- {
- case '\0':
- {
- return 0;
- }
- case 'i', 'd':
- {
- new
- neg = 1,
- num = 0,
- ch = string[stringPos];
- if (ch == '-')
- {
- neg = -1;
- ch = string[++stringPos];
- }
- do
- {
- stringPos++;
- if ('0' <= ch <= '9')
- {
- num = (num * 10) + (ch - '0');
- }
- else
- {
- return -1;
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num * neg);
- }
- case 'h', 'x':
- {
- new
- num = 0,
- ch = string[stringPos];
- do
- {
- stringPos++;
- switch (ch)
- {
- case 'x', 'X':
- {
- num = 0;
- continue;
- }
- case '0' .. '9':
- {
- num = (num << 4) | (ch - '0');
- }
- case 'a' .. 'f':
- {
- num = (num << 4) | (ch - ('a' - 10));
- }
- case 'A' .. 'F':
- {
- num = (num << 4) | (ch - ('A' - 10));
- }
- default:
- {
- return -1;
- }
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num);
- }
- case 'c':
- {
- setarg(paramPos, 0, string[stringPos++]);
- }
- case 'f':
- {
- new changestr[16], changepos = 0, strpos = stringPos;
- while(changepos < 16 && string[strpos] && string[strpos] != delim)
- {
- changestr[changepos++] = string[strpos++];
- }
- changestr[changepos] = '\0';
- setarg(paramPos,0,_:floatstr(changestr));
- }
- case 'p':
- {
- delim = format[formatPos++];
- continue;
- }
- case '\'':
- {
- new
- end = formatPos - 1,
- ch;
- while ((ch = format[++end]) && ch != '\'') {}
- if (!ch)
- {
- return -1;
- }
- format[end] = '\0';
- if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
- {
- if (format[end + 1])
- {
- return -1;
- }
- return 0;
- }
- format[end] = '\'';
- stringPos = ch + (end - formatPos);
- formatPos = end + 1;
- }
- case 'u':
- {
- new
- end = stringPos - 1,
- id = 0,
- bool:num = true,
- ch;
- while ((ch = string[++end]) && ch != delim)
- {
- if (num)
- {
- if ('0' <= ch <= '9')
- {
- id = (id * 10) + (ch - '0');
- }
- else
- {
- num = false;
- }
- }
- }
- if (num && IsPlayerConnected(id))
- {
- setarg(paramPos, 0, id);
- }
- else
- {
- #if !defined foreach
- #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
- #define __SSCANF_FOREACH__
- #endif
- string[end] = '\0';
- num = false;
- new
- name[MAX_PLAYER_NAME];
- id = end - stringPos;
- foreach (Player, playerid)
- {
- GetPlayerName(playerid, name, sizeof (name));
- if (!strcmp(name, string[stringPos], true, id))
- {
- setarg(paramPos, 0, playerid);
- num = true;
- break;
- }
- }
- if (!num)
- {
- setarg(paramPos, 0, INVALID_PLAYER_ID);
- }
- string[end] = ch;
- #if defined __SSCANF_FOREACH__
- #undef foreach
- #undef __SSCANF_FOREACH__
- #endif
- }
- stringPos = end;
- }
- case 's', 'z':
- {
- new
- i = 0,
- ch;
- if (format[formatPos])
- {
- while ((ch = string[stringPos++]) && ch != delim)
- {
- setarg(paramPos, i++, ch);
- }
- if (!i)
- {
- return -1;
- }
- }
- else
- {
- while ((ch = string[stringPos++]))
- {
- setarg(paramPos, i++, ch);
- }
- }
- stringPos--;
- setarg(paramPos, i, '\0');
- }
- default:
- {
- continue;
- }
- }
- while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
- {
- stringPos++;
- }
- while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
- {
- stringPos++;
- }
- paramPos++;
- }
- do
- {
- if ((delim = format[formatPos++]) > ' ')
- {
- if (delim == '\'')
- {
- while ((delim = format[formatPos++]) && delim != '\'') {}
- }
- else if (delim != 'z')
- {
- return delim;
- }
- }
- }
- while (delim > ' ');
- return 0;
- }
- stock NullVariables()
- {
- format(Poll[yVariant], 5, "None");
- format(Poll[nVariant], 5, "None");
- format(Poll[Question], 5, "None");
- Poll[Start] = false;
- Poll[yCount] = 0;
- Poll[nCount] = 0;
- Poll[GeneralCount] = 0;
- Poll[Organizator] = INVALID_PLAYER_ID;
- }
- stock IsNumeric(string[])
- {
- for (new i = 0, j = strlen(string); i < j; i++)
- {
- if (string[i] > '9' || string[i] < '0') return 0;
- }
- return 1;
- }
- stock IsValidSkin(SkinID)
- {
- if((SkinID == 0)||(SkinID == 7)||(SkinID >= 9 && SkinID <= 41)||(SkinID >= 43 && SkinID <= 64)||(SkinID >= 66 && SkinID <= 73)||(SkinID >= 75 && SkinID <= 85)||(SkinID >= 87 && SkinID <= 118)||(SkinID >= 120 && SkinID <= 148)||(SkinID >= 150 && SkinID <= 207)||(SkinID >= 209 && SkinID <= 264)||(SkinID >= 274 && SkinID <= 288)||(SkinID >= 290 && SkinID <= 299)) return true;
- else return false;
- }
- stock PlayerName(playerid) {
- new name[255];
- GetPlayerName(playerid, name, 255);
- return name;
- }
- stock GetName(playerid)
- {
- new
- pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- return pName;
- }
- public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:posx, Float:posy, Float:posz;
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
- {
- GetPlayerPos(i, posx, posy, posz);
- tempposx = (oldposx -posx);
- tempposy = (oldposy -posy);
- tempposz = (oldposz -posz);
- if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) // If the player is within 16 meters
- {
- SendClientMessage(i, col1, string);
- }
- else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) // within 8 meters
- {
- SendClientMessage(i, col2, string);
- }
- else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) //4 meters
- {
- SendClientMessage(i, col3, string);
- }
- else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) //2 meters
- {
- SendClientMessage(i, col4, string);
- }
- else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) //1 meter
- {
- SendClientMessage(i, col5, string);
- }
- }
- else
- {
- SendClientMessage(i, col1, string);
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement