Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <YSI\y_ini>
- #include <zcmd>
- #include <sscanf2>
- #include <streamer>
- #include <aim>
- #include <airbreak>
- #include <foreach>
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SUCCESS_1 3
- #define DIALOG_SUCCESS_2 4
- #define DIALOG_PMENU 5
- #define DIALOG_MADMIN 6
- #define DIALOG_PKICK 7
- #define DIALOG_PBAN 8
- #define DIALOG_MAIN 9
- #define DIALOG_AIRBREAK 10
- #define DIALOG_VTUNE 11
- #define DIALOG_SPEED 12
- #define DIALOG_AIM 13
- #define DIALOG_GODMODE 14
- #define DIALOG_AIRBREAKC 15
- #define DIALOG_VTUNEC 16
- #define DIALOG_SPEEDC 17
- #define DIALOG_AIMC 18
- #define DIALOG_GODMODEC 19
- #define DIALOG_MAIN2 20
- #define DIALOG_PMUTE 21
- #define DIALOG_PUNMUTE 22
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_RED 0xFF808085
- #define COLOR_WHITE 0xFFFFFFFF
- #define COLOR_GREEN 0x00FF0000
- #define COLOR_ERROR 0x3366FFFF
- #define COLOR_ADUTY 0x66FFFF00
- #define COLOR_LIGHTRED 0xFF808085
- #define COLOR_Label 0xFFFFFFFF
- #define COLOR_LabelOut 0x00000040
- #define COLOR_ValueOut 0xFFFFFF40
- #define COLOR_Value 0x000000FF
- #define PATH "CAS/Players/%s.ini"
- #define AC_CONFIG_FILE "CAS/Anticheat/Config.cfg"
- #define BPATH "CAS/Business/%i.ini"
- #define SCM SendClientMessage
- #define SCMToAll SendClientMessageToAll
- #define ERROR "You don't have access to use that command."
- #define DRIFT_MINKAT 10.0
- #define DRIFT_MAXKAT 90.0
- #define DRIFT_SPEED 30.0
- #define Label_X 500
- #define Value_X 500
- #define TD_Y 100
- //Reaction system defines
- #define TIME 180000
- #define Loop(%0,%1) \
- for(new %0 = 0; %0 != %1; %0++)
- #define function%0(%1) \
- forward%0(%1); public%0(%1)
- //End here
- //LMB NOS system
- #define HOLDING(%0) \
- ((newkeys & (%0)) == (%0))
- #define RELEASED(%0) \
- (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
- //End here
- forward LoadUser_data(playerid, name[], value[]);
- forward SendAdminMessage(color, text[]);
- forward PlayerSpeed(playerid);
- forward loadac_data(idx, name[],value[]);
- forward GeneralTimer();
- forward DelayedKick(playerid);
- forward settime(playerid);
- forward AutoCarFixer(playerid);
- forward SpeedoUpdate();
- forward SaveBusiness(id);
- forward loadbiz_data(idx, name[], value[]);
- forward Drift();
- forward AngleUpdate();
- forward DriftExit(playerid);
- forward CheckPlayerState();
- new SwearWords[][] =
- {
- "noob",
- "fuck u",
- "fuck",
- "gay",
- "retard"
- };
- enum pInfo
- {
- pPass,
- pCash,
- pAdmin,
- pKills,
- pDeaths,
- pSkin,
- pAduty,
- pMuted,
- pMutedTime,
- pScore,
- pDonator,
- pReportmute,
- BizID,
- DM1Kills,
- DM1Deaths,
- DM2Kills,
- DM2Deaths
- }
- enum acInfo
- {
- Airbreak,
- vTune,
- SpeedCheat,
- GodMode,
- AimScript,
- AirbreakC,
- vTuneC,
- SpeedCheatC,
- GodModeC,
- AimScriptC
- }
- enum bInfo
- {
- bOwner[MAX_PLAYER_NAME],
- bName[123],
- bOwned,
- bPrice,
- bType,
- bLocked,
- Float:bEntranceX,
- Float:bEntranceY,
- Float:bEntranceZ,
- Float:bEntranceA,
- Float:bExitX,
- Float:bExitY,
- Float:bExitZ,
- Float:bExitA,
- bInt,
- bWorld,
- bInsideInt,
- bInsideWorld,
- bInsideIcon,
- bOutsideIcon,
- bLevel,
- bPay
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new ACInfo[acInfo];
- new BusinessInfo[200][bInfo];
- new LogAttemps[MAX_PLAYERS];
- new InsideBiz[MAX_PLAYERS];
- new Text:Textdraw1; //Clock's textdraw
- new Godmode[MAX_PLAYERS];
- new Text:speed[MAX_PLAYERS], Text:health[MAX_PLAYERS];
- new InDM[MAX_PLAYERS] = 0;
- //Drift system start
- new DriftTimer[MAX_PLAYERS];
- new TimerA, TimerC;
- new DriftPointsNow[MAX_PLAYERS];
- new PlayerDriftCancellation[MAX_PLAYERS];
- new Float:ppos[MAX_PLAYERS][3];
- enum Float:Pos{ Float:sX,Float:sY,Float:sZ };
- new Float:SavedPos[MAX_PLAYERS][Pos];
- new bool:DriftMode[MAX_PLAYERS]=false;
- new DriftBonus[MAX_PLAYERS]=1;
- new Float:HealthInit[MAX_PLAYERS]=1000.0;
- new bool:AutoFixBool[MAX_PLAYERS]=true;
- new Text:TDLabels[3];
- new Text:TDValueDrift[MAX_PLAYERS];
- new Text:TDValueBonus[MAX_PLAYERS];
- new Text:TDValueCash[MAX_PLAYERS];
- //Drift system end
- new
- xCharacters[][] =
- {
- "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
- "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",
- "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m",
- "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",
- "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ",", ".", "!",
- "?", "/"
- },
- xChars[16] = "",
- xReactionTimer,
- xCash,
- xScore,
- bool: xTestBusy
- ;
- 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("Skin",PlayerInfo[playerid][pSkin]);
- INI_Int("Adminduty",PlayerInfo[playerid][pAduty]);
- INI_Int("Muted",PlayerInfo[playerid][pMuted]);
- INI_Int("MutedTime",PlayerInfo[playerid][pMutedTime]);
- INI_Int("Score",PlayerInfo[playerid][pScore]);
- INI_Int("Donator",PlayerInfo[playerid][pDonator]);
- INI_Int("Reportmute",PlayerInfo[playerid][pReportmute]);
- INI_Int("BizID",PlayerInfo[playerid][BizID]);
- INI_Int("DM1Kills",PlayerInfo[playerid][DM1Kills]);
- INI_Int("DM1Deaths",PlayerInfo[playerid][DM1Deaths]);
- INI_Int("DM2Kills",PlayerInfo[playerid][DM2Kills]);
- INI_Int("DM2Deaths",PlayerInfo[playerid][DM2Deaths]);
- return 1;
- }
- /*Created by Dracoblue*/
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- main()
- {
- print("Drift/Freeroam by Axemption");
- }
- Float:GetPlayerTheoreticAngle(i)
- {
- new Float:sin;
- new Float:dis;
- new Float:angle2;
- new Float:x,Float:y,Float:z;
- new Float:tmp3;
- new Float:tmp4;
- new Float:MindAngle;
- if(IsPlayerConnected(i)){
- GetPlayerPos(i,x,y,z);
- dis = floatsqroot(floatpower(floatabs(floatsub(x,ppos[i][0])),2)+floatpower(floatabs(floatsub(y,ppos[i][1])),2));
- if(IsPlayerInAnyVehicle(i)){GetVehicleZAngle(GetPlayerVehicleID(i), angle2);}else{GetPlayerFacingAngle(i, angle2);}
- if(x>ppos[i][0]){tmp3=x-ppos[i][0];}else{tmp3=ppos[i][0]-x;}
- if(y>ppos[i][1]){tmp4=y-ppos[i][1];}else{tmp4=ppos[i][1]-y;}
- if(ppos[i][1]>y && ppos[i][0]>x){
- sin = asin(tmp3/dis);
- MindAngle = floatsub(floatsub(floatadd(sin, 90), floatmul(sin, 2)), -90.0);
- }
- if(ppos[i][1]<y && ppos[i][0]>x){
- sin = asin(tmp3/dis);
- MindAngle = floatsub(floatadd(sin, 180), 180.0);
- }
- if(ppos[i][1]<y && ppos[i][0]<x){
- sin = acos(tmp4/dis);
- MindAngle = floatsub(floatadd(sin, 360), floatmul(sin, 2));
- }
- if(ppos[i][1]>y && ppos[i][0]<x){
- sin = asin(tmp3/dis);
- MindAngle = floatadd(sin, 180);
- }
- }
- if(MindAngle == 0.0){return angle2;}else{return MindAngle;}
- }
- public OnGameModeInit()
- {
- new str[58];
- for(new idx = 1; idx < sizeof(ACInfo); idx++)
- {
- format(str, sizeof(str), AC_CONFIG_FILE, idx);
- INI_ParseFile(str, "loadac_%s", .bExtra = true, .extra = idx );
- }
- SetTimer("GeneralTimer", 1000, 1);
- SetTimer("settime", 1000, 1);
- SetTimer("AutoCarFixer", 3000, 1);
- SetTimer("SpeedoUpdate",100, true);
- TimerA = SetTimer("AngleUpdate", 200, true);
- TimerC = SetTimer("CheckPlayerState", 100, true);
- xReactionTimer = SetTimer("xReactionTest", TIME, 1);
- SetGameModeText("ENG/Drift/Freeroam");
- DisableInteriorEnterExits();
- LoadTextDraws();
- AddPlayerClass(146, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Civilian 1
- AddPlayerClass(154, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Civilian 2
- AddPlayerClass(19, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Civilian 3
- AddPlayerClass(59, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Civilian 4
- AddPlayerClass(15, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Civilian 5
- AddPlayerClass(46, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Civilian 6
- AddPlayerClass(47, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Civilian 7
- AddPlayerClass(49, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Civilian 8
- AddPlayerClass(19, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Civilian 9
- AddPlayerClass(20, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Civilian 10
- AddPlayerClass(12, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Girls 11
- AddPlayerClass(11, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //girls 12
- AddPlayerClass(90, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //girls 13
- AddPlayerClass(91, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //girls 14
- AddPlayerClass(93, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //girls 15
- AddPlayerClass(169, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //girls 16
- AddPlayerClass(28, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Drugs dealer 17
- AddPlayerClass(29, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Drugs dealer 18
- AddPlayerClass(30, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Drugs dealer 19
- AddPlayerClass(254, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Drugs dealer 20
- AddPlayerClass(47, 1481.2080, -1770.6204, 18.7958, 359.4039, -1, -1, -1, -1, -1, -1); //Drugs dealer 21
- for(new idx = 1; idx < sizeof(BusinessInfo); idx++)
- {
- format(str, sizeof(str), BPATH, idx);
- INI_ParseFile(str, "loadbiz_%s", .bExtra = true, .extra = idx );
- BusinessInfo[idx][bOutsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ], BusinessInfo[idx][bWorld]);
- BusinessInfo[idx][bInsideIcon] = CreateDynamicPickup(1272, 1, BusinessInfo[idx][bExitX], BusinessInfo[idx][bExitY], BusinessInfo[idx][bExitZ], BusinessInfo[idx][bInsideWorld]);
- }
- //Glass tunnel to LV Airport
- CreateDynamicObject(18801, 2158.24829, 1414.46729, 32.59080, 0.00000, 0.00000, 10.00000);
- CreateDynamicObject(18779, 2179.81860, 1411.26819, 19.63820, 0.00000, 0.00000, 182.00000);
- CreateDynamicObject(18838, 2118.36548, 1397.84131, 69.88161, 0.00000, 0.00000, 180.00000);
- CreateDynamicObject(18809, 2085.95874, 1398.54468, 30.44908, 90.00000, 90.00000, 0.00000);
- CreateDynamicObject(18809, 2036.04834, 1398.53149, 30.44908, 90.00000, 90.00000, 0.00000);
- CreateDynamicObject(18826, 2000.00928, 1414.78320, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18809, 2035.40259, 1398.43176, 62.03074, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2085.39380, 1398.02148, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18838, 2118.95386, 1398.41833, 22.85140, 0.00000, 0.00000, 180.00000);
- CreateDynamicObject(18809, 2085.30859, 1398.20313, 62.03074, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2035.54382, 1398.45605, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 2000.19434, 1398.59229, 46.23103, 0.00000, 0.00000, 0.00000);
- CreateDynamicObject(18809, 2035.56519, 1430.47803, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2085.55371, 1430.03455, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2135.41064, 1429.71790, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2185.35327, 1429.49487, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2235.20605, 1429.14502, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2285.01001, 1428.89490, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 2320.37354, 1444.61340, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 2284.89355, 1460.62500, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2234.98242, 1460.92212, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2184.93872, 1461.21582, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2135.06177, 1461.35168, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 2099.52075, 1477.49646, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18809, 2135.14746, 1493.27332, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 2170.61938, 1509.15417, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 2135.13818, 1525.19116, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2085.18677, 1525.52795, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 2049.63428, 1509.81934, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18826, 2070.70581, 1477.94934, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 2035.09021, 1462.12756, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 1985.18591, 1462.51147, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1949.82837, 1478.49243, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18809, 1985.43604, 1494.24268, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 2020.94482, 1509.95471, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18826, 1999.75342, 1541.79553, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18809, 2035.48975, 1557.38733, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2085.37451, 1557.00952, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2135.31934, 1556.67920, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 2170.70679, 1572.46521, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 2135.18286, 1588.51697, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2085.16553, 1588.92200, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 2049.52637, 1605.04883, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18809, 2085.13135, 1620.68506, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 2120.64038, 1636.43884, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 2085.17358, 1652.37207, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 2035.44397, 1652.66321, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1999.73669, 1637.01953, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18826, 2020.90076, 1605.22302, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 1985.49329, 1589.48315, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1949.94617, 1573.75146, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18826, 1971.01392, 1541.89160, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 1935.42029, 1526.03430, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 1885.48633, 1526.15027, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1849.81030, 1510.45691, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18809, 1885.42224, 1494.32983, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1921.02661, 1478.29810, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 1885.44946, 1462.49170, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1850.09338, 1446.80334, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18809, 1885.74817, 1430.52649, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1921.17249, 1414.60474, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 1885.60999, 1398.92480, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 1835.58386, 1399.52905, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1799.91345, 1415.73767, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18826, 1821.20630, 1447.54700, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 1786.09021, 1463.52112, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1750.56995, 1479.59753, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18809, 1786.14966, 1495.32190, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1821.58777, 1511.10400, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 1785.93982, 1527.16516, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 1736.07385, 1527.48938, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1700.41516, 1511.64844, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18826, 1721.58118, 1479.71594, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18826, 1700.33167, 1447.94189, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18809, 1735.79370, 1431.68994, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1771.37170, 1415.44153, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 1735.91113, 1399.73962, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 1685.91931, 1400.12146, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18826, 1650.57495, 1384.48767, 77.88970, 90.00000, 0.00000, 0.00000);
- CreateDynamicObject(18826, 1671.73755, 1352.57532, 77.88970, 90.00000, 180.00000, 0.00000);
- CreateDynamicObject(18809, 1636.08899, 1336.74036, 77.84918, 90.00000, 90.00000, -0.36000);
- CreateDynamicObject(18809, 1586.21875, 1337.25354, 77.84918, 90.00000, 90.00000, -0.36000);
- return 1;
- }
- public OnGameModeExit()
- {
- new INI:File = INI_Open(AC_CONFIG_FILE);
- INI_WriteInt(File,"Airbreak",ACInfo[Airbreak]);
- INI_WriteInt(File,"VehicleTune",ACInfo[vTune]);
- INI_WriteInt(File,"SpeedHack",ACInfo[SpeedCheat]);
- INI_WriteInt(File,"GodMode",ACInfo[GodMode]);
- INI_WriteInt(File,"AimScript",ACInfo[AimScript]);
- INI_WriteInt(File,"AirbreakC",ACInfo[AirbreakC]);
- INI_WriteInt(File,"VehicleTuneC",ACInfo[vTuneC]);
- INI_WriteInt(File,"SpeedHackC",ACInfo[SpeedCheatC]);
- INI_WriteInt(File,"GodModeC",ACInfo[GodModeC]);
- INI_WriteInt(File,"AimScriptC",ACInfo[AimScriptC]);
- INI_Close(File);
- for(new id = 1; id < sizeof(BusinessInfo); id++)
- {
- if(BusinessInfo[id][bPrice] == 0) break;
- SaveBusiness(id);
- }
- KillTimer(TimerA);
- KillTimer(TimerC);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,"Logging","{FF0000}Please, enter your password to continue.","Login","Exit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,"Registering","{00FF00}Please, enter password to register your account.","Register","Exit");
- }
- for(new idx = 1; idx < sizeof(BusinessInfo); idx++)
- {
- new str[40], string[1256];
- format(str, sizeof(str), BPATH, idx);
- INI_ParseFile(str, "loadbiz_%s", .bExtra = true, .extra = idx );
- BusinessInfo[idx][bOutsideIcon] = CreatePickup(1272, 1, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ], BusinessInfo[idx][bWorld]);
- if(BusinessInfo[idx][bOwned] == 1)
- {
- format(string, sizeof(string), "Name: %s \nOwner: %s \nPrice: %d\nType: %s", BusinessInfo[idx][bName], BusinessInfo[idx][bOwner], BusinessInfo[idx][bPrice], BusinessInfo[idx][bType]);
- Create3DTextLabel(string, 0x008080FF, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ]+1, 35.0, BusinessInfo[idx][bWorld], 0);
- }
- else if(BusinessInfo[idx][bOwned] == 0)
- {
- format(string, sizeof(string), "Name: %s \nPrice: $%d\nType: %s", BusinessInfo[idx][bName], BusinessInfo[idx][bPrice], BusinessInfo[idx][bType]);
- Create3DTextLabel(string, 0x008080FF, BusinessInfo[idx][bEntranceX], BusinessInfo[idx][bEntranceY], BusinessInfo[idx][bEntranceZ]+1, 35.0, BusinessInfo[idx][bWorld], 0);
- }
- BusinessInfo[idx][bInsideIcon] = CreatePickup(1272, 1, BusinessInfo[idx][bExitX], BusinessInfo[idx][bExitY], BusinessInfo[idx][bExitZ], BusinessInfo[idx][bInsideWorld]);
- }
- Textdraw1 = TextDrawCreate(546.000000,28.000000,"--");
- TextDrawFont(Textdraw1,3);
- TextDrawLetterSize(Textdraw1,0.4,1.5);
- TextDrawColor(Textdraw1, 0xFFFFFFAA);
- TextDrawSetShadow(Textdraw1,1);
- TextDrawBackgroundColor(Textdraw1,0x000000FF);
- speed[playerid] = TextDrawCreate(478,389,"_");
- TextDrawLetterSize(speed[playerid],0.37,1.099999);
- TextDrawSetOutline(speed[playerid],1);
- health[playerid] = TextDrawCreate(478,401,"_");
- TextDrawLetterSize(health[playerid],0.37,1.099999);
- TextDrawSetOutline(health[playerid],1);
- RemoveBuildingForPlayer(playerid, 8931, 2162.4766, 1403.4375, 14.6563, 0.25);
- RemoveBuildingForPlayer(playerid, 8839, 2162.4766, 1403.4375, 14.6563, 0.25);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new INI:File = INI_Open(UserPath(playerid));
- 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,"Skin", GetPlayerSkin(playerid));
- INI_WriteInt(File,"Adminduty", PlayerInfo[playerid][pAduty]);
- INI_WriteInt(File,"Muted", PlayerInfo[playerid][pMuted]);
- INI_WriteInt(File,"MutedTime", PlayerInfo[playerid][pMutedTime]);
- INI_WriteInt(File,"Score", GetPlayerScore(playerid));
- INI_WriteInt(File,"Donator", PlayerInfo[playerid][pDonator]);
- INI_WriteInt(File,"Reportmute", PlayerInfo[playerid][pReportmute]);
- INI_WriteInt(File,"BizID", PlayerInfo[playerid][BizID]);
- INI_WriteInt(File,"DM1Kills", PlayerInfo[playerid][DM1Kills]);
- INI_WriteInt(File,"DM1Deaths", PlayerInfo[playerid][DM1Deaths]);
- INI_WriteInt(File,"DM2Kills", PlayerInfo[playerid][DM2Kills]);
- INI_WriteInt(File,"DM2Deaths", PlayerInfo[playerid][DM2Deaths]);
- INI_Close(File);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
- TextDrawShowForPlayer(playerid, Textdraw1);
- if(InDM[playerid] == 1)
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerVirtualWorld(playerid, 22);
- SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 38, 50000);
- }
- else if(InDM[playerid] == 2)
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerVirtualWorld(playerid, 23);
- SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
- SetPlayerHealth(playerid, 100);
- ResetPlayerWeapons(playerid);
- switch(random(9))
- {
- case 0:
- {
- GivePlayerWeapon(playerid, 4, 1);
- }
- case 1:
- {
- GivePlayerWeapon(playerid, 12, 1);
- }
- case 2:
- {
- GivePlayerWeapon(playerid, 16, 50000);
- }
- case 3:
- {
- GivePlayerWeapon(playerid, 24, 50000);
- }
- case 4:
- {
- GivePlayerWeapon(playerid, 27, 50000);
- }
- case 5:
- {
- GivePlayerWeapon(playerid, 28, 50000);
- }
- case 6:
- {
- GivePlayerWeapon(playerid, 31, 50000);
- }
- case 7:
- {
- GivePlayerWeapon(playerid, 26, 50000);
- }
- case 8:
- {
- GivePlayerWeapon(playerid, 25, 50000);
- }
- }
- }
- return 1;
- }
- public loadac_data(idx, name[], value[])
- {
- INI_Int("Airbreak", ACInfo[Airbreak]);
- INI_Int("VehicleTune", ACInfo[vTune]);
- INI_Int("SpeedHack", ACInfo[SpeedCheat]);
- INI_Int("GodMode", ACInfo[GodMode]);
- INI_Int("AimScript", ACInfo[AimScript]);
- INI_Int("AirbreakC", ACInfo[AirbreakC]);
- INI_Int("VehicleTuneC", ACInfo[vTuneC]);
- INI_Int("SpeedHackC", ACInfo[SpeedCheatC]);
- INI_Int("GodModeC", ACInfo[GodModeC]);
- INI_Int("AimScriptC", ACInfo[AimScriptC]);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new string[256];
- if(InDM[playerid] == 0)
- {
- PlayerInfo[killerid][pKills]++;
- PlayerInfo[playerid][pDeaths]++;
- GivePlayerMoney(playerid, -100);
- GivePlayerMoney(killerid, 100);
- }
- else if(InDM[playerid] == 1)
- {
- PlayerInfo[killerid][DM1Kills]++;
- PlayerInfo[playerid][DM1Deaths]++;
- format(string, sizeof(string), "DM: You have %d kills in minigun arena now.", PlayerInfo[killerid][DM1Kills]);
- SCM(killerid, COLOR_GREEN, string);
- format(string, sizeof(string), "DM: You have %d deaths in minigun arena now.", PlayerInfo[playerid][DM1Deaths]);
- SCM(playerid, COLOR_LIGHTRED, string);
- }
- else if(InDM[playerid] == 2)
- {
- PlayerInfo[killerid][DM2Kills]++;
- PlayerInfo[playerid][DM2Deaths]++;
- new Float:armour;
- GetPlayerArmour(killerid, armour);
- SetPlayerArmour(killerid, armour+25);
- format(string, sizeof(string), "DM: You have %d kills in random weapon arena now.", PlayerInfo[killerid][DM2Kills]);
- SCM(killerid, COLOR_GREEN, string);
- format(string, sizeof(string), "DM: You have %d deaths in random weapon arena now.", PlayerInfo[playerid][DM2Deaths]);
- SCM(playerid, COLOR_LIGHTRED, string);
- }
- SendDeathMessage(killerid, playerid, reason);
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- SetVehicleToRespawn(vehicleid);
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- new string[256];
- if(PlayerInfo[playerid][pMuted] == 1)
- {
- SCM(playerid, COLOR_LIGHTRED, "You are muted.");
- return 0;
- }
- switch(xTestBusy)
- {
- case true:
- {
- if(!strcmp(xChars, text, false))
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "« %s has won the reaction test. »", pName);
- SCMToAll(COLOR_GREEN, string);
- format(string, sizeof(string), "« You have earned $%d + %d score points. »", xCash, xScore);
- SCM(playerid, COLOR_GREEN, string);
- GivePlayerMoney(playerid, xCash);
- SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
- xReactionTimer = SetTimer("xReactionTest", TIME, 1);
- xTestBusy = false;
- }
- }
- }
- for(new words; words<sizeof(SwearWords); words++)
- {
- if(strfind(text,SwearWords[words], true) != -1 ) { SCM(playerid, COLOR_YELLOW, "Swearing is not allowed."); return 0;}
- }
- if(PlayerInfo[playerid][pAdmin] > 0)
- {
- format(string, sizeof(string), "{BA0000}[Admin] {%06x}%s (%d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid, text);
- SCMToAll(-1, string);
- return 0;
- }
- else if(PlayerInfo[playerid][pDonator] > 0)
- {
- format(string, sizeof(string), "{BA0000}[Donator] {%06x}%s (%d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid, text);
- SCMToAll(-1, string);
- return 0;
- }
- else if(PlayerInfo[playerid][pAdmin] == 0)
- {
- format(string, sizeof(string), "{BA0000}[Player] {%06x}%s (%d): {FFFFFF}%s", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid, text);
- SCMToAll(-1, string);
- return 0;
- }
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- if(!IsComponentidCompatible(GetVehicleModel(vehicleid), componentid)) RemoveVehicleComponent(vehicleid, componentid);
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (HOLDING(KEY_FIRE) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- }
- if (RELEASED(KEY_FIRE) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(newkeys == KEY_CROUCH)
- {
- new currentveh;
- new Float:angle;
- currentveh = GetPlayerVehicleID(playerid);
- GetVehicleZAngle(currentveh, angle);
- SetVehicleZAngle(currentveh, angle);
- SendClientMessage(playerid, COLOR_YELLOW, "Your vehicle has been flipped.");
- }
- }
- if(newkeys & KEY_SECONDARY_ATTACK)
- {
- for(new b = 1; b < sizeof(BusinessInfo); b++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ]) && GetPlayerVirtualWorld(playerid) == BusinessInfo[b][bInsideWorld])
- {
- SetPlayerPos(playerid, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ]);
- SetPlayerFacingAngle(playerid, BusinessInfo[b][bEntranceA]);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- InsideBiz[playerid] = 0;
- return 1;
- }
- else if(IsPlayerInRangeOfPoint(playerid, 1.0, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ]))
- {
- if(BusinessInfo[b][bLocked] == 1) return SendClientMessage(playerid, COLOR_ERROR, "This Business is locked!");
- SetPlayerPos(playerid, BusinessInfo[b][bExitX], BusinessInfo[b][bExitY], BusinessInfo[b][bExitZ]);
- SetPlayerFacingAngle(playerid, BusinessInfo[b][bExitA]);
- SetPlayerInterior(playerid, BusinessInfo[b][bInsideInt]);
- SetPlayerVirtualWorld(playerid, BusinessInfo[b][bInsideWorld]);
- InsideBiz[playerid] = b;
- return 1;
- }
- }
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- new Float:vec[3];
- GetPlayerCameraFrontVector(playerid, vec[0], vec[1], vec[2]);
- new bool:possible_crasher = false;
- for (new i = 0; !possible_crasher && i < sizeof(vec); i++)
- if (floatabs(vec[i]) > 10.0)
- possible_crasher = true;
- if (possible_crasher)
- return 0;
- }
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new string[256], string2[256], string3[256], string4[256], string5[256], status5[32], status1[32], status2[32], status3[32], status4[32];
- new string6[256], string7[256], string8[256], string9[256], string10[256];
- if(ACInfo[AirbreakC] == 0) { status5 = "Kick"; }
- else if(ACInfo[AirbreakC] == 1) { status5 = "Message to admins"; }
- else if(ACInfo[vTuneC] == 0) { status1 = "Kick"; }
- else if(ACInfo[vTuneC] == 1) { status1 = "Message to admins"; }
- else if(ACInfo[SpeedCheatC] == 0) { status2 = "Kick"; }
- else if(ACInfo[SpeedCheatC] == 1) { status2 = "Message to admins"; }
- else if(ACInfo[AimScriptC] == 0) { status3 = "Kick"; }
- else if(ACInfo[AimScriptC] == 1) { status3 = "Message to admins"; }
- else if(ACInfo[GodModeC] == 0) { status4 = "Kick"; }
- else if(ACInfo[GodModeC] == 1) { status4 = "Message to admins"; }
- if(dialogid == DIALOG_MAIN)
- {
- if(response)
- {
- format(string, sizeof(string), "Airbreak protection = %d\nEnter 0 to stop it or 1 to start it.", ACInfo[Airbreak]);
- format(string2, sizeof(string2), "Vehicle Tune protection = %d\nEnter 0 to stop it or 1 to start it.", ACInfo[vTune]);
- format(string3, sizeof(string3), "Speed Hack protection = %d\nEnter 0 to stop it or 1 to start it.", ACInfo[SpeedCheat]);
- format(string4, sizeof(string4), "Aimbot protection = %d\nEnter 0 to stop it or 1 to start it.", ACInfo[AimScript]);
- format(string5, sizeof(string5), "Godmode protection = %d\nEnter 0 to stop it or 1 to start it.", ACInfo[GodMode]);
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid, DIALOG_AIRBREAK, DIALOG_STYLE_INPUT, "Airbreak protection", string, "Change", "Close");
- case 1: ShowPlayerDialog(playerid, DIALOG_VTUNE, DIALOG_STYLE_INPUT, "Vehicle Tune protection", string2, "Change", "Close");
- case 2: ShowPlayerDialog(playerid, DIALOG_SPEED, DIALOG_STYLE_INPUT, "Speed Hack protection", string3, "Change", "Close");
- case 3: ShowPlayerDialog(playerid, DIALOG_VTUNE, DIALOG_STYLE_INPUT, "Aimbot protection", string4, "Change", "Close");
- case 4: ShowPlayerDialog(playerid, DIALOG_GODMODE, DIALOG_STYLE_INPUT, "Godmode protection", string5, "Change", "Close");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_MAIN2)
- {
- if(response)
- {
- format(string6, sizeof(string), "Airbreak punish = %s\nEnter 0 for kick or 1 for message to admins.", status5);
- format(string7, sizeof(string2), "Vehicle Tune punish = %s\nEnter 0 for kick or 1 for message to admins.", status1);
- format(string8, sizeof(string3), "Speed Hack punish = %s\nEnter 0 for kick or 1 for message to admins.", status2);
- format(string9, sizeof(string4), "Aimbot punish = %s\nEnter 0 for kick or 1 for message to admins.", status3);
- format(string10, sizeof(string5), "Godmode punish = %s\nEnter 0 for kick or 1 for message to admins.", status4);
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid, DIALOG_AIRBREAKC, DIALOG_STYLE_INPUT, "Airbreak punish", string6, "Change", "Close");
- case 1: ShowPlayerDialog(playerid, DIALOG_VTUNEC, DIALOG_STYLE_INPUT, "Vehicle Tune punish", string7, "Change", "Close");
- case 2: ShowPlayerDialog(playerid, DIALOG_SPEEDC, DIALOG_STYLE_INPUT, "Speed Hack punish", string8, "Change", "Close");
- case 3: ShowPlayerDialog(playerid, DIALOG_VTUNEC, DIALOG_STYLE_INPUT, "Aimbot punish", string9, "Change", "Close");
- case 4: ShowPlayerDialog(playerid, DIALOG_GODMODEC, DIALOG_STYLE_INPUT, "Godmode punish", string10, "Change", "Close");
- }
- }
- return 1;
- }
- if(dialogid == DIALOG_AIRBREAK)
- {
- if(response)
- {
- new status[32];
- if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
- ACInfo[Airbreak] = strlen(inputtext);
- if(strlen(inputtext) == 0) { status = "stopped"; }
- else if(strlen(inputtext) == 1) { status = "started"; }
- format(string, sizeof(string), "Anticheat: You %s Airbreak protection.", status);
- SCM(playerid, COLOR_RED, string);
- }
- else
- {
- format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
- ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- }
- return 1;
- }
- if(dialogid == DIALOG_VTUNE)
- {
- if(response)
- {
- new status[32];
- if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
- ACInfo[vTune] = strlen(inputtext);
- if(strlen(inputtext) == 0) { status = "stopped"; }
- else if(strlen(inputtext) == 1) { status = "started"; }
- format(string, sizeof(string), "Anticheat: You %s Vehicle tune script protection.", status);
- SCM(playerid, COLOR_RED, string);
- }
- else
- {
- format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
- ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- }
- return 1;
- }
- if(dialogid == DIALOG_SPEED)
- {
- if(response)
- {
- new status[32];
- if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
- ACInfo[SpeedCheat] = strlen(inputtext);
- if(strlen(inputtext) == 0) { status = "stopped"; }
- else if(strlen(inputtext) == 1) { status = "started"; }
- format(string, sizeof(string), "Anticheat: You %s Speed Hack protection.", status);
- SCM(playerid, COLOR_RED, string);
- }
- else
- {
- format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
- ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- }
- return 1;
- }
- if(dialogid == DIALOG_AIM)
- {
- if(response)
- {
- new status[32];
- if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
- ACInfo[AimScript] = strlen(inputtext);
- if(strlen(inputtext) == 0) { status = "stopped"; }
- else if(strlen(inputtext) == 1) { status = "started"; }
- format(string, sizeof(string), "Anticheat: You %s Aimbot protection.", status);
- SCM(playerid, COLOR_RED, string);
- }
- else
- {
- format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
- ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- }
- return 1;
- }
- if(dialogid == DIALOG_GODMODE)
- {
- if(response)
- {
- new status[32];
- if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
- ACInfo[GodMode] = strlen(inputtext);
- if(strlen(inputtext) == 0) { status = "stopped"; }
- else if(strlen(inputtext) == 1) { status = "started"; }
- format(string, sizeof(string), "Anticheat: You %s GodMode protection.", status);
- SCM(playerid, COLOR_RED, string);
- }
- else
- {
- format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
- ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- }
- return 1;
- }
- if(dialogid == DIALOG_AIRBREAKC)
- {
- if(response)
- {
- new status[32];
- if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
- ACInfo[AirbreakC] = strlen(inputtext);
- if(strlen(inputtext) == 0) { status = "Kick"; }
- else if(strlen(inputtext) == 1) { status = "Message to admins"; }
- format(string, sizeof(string), "Anticheat: When someone is suspicious: %s", status);
- SCM(playerid, COLOR_RED, string);
- }
- else
- {
- format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status5, status1, status2, status3, status4);
- ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- }
- return 1;
- }
- if(dialogid == DIALOG_VTUNEC)
- {
- if(response)
- {
- new status[32];
- if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
- ACInfo[vTuneC] = strlen(inputtext);
- if(strlen(inputtext) == 0) { status = "Kick"; }
- else if(strlen(inputtext) == 1) { status = "Message to admins"; }
- format(string, sizeof(string), "Anticheat: When someone is suspicious: %s", status);
- SCM(playerid, COLOR_RED, string);
- }
- else
- {
- format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status5, status1, status2, status3, status4);
- ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- }
- return 1;
- }
- if(dialogid == DIALOG_SPEEDC)
- {
- if(response)
- {
- new status[32];
- if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
- ACInfo[SpeedCheatC] = strlen(inputtext);
- if(strlen(inputtext) == 0) { status = "Kick"; }
- else if(strlen(inputtext) == 1) { status = "Message to admins"; }
- format(string, sizeof(string), "Anticheat: When someone is suspicious: %s", status);
- SCM(playerid, COLOR_RED, string);
- }
- else
- {
- format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status5, status1, status2, status3, status4);
- ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- }
- return 1;
- }
- if(dialogid == DIALOG_AIMC)
- {
- if(response)
- {
- new status[32];
- if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
- ACInfo[AimScriptC] = strlen(inputtext);
- if(strlen(inputtext) == 0) { status = "Kick"; }
- else if(strlen(inputtext) == 1) { status = "Message to admins"; }
- format(string, sizeof(string), "Anticheat: When someone is suspicious: %s", status);
- SCM(playerid, COLOR_RED, string);
- }
- else
- {
- format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status5, status1, status2, status3, status4);
- ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- }
- return 1;
- }
- if(dialogid == DIALOG_GODMODEC)
- {
- if(response)
- {
- new status[32];
- if(strlen(inputtext) < 0 || strlen(inputtext) > 1) return SCM(playerid, COLOR_RED, "Invalid value.");
- ACInfo[GodModeC] = strlen(inputtext);
- if(strlen(inputtext) == 0) { status = "Kick"; }
- else if(strlen(inputtext) == 1) { status = "Message to admins"; }
- format(string, sizeof(string), "Anticheat: When someone is suspicious: %s", status);
- SCM(playerid, COLOR_RED, string);
- }
- else
- {
- format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status5, status1, status2, status3, status4);
- ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- }
- return 1;
- }
- switch(dialogid)
- {
- case DIALOG_REGISTER:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registering","{FF0000}This password is invalid.\n{00FF00}Please, enter valid password to register your account.","Register","Exit");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Password",udb_hash(inputtext));
- INI_Close(File);
- SetPlayerColor(playerid, COLOR_GREEN);
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- GivePlayerMoney(playerid, 5000);
- }
- }
- 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]);
- SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
- SetPlayerColor(playerid, COLOR_GREEN);
- SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- }
- else
- {
- if(LogAttemps[playerid] < 3)
- {
- LogAttemps[playerid]++;
- format(string, sizeof(string), "{FF0000}You have entered wrong password.\nYou have {00FF00}%d {FF0000}attempts to enter your password.", 3-LogAttemps[playerid]);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Logging",string,"Login","Exit");
- }
- else if(LogAttemps[playerid] == 3) return Kick(playerid);
- }
- return 1;
- }
- }
- case DIALOG_PMENU:
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, DIALOG_MADMIN, DIALOG_STYLE_INPUT, "Set admin level", "Enter the level you want to apply.", "Set", "Exit");
- }
- if(listitem == 1)
- {
- new kname[256];
- format(kname, 256, "Are you sure u want to kick %s?", GetName(GetPVarInt(playerid,"pplayerid")));
- ShowPlayerDialog(playerid, DIALOG_PKICK, DIALOG_STYLE_MSGBOX, "Kicking player", kname, "Kick", "Exit");
- }
- if(listitem == 2)
- {
- new kname[256];
- format(kname, 256, "Are you sure u want to ban %s?", GetName(GetPVarInt(playerid,"pplayerid")));
- ShowPlayerDialog(playerid, DIALOG_PBAN, DIALOG_STYLE_MSGBOX, "Banning player", kname, "Ban", "Exit");
- }
- if(listitem == 3)
- {
- new kname[256];
- format(kname, 256, "Choose reason to mute %s:\n1.Spamming, 2.Swearing, 3.Spamming & swearing\n4.Advertising,", GetName(GetPVarInt(playerid,"pplayerid")));
- ShowPlayerDialog(playerid, DIALOG_PMUTE, DIALOG_STYLE_INPUT, "Muting player", kname, "Mute", "Exit");
- }
- if(listitem == 4)
- {
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMutedTime] = 0;
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMuted] = 0;
- format(string, sizeof(string), "ADMIN: %s unmuted %s.", GetName(playerid), GetName(GetPVarInt(playerid,"pplayerid")));
- SCMToAll(COLOR_GREEN, string);
- }
- return 1;
- }
- }
- case DIALOG_MADMIN:
- {
- if(response)
- {
- if(strval(inputtext) < 0 || strval(inputtext) > 5) return SCM(playerid, COLOR_YELLOW, "ERROR: Admin levels are from 1 to 5.");
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pAdmin] = strval(inputtext);
- format(string, 256, "ADMIN: %s gave %d admin level to %s.", GetName(playerid), PlayerInfo[GetPVarInt(playerid,"pplayerid")][pAdmin], GetName(GetPVarInt(playerid,"pplayerid")));
- SCMToAll(COLOR_YELLOW, string);
- SetPVarInt(playerid,"pplayerid",999);
- return 1;
- }
- }
- case DIALOG_PKICK:
- {
- if(response)
- {
- Kick(GetPVarInt(playerid,"pplayerid"));
- format(string, 256, "ADMIN: %s kicked %s from the server.", GetName(playerid), GetName(GetPVarInt(playerid,"pplayerid")));
- SCMToAll(COLOR_YELLOW, string);
- SetPVarInt(playerid,"pplayerid",999);
- return 1;
- }
- }
- case DIALOG_PBAN:
- {
- if(response)
- {
- Ban(GetPVarInt(playerid,"pplayerid"));
- format(string, 256, "ADMIN: %s banned %s from the server.", GetName(playerid), GetName(GetPVarInt(playerid,"pplayerid")));
- SCMToAll(COLOR_YELLOW, string);
- SetPVarInt(playerid,"pplayerid",999);
- return 1;
- }
- }
- case DIALOG_PMUTE:
- {
- if(response)
- {
- if(strlen(inputtext) < 1 || strlen(inputtext) > 4) return SCM(playerid,COLOR_LIGHTRED,"Options are from 1 to 4.");
- if(strlen(inputtext) == 1)
- {
- format(string, sizeof(string), "ADMIN: %s was muted by %s for 30 minutes.Reason: Spamming", GetName(GetPVarInt(playerid,"pplayerid")), GetName(playerid));
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMutedTime] = 30*60;
- SCMToAll(COLOR_LIGHTRED, string);
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMuted] = 1;
- SetPVarInt(playerid,"pplayerid",999);
- }
- if(strlen(inputtext) == 2)
- {
- format(string, sizeof(string), "ADMIN: %s was muted by %s for 60 minutes.Reason: Swearing", GetName(GetPVarInt(playerid,"pplayerid")), GetName(playerid));
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMutedTime] = 60*60;
- SCMToAll(COLOR_LIGHTRED, string);
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMuted] = 1;
- SetPVarInt(playerid,"pplayerid",999);
- }
- if(strlen(inputtext) == 3)
- {
- format(string, sizeof(string), "ADMIN: %s was muted by %s for 90 minutes.Reason: Spamming and swearing", GetName(GetPVarInt(playerid,"pplayerid")), GetName(playerid));
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMutedTime] = 90*60;
- SCMToAll(COLOR_LIGHTRED, string);
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMuted] = 1;
- SetPVarInt(playerid,"pplayerid",999);
- }
- if(strlen(inputtext) == 4)
- {
- format(string, sizeof(string), "ADMIN: %s was muted by %s for 120 minutes.Reason: Advertising", GetName(GetPVarInt(playerid,"pplayerid")), GetName(playerid));
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMutedTime] = 120*60;
- SCMToAll(COLOR_LIGHTRED, string);
- PlayerInfo[GetPVarInt(playerid,"pplayerid")][pMuted] = 1;
- SetPVarInt(playerid,"pplayerid",999);
- }
- return 1;
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- if(IsPlayerAdmin(playerid))
- {
- ShowPlayerDialog(playerid, DIALOG_PMENU, DIALOG_STYLE_LIST, GetName(clickedplayerid), "Set admin level\nKick\nBan\nMute\nUnMute", "Choose", "Exit");
- SetPVarInt(playerid,"pplayerid",clickedplayerid);
- return 1;
- }
- return 1;
- }
- public SendAdminMessage(color, text[])
- {
- foreach(new i : Player)
- {
- if(PlayerInfo[i][pAdmin] > 0)
- {
- SCM(i, color, text);
- }
- }
- return 1;
- }
- public OnPlayerStartAim(playerid,aimedplayer)
- {
- new string[256];
- if(ACInfo[AimScriptC] == 0)
- {
- format(string, sizeof(string), "Anticheat: %s(ID: %d) has been kicked from the server.Reason: Aimbot", GetName(playerid), playerid);
- SCMToAll(COLOR_RED, string);
- Kick(playerid);
- }
- else
- {
- format(string, sizeof(string), "Anticheat: %s(ID: %d) is using Aimbot.Please, check him.", GetName(playerid), playerid);
- SendAdminMessage(COLOR_RED, string);
- }
- return 1;
- }
- public OnPlayerAirbreak(playerid)
- {
- if(ACInfo[Airbreak] == 1)
- {
- if(PlayerInfo[playerid][pAduty] == 0)
- {
- new string[128];
- if(ACInfo[AirbreakC] == 0)
- {
- format(string, sizeof(string), "Anticheat: %s(ID: %d) has been kicked from the server.Reason: Airbreak Detected", GetName(playerid), playerid);
- SCMToAll(COLOR_RED, string);
- Kick(playerid);
- }
- else
- {
- format(string, sizeof(string), "Anticheat: %s(ID: %d) is using Airbreak.Please, check him.", GetName(playerid), playerid);
- SendAdminMessage(COLOR_RED, string);
- }
- }
- return 1;
- }
- return 1;
- }
- public PlayerSpeed(playerid)
- {
- if(ACInfo[SpeedCheat] == 1)
- {
- if(GetPlayerSpeed(playerid) > 350)
- {
- new string[256];
- if(ACInfo[SpeedCheatC] == 0)
- {
- format(string, sizeof(string), "Anticheat: %s(ID: %d) has been kicked from the server.Reason: Speed Hack", GetName(playerid), playerid);
- SCMToAll(COLOR_RED, string);
- Kick(playerid);
- }
- else
- {
- format(string, sizeof(string), "Anticheat: %s(ID: %d) is using Speed Hack.Please, check him.", GetName(playerid), playerid);
- SendAdminMessage(COLOR_RED, string);
- }
- }
- }
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
- {
- if(ACInfo[GodMode] == 1)
- {
- if(PlayerInfo[playerid][pAdmin] < 1)
- {
- if(playerid != INVALID_PLAYER_ID)
- {
- if(Godmode[playerid] == 0)
- {
- if(amount == 0)
- {
- new string[256];
- if(ACInfo[GodModeC] == 0)
- {
- format(string, sizeof(string), "Anticheat: %s(ID: %d) has been kicked from the server.Reason: God mode", GetName(playerid), playerid);
- SCMToAll(COLOR_RED, string);
- Kick(playerid);
- }
- else
- {
- format(string, sizeof(string), "Anticheat: %s(ID: %d) is using God mode.Please, check him.", GetName(playerid), playerid);
- SendAdminMessage(COLOR_RED, string);
- }
- }
- }
- }
- }
- }
- return 1;
- }
- public GeneralTimer()
- {
- new string[256];
- foreach(new i : Player)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pMutedTime] > 0)
- {
- if(PlayerInfo[i][pMutedTime] > 0)
- {
- PlayerInfo[i][pMutedTime]--;
- }
- if(PlayerInfo[i][pMutedTime] <= 0)
- {
- PlayerInfo[i][pMuted] = 0;
- format(string, sizeof(string), "ADMIN: %s was unmuted by the SERVER, Reason: Time Out", GetName(i));
- SCMToAll(COLOR_GREEN, string);
- }
- }
- if(PlayerInfo[i][pReportmute] > 0)
- {
- if(PlayerInfo[i][pReportmute] > 0)
- {
- PlayerInfo[i][pReportmute]--;
- }
- if(PlayerInfo[i][pReportmute] <= 0)
- {
- PlayerInfo[i][pReportmute] = 0;
- SCM(i, COLOR_GREEN, "ADMIN: You are now 'Report' unmuted by the SERVER, Reason: Time Out");
- }
- }
- }
- }
- return 1;
- }
- public AutoCarFixer(playerid)
- {
- new Float:hp;
- new vehi = GetPlayerVehicleID(playerid);
- GetVehicleHealth(vehi, hp);
- if(hp <= 850)
- {
- RepairVehicle(vehi);
- }
- return 1;
- }
- public DelayedKick(playerid)
- {
- Kick(playerid);
- }
- public settime(playerid)
- {
- new string[256],hours, minutes, seconds;
- gettime(hours, minutes, seconds);
- format(string, sizeof string, "~w~%s%d:~g~%s%d:~r~%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
- TextDrawSetString(Textdraw1, string);
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(!success) return SCM(playerid, COLOR_ERROR, "SERVER: Unknown command.Please, use /cmds to see all available commands.");
- return 1;
- }
- public SaveBusiness(id)
- {
- new file4[40];
- format(file4, sizeof(file4), BPATH, id);
- new INI:File = INI_Open(file4);
- INI_SetTag(File,"data");
- INI_WriteString(File,"bOwner", BusinessInfo[id][bOwner]);
- INI_WriteString(File,"bName", BusinessInfo[id][bName]);
- INI_WriteInt(File,"bOwned", BusinessInfo[id][bOwned]);
- INI_WriteInt(File,"bPrice", BusinessInfo[id][bPrice]);
- INI_WriteInt(File,"bType", BusinessInfo[id][bType]);
- INI_WriteInt(File,"bLocked", BusinessInfo[id][bLocked]);
- INI_WriteFloat(File,"bEntranceX", BusinessInfo[id][bEntranceX]);
- INI_WriteFloat(File,"bEntranceY", BusinessInfo[id][bEntranceY]);
- INI_WriteFloat(File,"bEntranceZ", BusinessInfo[id][bEntranceZ]);
- INI_WriteFloat(File,"bEntranceA", BusinessInfo[id][bEntranceA]);
- INI_WriteFloat(File,"bExitX", BusinessInfo[id][bExitX]);
- INI_WriteFloat(File,"bExitY", BusinessInfo[id][bExitY]);
- INI_WriteFloat(File,"bExitZ", BusinessInfo[id][bExitZ]);
- INI_WriteFloat(File,"bExitA", BusinessInfo[id][bExitA]);
- INI_WriteInt(File,"bInt", BusinessInfo[id][bInt]);
- INI_WriteInt(File,"bWorld", BusinessInfo[id][bWorld]);
- INI_WriteInt(File,"bInsideInt", BusinessInfo[id][bInsideInt]);
- INI_WriteInt(File,"bInsideWorld", BusinessInfo[id][bInsideWorld]);
- INI_WriteInt(File,"bLevel", BusinessInfo[id][bLevel]);
- INI_WriteInt(File,"bPay", BusinessInfo[id][bPay]);
- INI_Close(File);
- return 1;
- }
- public loadbiz_data(idx, name[], value[])
- {
- INI_String("bOwner", BusinessInfo[idx][bOwner], 32);
- INI_String("bName", BusinessInfo[idx][bName], 128);
- INI_Int("bOwned", BusinessInfo[idx][bOwned]);
- INI_Int("bPrice", BusinessInfo[idx][bPrice]);
- INI_Int("bType", BusinessInfo[idx][bType]);
- INI_Int("bLocked", BusinessInfo[idx][bLocked]);
- INI_Float("bEntranceX", BusinessInfo[idx][bEntranceX]);
- INI_Float("bEntranceY", BusinessInfo[idx][bEntranceY]);
- INI_Float("bEntranceZ", BusinessInfo[idx][bEntranceZ]);
- INI_Float("bEntranceA", BusinessInfo[idx][bEntranceA]);
- INI_Float("bExitX", BusinessInfo[idx][bExitX]);
- INI_Float("bExitY", BusinessInfo[idx][bExitY]);
- INI_Float("bExitZ", BusinessInfo[idx][bExitZ]);
- INI_Float("bExitA", BusinessInfo[idx][bExitA]);
- INI_Int("bInt", BusinessInfo[idx][bInt]);
- INI_Int("bWorld", BusinessInfo[idx][bWorld]);
- INI_Int("bInsideInt", BusinessInfo[idx][bInsideInt]);
- INI_Int("bInsideWorld", BusinessInfo[idx][bInsideWorld]);
- INI_Int("bLevel", BusinessInfo[idx][bLevel]);
- INI_Int("bPay", BusinessInfo[idx][bPay]);
- return 1;
- }
- function xReactionProgress()
- {
- switch(xTestBusy)
- {
- case true:
- {
- new string[128];
- format(string, sizeof(string), "« No-one won the reaction-test. New one starting in %d minutes. »", (TIME/60000));
- SCMToAll(COLOR_LIGHTRED, string);
- xReactionTimer = SetTimer("xReactionTest", TIME, 1);
- }
- }
- return 1;
- }
- function xReactionTest()
- {
- new xLength = (random(8) + 2), string[128];
- xCash = (random(10000) + 20000);
- xScore = (random(2)+1);
- format(xChars, sizeof(xChars), "");
- Loop(x, xLength) format(xChars, sizeof(xChars), "%s%s", xChars, xCharacters[random(sizeof(xCharacters))][0]);
- format(string, sizeof(string), "« Who first types %s wins $%d + %d score points. »", xChars, xCash, xScore);
- SCMToAll(COLOR_LIGHTRED, string);
- KillTimer(xReactionTimer);
- xTestBusy = true;
- SetTimer("xReactionProgress", 30000, 0);
- return 1;
- }
- public SpeedoUpdate()
- {
- for(new i = 0;i<MAX_PLAYERS;i++)
- {
- if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
- {
- new Float:x,Float:y,Float:z,Float:hp,string[24],vehicleid = GetPlayerVehicleID(i);
- GetVehicleVelocity(vehicleid,x,y,z);
- GetVehicleHealth(vehicleid,hp);
- format(string,sizeof(string),"~w~ Speed: %d km/h",floatround(floatsqroot(((x*x)+(y*y))+(z*z))*181.5));
- TextDrawSetString(speed[i],string);
- format(string,sizeof(string),"~g~ Health: %d",floatround(hp));
- TextDrawSetString(health[i],string);
- TextDrawShowForPlayer(i,speed[i]);
- TextDrawShowForPlayer(i,health[i]);
- }
- if(!IsPlayerInAnyVehicle(i))
- {
- TextDrawHideForPlayer(i,speed[i]);
- TextDrawHideForPlayer(i,health[i]);
- }
- }
- }
- public CheckPlayerState(){
- new i,cs;
- for(i=0;i<=MAX_PLAYERS;i++){
- cs=GetPlayerState(i);
- if(DriftMode[i] && cs==PLAYER_STATE_DRIVER && DriftPointsNow[i]>70){
- new Float:h;
- GetVehicleHealth(GetPlayerVehicleID(i),h);
- if(h<HealthInit[i]){
- KillTimer(DriftTimer[i]);
- DriftExit(i);
- GameTextForPlayer(i,"~n~~n~~n~~n~~n~~n~~n~~r~Boom",800,5);
- DriftMode[i]=false;
- }
- }
- if(cs==PLAYER_STATE_DRIVER && DriftMode[i]==false){
- if(GetVType(GetPlayerVehicleID(i))){
- DriftMode[i]=true;
- GetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
- AutoFixBool[i]=false;
- DriftTimer[i]=SetTimerEx("Drift", 200, true, "i", i);
- }
- }
- else if(cs!=PLAYER_STATE_DRIVER && DriftMode[i]==true){
- KillTimer(DriftTimer[i]);
- DriftMode[i]=false;
- AutoFixBool[i]=true;
- }
- else{}
- }
- return 1;
- }
- public DriftExit(playerid){
- PlayerDriftCancellation[playerid] = 0;
- new Float:h;
- GetVehicleHealth(GetPlayerVehicleID(playerid),h);
- if(DriftPointsNow[playerid]>70 && DriftPointsNow[playerid]<10000 && h==HealthInit[playerid]) GivePlayerMoney(playerid,DriftPointsNow[playerid]*DriftBonus[playerid]);
- TextDrawHideForPlayer(playerid,TDLabels[0]);
- TextDrawHideForPlayer(playerid,TDLabels[1]);
- TextDrawHideForPlayer(playerid,TDLabels[2]);
- TextDrawHideForPlayer(playerid,TDValueDrift[playerid]);
- TextDrawHideForPlayer(playerid,TDValueBonus[playerid]);
- TextDrawHideForPlayer(playerid,TDValueCash[playerid]);
- DriftBonus[playerid]=1;
- AutoFixBool[playerid]=true;
- SetVehicleHealth(GetPlayerVehicleID(playerid),HealthInit[playerid]);
- DriftPointsNow[playerid] = 0;
- }
- Float:ReturnPlayerAngle(playerid){
- new Float:Ang;
- if(IsPlayerInAnyVehicle(playerid))GetVehicleZAngle(GetPlayerVehicleID(playerid), Ang); else GetPlayerFacingAngle(playerid, Ang);
- return Ang;
- }
- public Drift(){
- new Float:Angle1, Float:Angle2, Float:BySpeed;
- new Float:Z;
- new Float:X;
- new Float:Y;
- new Float:SpeedX;
- for(new g=0;g<200;g++){
- GetPlayerPos(g, X, Y, Z);
- SpeedX = floatsqroot(floatadd(floatadd(floatpower(floatabs(floatsub(X,SavedPos[ g ][ sX ])),2),floatpower(floatabs(floatsub(Y,SavedPos[ g ][ sY ])),2)),floatpower(floatabs(floatsub(Z,SavedPos[ g ][ sZ ])),2)));
- Angle1 = ReturnPlayerAngle(g);
- Angle2 = GetPlayerTheoreticAngle(g);
- BySpeed = floatmul(SpeedX, 12);
- if(IsPlayerInAnyVehicle(g) && GetVType(GetPlayerVehicleID(g)) && floatabs(floatsub(Angle1, Angle2)) > DRIFT_MINKAT && floatabs(floatsub(Angle1, Angle2)) < DRIFT_MAXKAT && BySpeed > DRIFT_SPEED){
- if(PlayerDriftCancellation[g] > 0)KillTimer(PlayerDriftCancellation[g]);
- PlayerDriftCancellation[g] = 0;
- DriftPointsNow[g] += floatval( floatabs(floatsub(Angle1, Angle2)) * 3 * (BySpeed*0.1) )/10;
- PlayerDriftCancellation[g] = SetTimerEx("DriftExit", 3000, 0, "d", g);
- }
- if(DriftPointsNow[g] > 70 && DriftPointsNow[g]<10000){
- if(DriftPointsNow[g]<500)
- {
- DriftBonus[g]=1;
- }
- if(DriftPointsNow[g]>=500 && DriftPointsNow[g]<1000)
- {
- DriftBonus[g]=2;
- }
- if(DriftPointsNow[g]>=1000 && DriftPointsNow[g]<1700)
- {
- DriftBonus[g]=3;
- }
- if(DriftPointsNow[g]>=1700 && DriftPointsNow[g]<2500)
- {
- DriftBonus[g]=4;
- }
- if(DriftPointsNow[g]>=2500)
- {
- DriftBonus[g]=5;
- }
- TextDrawShowForPlayer(g,TDLabels[0]);
- TextDrawShowForPlayer(g,TDLabels[1]);
- TextDrawShowForPlayer(g,TDLabels[2]);
- TextDrawShowForPlayer(g,TDValueDrift[g]);
- TextDrawShowForPlayer(g,TDValueBonus[g]);
- TextDrawShowForPlayer(g,TDValueCash[g]);
- new DPs[128],DBn[128],Cash[128],csh;
- valstr(DPs,DriftPointsNow[g],false);
- format(DBn,sizeof(DBn),"X%i",DriftBonus[g]);
- csh=DriftPointsNow[g]*DriftBonus[g];
- format(Cash,sizeof(Cash),"$%i",csh);
- TextDrawSetString(TDValueDrift[g],DPs);
- TextDrawSetString(TDValueBonus[g],DBn);
- TextDrawSetString(TDValueCash[g],Cash);
- }
- SavedPos[ g ][ sX ] = X;
- SavedPos[ g ][ sY ] = Y;
- SavedPos[ g ][ sZ ] = Z;
- }
- }
- public AngleUpdate(){
- for(new g=0;g<=MAX_PLAYERS;g++){
- new Float:x, Float:y, Float:z;
- if(IsPlayerInAnyVehicle(g))GetVehiclePos(GetPlayerVehicleID(g), x, y, z); else GetPlayerPos(g, x, y, z);
- ppos[g][0] = x;
- ppos[g][1] = y;
- ppos[g][2] = z;
- }
- }
- //Player commands
- CMD:helpme(playerid, params[])
- {
- new string[128], text[48];
- if(sscanf(params, "s[48]", text)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /helpme [Text]");
- format(string,sizeof(string),"HelpME: %s(ID: %d) asked: %s", GetName(playerid), playerid, text);
- SendAdminMessage(COLOR_YELLOW, string);
- return 1;
- }
- CMD:cmds(playerid, params[])
- {
- new String[2048];
- strins(String,"\n",strlen(String));
- strins(String,"{FFFFFF}/helpme - sending question to all ONLINE admins.\n",strlen(String));
- strins(String,"{FFFFFF}/parkour - teleporting to parkour arena.\n",strlen(String));
- strins(String,"{FFFFFF}/drift - teleporting to drift arena.\n",strlen(String));
- strins(String,"{FFFFFF}/admins - showing all online admins.\n",strlen(String));
- strins(String,"{FFFFFF}/report - sending report for player to admins.\n",strlen(String));
- strins(String,"{FFFFFF}/buybiz - buying a business.\n",strlen(String));
- strins(String,"{FFFFFF}/glasstunel - teleporting to glass tunel.\n",strlen(String));
- strins(String,"{FFFFFF}/joindm - joining DM arena.\n",strlen(String));
- strins(String,"{FFFFFF}/leavedm - leaving DM arena.\n",strlen(String));
- strins(String,"{FFFFFF}/veh - spawning vehicle for you.\n",strlen(String));
- strins(String,"\n",strlen(String));
- ShowPlayerDialog(playerid, 5679, DIALOG_STYLE_MSGBOX, "Player commands", String, "Close", "");
- return 1;
- }
- CMD:report(playerid, params[])
- {
- new string[256], targetid, text[128];
- if(PlayerInfo[playerid][pReportmute] > 0) return SCM(playerid, COLOR_ERROR, "You are 'Report' muted.");
- if(sscanf(params, "rs[128]", targetid, text)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /report [PlayerID][Reason]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- foreach(new i : Player)
- {
- if(PlayerInfo[i][pAdmin] > 0)
- format(string, sizeof(string), "REPORT: %s reported %s for: %s", GetName(playerid), GetName(targetid), text);
- SCMToAll(COLOR_YELLOW, string);
- }
- return 1;
- }
- CMD:buybiz(playerid, params[])
- {
- new id = IsPlayerNearBizEnt(playerid), pmoney;
- if(id == -1 || id == 0) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~You are not near a biz", 3000, 4);
- if(BusinessInfo[id][bOwned] != 0 || BusinessInfo[id][bPrice] == 0) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~This biz is not for sale.", 3000, 4);
- if(PlayerInfo[playerid][BizID] != 0) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~You already own a biz.", 3000, 4);
- pmoney = GetPlayerMoney(playerid);
- if(pmoney < BusinessInfo[id][bPrice]) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~Sorry, you can not afford this biz.", 3000, 4);
- PlayerInfo[playerid][BizID] = id;
- PlayerInfo[playerid][pCash] -= BusinessInfo[id][bPrice];
- GivePlayerMoney(playerid, -BusinessInfo[id][bPrice]);
- BusinessInfo[id][bLocked] = 0;
- BusinessInfo[id][bOwned] = 1;
- BusinessInfo[id][bOwner] = GetName(playerid);
- SendClientMessage(playerid, COLOR_GREEN, "Congratulations on your new biz! Use /bizhelp to get help, or /helpme!");
- return 1;
- }
- CMD:admins(playerid,params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new string[256], count = 0, status[32], sendername[MAX_PLAYER_NAME];
- foreach(new i : Player)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerInfo[i][pAdmin] > 0)
- {
- if(PlayerInfo[i][pAduty] == 0) { status = "{FF0000}Off-Duty"; }
- else if(PlayerInfo[i][pAduty] == 1) { status = "{00FF00}On-Duty"; }
- GetPlayerName(i, sendername, sizeof(sendername));
- format(string, 256, "%s {00CCFF}Level %d: {FFFFFF}%s (ID: %d) Status: %s \n", string, PlayerInfo[i][pAdmin], sendername, i, status);
- count++;
- }
- }
- }
- if(count >= 1) { ShowPlayerDialog(playerid, 21323123, DIALOG_STYLE_MSGBOX, "Online admins", string, "Close", ""); }
- else { SCM(playerid, COLOR_ERROR, "There aren't any online admins."); }
- }
- return 1;
- }
- CMD:veh(playerid, params[])
- {
- new vehicle, Float:CarToX, Float:CarToY, Float:CarToZ, car, color1, color2;
- if(sscanf(params, "iii", vehicle, color1, color2)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /veh [VehicleID(400-611)][Color1][Color2]");
- if(IsValidCar(vehicle) == 0) return SCM(playerid, COLOR_ERROR, "You can't spawn that vehicle.");
- if(color1 < 0 || color1 > 252) return SCM(playerid, COLOR_RED, "Wrong color1 ID (min: 0 max: 252)");
- if(color2 < 0 || color2 > 252) return SCM(playerid, COLOR_RED, "Wrong color2 ID (min: 0 max: 252)");
- GetPlayerPos(playerid, CarToX, CarToY, CarToZ);
- car = CreateVehicle(vehicle, CarToX, CarToY+4, CarToZ, 90, color1, color2, -1);
- LinkVehicleToInterior(car, GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(car, GetPlayerVirtualWorld(playerid));
- PutPlayerInVehicle(playerid, car, 0);
- SCM(playerid, COLOR_GREEN, "You spawned vehicle for you.");
- return 1;
- }
- CMD:parkour(playerid, params[])
- {
- new arenan;
- if(sscanf(params, "i", arenan)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /parkour [Arena(1-3)]");
- if(arenan < 1 || arenan > 3) return SCM(playerid, COLOR_LIGHTRED, "Parkour arenas are from 1 to 3.");
- if(arenan == 1)
- {
- SetPlayerPos(playerid, -3404.9995, 1569.8923, 18.5673);
- SCM(playerid, COLOR_YELLOW, "You have been teleported to parkour arena 1.");
- }
- else if(arenan == 2)
- {
- SetPlayerPos(playerid, -812.9838, -2149.4014, 152.2032);
- SCM(playerid, COLOR_YELLOW, "You have been teleported to parkour arena 2.");
- }
- else if(arenan == 3)
- {
- SetPlayerPos(playerid, 1475.7789, -1346.7761, 164.0319);
- SCM(playerid, COLOR_YELLOW, "You have been teleported to parkour arena 3.");
- }
- return 1;
- }
- CMD:drift(playerid, params[])
- {
- new drifta;
- if(sscanf(params, "i", drifta)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /drift [Track(1-2)]");
- if(drifta < 1 || drifta > 2) return SCM(playerid, COLOR_LIGHTRED, "Drift tracks are from 1 to 2.");
- if(drifta == 1)
- {
- SetPlayerPos(playerid, 1339.9473, 1577.5769, 10.5474);
- SCM(playerid, COLOR_YELLOW, "You have been teleported to drift track 1.");
- }
- else if(drifta == 2)
- {
- SetPlayerPos(playerid, -311.9832,1536.7848,75.5625);
- SCM(playerid, COLOR_YELLOW, "You have been teleported to drift track 2.");
- }
- return 1;
- }
- CMD:glasstunel(playerid,params[])
- {
- new tunel;
- if(sscanf(params, "i", tunel)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /glasstunel [Tunel(1-1)]");
- if(tunel < 1 || tunel > 1) return SCM(playerid, COLOR_LIGHTRED, "Glass tunels are from 1 to 1.");
- if(tunel == 1)
- {
- SetPlayerPos(playerid, 2083.1738, 1399.0817, 10.8203);
- SetPlayerFacingAngle(playerid, 267.6060);
- SCM(playerid, COLOR_YELLOW, "You have been teleported to glass tunel 1.");
- }
- return 1;
- }
- CMD:joindm(playerid, params[])
- {
- new dmarena;
- if(InDM[playerid] != 0) return SCM(playerid, COLOR_ERROR, "You must leave this arena to join another.");
- if(sscanf(params, "i", dmarena))
- {
- SCM(playerid, COLOR_LIGHTRED, "Usage: /joindm [Arena(1-2)]");
- SCM(playerid, COLOR_YELLOW, "Types: 1.Minigun , 2.Random weapon");
- return 1;
- }
- if(dmarena < 1 || dmarena > 2) return SCM(playerid, COLOR_LIGHTRED, "Deathmatch arenas are from 1 to 2.");
- if(dmarena == 1)
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerVirtualWorld(playerid, 22);
- SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- ResetPlayerWeapons(playerid);
- InDM[playerid] = 1;
- GivePlayerWeapon(playerid, 38, 50000);
- SCM(playerid, COLOR_GREEN, "DM: You joined minigun arena.You can leave it with /leavedm.");
- }
- else if(dmarena == 2)
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerVirtualWorld(playerid, 23);
- SetPlayerPos(playerid, 1412.639892, -1.787510, 1000.924377);
- SetPlayerHealth(playerid, 100);
- SCM(playerid, COLOR_GREEN, "DM: You joined random weapon arena.You can leave it with /leavedm.");
- ResetPlayerWeapons(playerid);
- InDM[playerid] = 2;
- switch(random(9))
- {
- case 0:
- {
- GivePlayerWeapon(playerid, 4, 1);
- }
- case 1:
- {
- GivePlayerWeapon(playerid, 12, 1);
- }
- case 2:
- {
- GivePlayerWeapon(playerid, 16, 50000);
- }
- case 3:
- {
- GivePlayerWeapon(playerid, 24, 50000);
- }
- case 4:
- {
- GivePlayerWeapon(playerid, 27, 50000);
- }
- case 5:
- {
- GivePlayerWeapon(playerid, 28, 50000);
- }
- case 6:
- {
- GivePlayerWeapon(playerid, 31, 50000);
- }
- case 7:
- {
- GivePlayerWeapon(playerid, 26, 50000);
- }
- case 8:
- {
- GivePlayerWeapon(playerid, 25, 50000);
- }
- }
- }
- return 1;
- }
- CMD:leavedm(playerid, params[])
- {
- if(InDM[playerid] == 0) return SCM(playerid, COLOR_ERROR, "You are not in deathmatch arena.");
- InDM[playerid] = 0;
- SCM(playerid, COLOR_LIGHTRED, "You left the deathmatch arena.");
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- SetPlayerPos(playerid, 1958.33, 1343.12, 15.36);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- //Donator level 1+ commands
- CMD:jetpack(playerid, params[])
- {
- if(PlayerInfo[playerid][pDonator] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
- SCM(playerid, COLOR_GREEN, "Donator: You spawned jetpack for you.");
- return 1;
- }
- CMD:god(playerid, params[])
- {
- if(PlayerInfo[playerid][pDonator] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
- if(Godmode[playerid] == 0)
- {
- SetPlayerHealth(playerid, 99999);
- Godmode[playerid] = 1;
- SCM(playerid, COLOR_GREEN, "Donator: You started your godmode.");
- }
- else
- {
- SetPlayerHealth(playerid, 100);
- Godmode[playerid] = 0;
- SCM(playerid, COLOR_GREEN, "Donator: You stopped your godmode.");
- }
- return 1;
- }
- CMD:skin(playerid, params[])
- {
- new skin, string[256];
- if(PlayerInfo[playerid][pDonator] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "i", skin)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /skin [Skin ID]");
- if(IsValidSkin(skin) == 0) return SCM(playerid, COLOR_ERROR, "This skin is invalid, please choose another.");
- SetPlayerSkin(playerid, skin);
- format(string, sizeof(string), "Donator: You set your skin ID to %d.", skin);
- SCM(playerid, COLOR_GREEN, string);
- return 1;
- }
- //Admin level 1+ commands
- CMD:ahelp(playerid,params[])
- {
- new String[2048];
- if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- strins(String,"\n",strlen(String));
- strins(String,"{FFFF00} Admin level 1 commands:\n",strlen(String));
- strins(String,"{FFFFFF} /aduty , /tmute , /kick , /akill\n",strlen(String));
- strins(String,"\n",strlen(String));
- }
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- strins(String,"{FFFF00} Admin level 2 commands:\n",strlen(String));
- strins(String,"{FFFFFF} /apm , /clearchat , /unmute , /rmute\n",strlen(String));
- strins(String,"{FFFFFF} /runmute , /givemoney\n",strlen(String));
- strins(String,"\n",strlen(String));
- }
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- strins(String,"{FFFF00} Admin level 3 commands\n",strlen(String));
- strins(String,"{FFFFFF} /ban , /spawnveh , /disablegod , /givegod\n",strlen(String));
- strins(String,"\n",strlen(String));
- }
- ShowPlayerDialog(playerid, 5678, DIALOG_STYLE_MSGBOX, "Admin commands", String, "Close", "");
- return 1;
- }
- CMD:akill(playerid, params[])
- {
- new string[256], targetid;
- if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /akill [PlayerID]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't kill players with higher admin level.");
- SetPlayerHealth(targetid, 0);
- format(string, sizeof(string), "ADMIN: %s killed you.", GetName(playerid));
- SCM(targetid, COLOR_YELLOW, string);
- return 1;
- }
- CMD:aduty(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
- if(PlayerInfo[playerid][pAduty] == 0)
- {
- PlayerInfo[playerid][pAduty] = 1;
- SetPlayerColor(playerid, COLOR_ADUTY);
- SCM(playerid, COLOR_WHITE, "You changed your admin status to: {00FF00}On duty{FFFFFF}.");
- }
- else if(PlayerInfo[playerid][pAduty] == 1)
- {
- PlayerInfo[playerid][pAduty] = 0;
- SetPlayerColor(playerid, COLOR_GREEN);
- SCM(playerid, COLOR_WHITE, "You changed your admin status to: {FF0000}Off Duty{FFFFFF}.");
- }
- return 1;
- }
- CMD:tmute(playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
- new targetid, rid, string[256];
- if(sscanf(params, "ri", targetid, rid))
- {
- SCM(playerid, COLOR_LIGHTRED, "Usage: /tmute [PlayerID] [option]");
- SCM(playerid, COLOR_LIGHTRED, "Options for muting:");
- SCM(playerid, COLOR_LIGHTRED, "1.Spamming, 2.Swearing, 3.Spamming & swearing");
- SCM(playerid, COLOR_LIGHTRED, "4.Advertising");
- return 1;
- }
- if(IsPlayerConnected(targetid))
- {
- if(rid < 1 || rid > 5) return SCM(playerid,COLOR_LIGHTRED,"Options are from 1 to 4.");
- if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't mute players with higher admin level.");
- if(rid == 1)
- {
- format(string, sizeof(string), "ADMIN: %s was muted by %s for 30 minutes.Reason:Ñïàì", GetName(targetid), GetName(playerid));
- PlayerInfo[targetid][pMutedTime] = 30*60;
- SCMToAll(COLOR_LIGHTRED, string);
- PlayerInfo[targetid][pMuted] = 1;
- }
- else if(rid == 2)
- {
- format(string, sizeof(string), "ADMIN: %s was muted by %s for 60 minutes.Reason:Swearing", GetName(targetid), GetName(playerid));
- PlayerInfo[targetid][pMutedTime] = 60*60;
- SCMToAll(COLOR_LIGHTRED, string);
- PlayerInfo[targetid][pMuted] = 1;
- }
- else if(rid == 3)
- {
- format(string, sizeof(string), "ADMIN: %s was muted by %s for 90 minutes.Reason:Spamming & swearing", GetName(targetid), GetName(playerid));
- PlayerInfo[targetid][pMutedTime] = 90*60;
- SCMToAll(COLOR_LIGHTRED, string);
- PlayerInfo[targetid][pMuted] = 1;
- }
- else if(rid == 4)
- {
- format(string, sizeof(string), "ADMIN: %s was muted by %s for 120 minutes.Reason:Advertising", GetName(targetid), GetName(playerid));
- PlayerInfo[targetid][pMutedTime] = 120*60;
- SCMToAll(COLOR_LIGHTRED, string);
- PlayerInfo[targetid][pMuted] = 1;
- }
- }
- else if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- }
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- new string[256], targetid;
- if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /kick [PlayerID]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- if(targetid == playerid) return SCM(playerid, COLOR_ERROR, "You can't kick yourself.");
- if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't kick players with higher admin level.");
- format(string, sizeof(string), "ADMIN: %s kicked %s.", GetName(playerid), GetName(targetid));
- Kick(targetid);
- return 1;
- }
- //Admin level 2+ commands
- CMD:apm(playerid, params[])
- {
- new targetid, text[256], string[256];
- if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "rs[256]", targetid, text)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /apm [PlayerID][Text]");
- if(targetid == playerid) return SCM(playerid, COLOR_ERROR, "You can't AdminPM yourself.");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- format(string, sizeof(string), "Admin PM from %s: %s", GetName(playerid), text);
- SCM(targetid, COLOR_YELLOW, string);
- format(string, sizeof(string), "Admin PM to %s: %s", GetName(targetid), text);
- SCM(playerid, COLOR_YELLOW, string);
- return 1;
- }
- CMD:clearchat(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
- for(new i = 0; i < 200; i++) SCMToAll(COLOR_WHITE, " ");
- return 1;
- }
- CMD:rmute(playerid, params[])
- {
- new targetid, time, oldtime, time2, string[256];
- if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "ri", targetid, time)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /rmute [PlayerID][Time in minutes]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't report mute players with higher admin level.");
- if(PlayerInfo[targetid][pReportmute] == 0)
- {
- PlayerInfo[targetid][pReportmute] = time*60;
- format(string, sizeof(string), "ADMIN: %s report muted you for %d minutes.", GetName(playerid), time);
- SCM(targetid, COLOR_RED, string);
- }
- else if(PlayerInfo[playerid][pReportmute] > 0)
- {
- oldtime = PlayerInfo[targetid][pReportmute]/60;
- PlayerInfo[targetid][pReportmute] = time*60;
- time2 = PlayerInfo[targetid][pReportmute]+oldtime;
- format(string, sizeof(string), "ADMIN: %s report muted you for %d minutes.Time remaining: %d minutes", GetName(playerid), time, time2);
- SCM(playerid, COLOR_RED, string);
- }
- return 1;
- }
- CMD:unmute(playerid, params[])
- {
- new targetid, string[256];
- if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /unmute [PlayerID]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- PlayerInfo[targetid][pMutedTime] = 0;
- PlayerInfo[targetid][pMuted] = 0;
- format(string, sizeof(string), "ADMIN: %s unmuted %s.", GetName(playerid), GetName(targetid));
- SCMToAll(COLOR_GREEN, string);
- return 1;
- }
- CMD:runmute(playerid, params[])
- {
- new targetid, string[256];
- if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /runmute [PlayerID]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- PlayerInfo[targetid][pReportmute] = 0;
- format(string, sizeof(string), "ADMIN: %s 'Report' unmuted you.", GetName(playerid));
- SCM(targetid, COLOR_GREEN, string);
- return 1;
- }
- CMD:givemoney(playerid, params[])
- {
- new targetid, money, string[256];
- if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "ri", targetid, money)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /givemoney [PlayerID][Money]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- GivePlayerMoney(targetid, money);
- format(string, sizeof(string), "ADMIN: %s gave u %d$.", GetName(playerid), money);
- SCM(targetid, COLOR_GREEN, string);
- return 1;
- }
- //Admin level 3+ commands
- CMD:ban(playerid, params[])
- {
- new targetid, reason[128], string[256];
- if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "rs[128]", targetid, reason)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /ban [PlayerID][Reason]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't ban players with higher admin level.");
- format(string, sizeof(string), "ADMIN: %s banned %s. Reason: %s", GetName(playerid), GetName(targetid), reason);
- SCMToAll(COLOR_LIGHTRED, string);
- BanEx(targetid, reason);
- return 1;
- }
- CMD:spawnveh(playerid, params[])
- {
- new carid, Float:CarToX, Float:CarToY, Float:CarToZ, car, color1, color2;
- if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "iii", carid, color1, color2)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /spawncar [modelid] [color1] [color2]");
- if(carid < 400 || carid > 611) return SCM(playerid, COLOR_RED, "Wrong model ID (min: 400 max: 600)");
- if(color1 < 0 || color1 > 252) return SCM(playerid, COLOR_RED, "Wrong color1 ID (min: 0 max: 252)");
- if(color2 < 0 || color2 > 252) return SCM(playerid, COLOR_RED, "Wrong color2 ID (min: 0 max: 252)");
- GetPlayerPos(playerid, CarToX, CarToY, CarToZ);
- car = CreateVehicle(carid, CarToX, CarToY+4, CarToZ, 90, color1, color2, -1);
- LinkVehicleToInterior(car, GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(car, GetPlayerVirtualWorld(playerid));
- PutPlayerInVehicle(playerid, car, 0);
- return 1;
- }
- CMD:givegod(playerid, params[])
- {
- new targetid, string[256];
- if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /givegod [PlayerID]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- if(Godmode[targetid] == 1) return SCM(playerid, COLOR_LIGHTRED, "This player already have godmode.");
- Godmode[targetid] = 1;
- format(string, sizeof(string), "ADMIN: %s started your godmode.", GetName(playerid));
- SCM(targetid, COLOR_GREEN, string);
- return 1;
- }
- CMD:disablegod(playerid, params[])
- {
- new targetid, string[256];
- if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "r", targetid)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /dgod [PlayerID]");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- if(Godmode[targetid] == 0) return SCM(playerid, COLOR_LIGHTRED, "This player godmode is already stopped.");
- if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SCM(playerid, COLOR_LIGHTRED, "You can't disable players godmode with higher admin level.");
- Godmode[targetid] = 0;
- format(string, sizeof(string), "ADMIN: %s stopped your godmode.", GetName(playerid));
- SCM(targetid, COLOR_LIGHTRED, string);
- return 1;
- }
- //RCON admin commands
- CMD:createbiz(playerid, params[])
- {
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_ERROR, ERROR);
- new price, level, id, int, world, string[128], Float:Xi, Float:Yi, Float:Zi, inti, blvl, bname[32], entrable;
- if(sscanf(params, "dddfffdds[32]", price, level, inti, Xi, Yi, Zi, blvl, entrable, bname))
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "Usage: /createbiz [price] [type] [interior ID] [Exit X] [Exit Y] [Exit Z] [Level] [Locked] [Name(max char. 32)]");
- SendClientMessage(playerid, COLOR_YELLOW, "Types: 1.24/7, 2.Club, 3.Bar, 4.Clothes shop");
- SendClientMessage(playerid, COLOR_YELLOW, "Types: 4.Ammo, 6.Casino");
- return 1;
- }
- if(level < 0 || level > 6) return SendClientMessage(playerid, COLOR_ERROR, "Types are from 1 to 6.");
- if(price < 10000) return SendClientMessage(playerid, COLOR_ERROR, "Price must be atleast $10,000.");
- for(new h = 1;h < sizeof(BusinessInfo);h++)
- {
- if(BusinessInfo[h][bPrice] == 0)
- {
- id = h;
- break;
- }
- }
- new Float:X,Float:Y,Float:Z,Float:A;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- int = GetPlayerInterior(playerid);
- world = GetPlayerVirtualWorld(playerid);
- BusinessInfo[id][bInsideInt] = inti; BusinessInfo[id][bExitX] = Xi; BusinessInfo[id][bExitY] = Yi;
- BusinessInfo[id][bExitZ] = Zi; BusinessInfo[id][bOwned] = 0; BusinessInfo[id][bPrice] = price;
- BusinessInfo[id][bType] = level; BusinessInfo[id][bEntranceX] = X; BusinessInfo[id][bEntranceY] = Y;
- BusinessInfo[id][bEntranceZ] = Z; BusinessInfo[id][bEntranceA] = A; BusinessInfo[id][bLocked] = entrable;
- BusinessInfo[id][bInt] = int; BusinessInfo[id][bWorld] =world; BusinessInfo[id][bInsideWorld] = id;
- BusinessInfo[id][bLevel] = blvl;
- format(string, sizeof(string), "%s", bname);
- strmid(BusinessInfo[id][bName], string, 0, strlen(string), 255);
- if(BusinessInfo[id][bOutsideIcon]) DestroyPickup(BusinessInfo[id][bOutsideIcon]);
- if(BusinessInfo[id][bInsideIcon]) DestroyPickup(BusinessInfo[id][bInsideIcon]);
- BusinessInfo[id][bOutsideIcon] = CreatePickup(1272, 1, BusinessInfo[id][bEntranceX], BusinessInfo[id][bEntranceY], BusinessInfo[id][bEntranceZ], BusinessInfo[id][bWorld]);
- BusinessInfo[id][bInsideIcon] = CreatePickup(1272, 1, BusinessInfo[id][bExitX], BusinessInfo[id][bExitY], BusinessInfo[id][bExitZ], BusinessInfo[id][bInsideWorld]);
- new file4[40];
- format(file4, sizeof(file4), BPATH, id);
- new INI:File = INI_Open(file4);
- INI_SetTag(File,"data");
- INI_WriteString(File,"bOwner", BusinessInfo[id][bOwner]);
- INI_WriteString(File,"bName", BusinessInfo[id][bName]);
- INI_WriteInt(File,"bOwned", BusinessInfo[id][bOwned]);
- INI_WriteInt(File,"bPrice", BusinessInfo[id][bPrice]);
- INI_WriteInt(File,"bType", BusinessInfo[id][bType]);
- INI_WriteInt(File,"bLocked", BusinessInfo[id][bLocked]);
- INI_WriteFloat(File,"bEntranceX", BusinessInfo[id][bEntranceX]);
- INI_WriteFloat(File,"bEntranceY", BusinessInfo[id][bEntranceY]);
- INI_WriteFloat(File,"bEntranceZ", BusinessInfo[id][bEntranceZ]);
- INI_WriteFloat(File,"bEntranceA", BusinessInfo[id][bEntranceA]);
- INI_WriteFloat(File,"bExitX", BusinessInfo[id][bExitX]);
- INI_WriteFloat(File,"bExitY", BusinessInfo[id][bExitY]);
- INI_WriteFloat(File,"bExitZ", BusinessInfo[id][bExitZ]);
- INI_WriteFloat(File,"bExitA", BusinessInfo[id][bExitA]);
- INI_WriteInt(File,"bInt", BusinessInfo[id][bInt]);
- INI_WriteInt(File,"bWorld", BusinessInfo[id][bWorld]);
- INI_WriteInt(File,"bInsideInt", BusinessInfo[id][bInsideInt]);
- INI_WriteInt(File,"bInsideWorld", BusinessInfo[id][bInsideWorld]);
- INI_WriteInt(File,"bLevel", BusinessInfo[id][bLevel]);
- INI_Close(File);
- return 1;
- }
- CMD:setalevel(playerid, params[])
- {
- new targetid, alevel, string[256];
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "ri", targetid, alevel)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /setalevel [PlayerID][Admin level(0-5)]");
- if(alevel < 0 || alevel > 5) return SCM(playerid, COLOR_LIGHTRED, "Admin levels are from 1 to 5.");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- if(alevel == 0)
- {
- PlayerInfo[targetid][pAdmin] = 0;
- format(string, sizeof(string), "ADMIN: %s isn't admin anymore.", GetName(targetid));
- SCMToAll(COLOR_LIGHTRED, string);
- }
- else if(alevel != 0)
- {
- PlayerInfo[targetid][pAdmin] = alevel;
- format(string, sizeof(string), "ADMIN: %s is now admin level %d.Congratulations!", GetName(targetid), alevel);
- SCMToAll(COLOR_LIGHTRED, string);
- }
- return 1;
- }
- CMD:setdonator(playerid, params[])
- {
- new targetid, dlevel, string[256];
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_ERROR, ERROR);
- if(sscanf(params, "ri", targetid, dlevel)) return SCM(playerid, COLOR_LIGHTRED, "Usage: /setdonator [PlayerID][Donator Level(0-3)]");
- if(dlevel < 0 || dlevel > 3) return SCM(playerid, COLOR_LIGHTRED, "Donator levels are from 1 to 3.");
- if(!IsPlayerConnected(targetid)) return SCM(playerid, COLOR_ERROR, "This player is offline.");
- if(dlevel == 0)
- {
- PlayerInfo[playerid][pDonator] = 0;
- format(string, sizeof(string), "ADMIN: %s removed your donator status.", GetName(playerid));
- SCM(targetid, COLOR_LIGHTRED, string);
- }
- else if(dlevel != 0)
- {
- PlayerInfo[playerid][pDonator] = dlevel;
- format(string, sizeof(string), "ADMIN: %s gave you donator level %d.", GetName(playerid), dlevel);
- SCM(targetid, COLOR_LIGHTRED, string);
- }
- return 1;
- }
- //Business owners commands
- CMD:lockbiz(playerid, params[])
- {
- new id = IsPlayerNearBizEnt(playerid);
- if(id != PlayerInfo[playerid][BizID]) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~This isn't your biz!", 3000, 4);
- if(BusinessInfo[id][bLocked] == 1)
- {
- BusinessInfo[id][bLocked] = 0;
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~Biz ~g~unlocked!", 3000, 4);
- }
- else
- {
- BusinessInfo[id][bLocked] = 1;
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~Biz ~r~locked!", 3000, 4);
- }
- return 1;
- }
- CMD:sellbiz(playerid, params[])
- {
- new id = PlayerInfo[playerid][BizID], string[256];
- if(PlayerInfo[playerid][BizID] == 0) return GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~You don't own a biz!", 3000, 4);
- BusinessInfo[id][bOwned] = 0;
- BusinessInfo[id][bOwner] = 0;
- BusinessInfo[id][bLocked] = 1;
- GivePlayerMoney(playerid, BusinessInfo[id][bPrice]-50000);
- PlayerInfo[playerid][BizID] = 0;
- format(string, sizeof(string), "~n~~n~~n~~n~~n~~n~Business sold for ~r~%d", BusinessInfo[id][bPrice]-50000);
- GameTextForPlayer(playerid, string, 3000, 4);
- return 1;
- }
- //Anticheat commands
- CMD:acsetup(playerid, params[])
- {
- new string[256];
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_ERROR, ERROR);
- format(string, sizeof(string), "{00FF00}Airbreak protection = {FF0000}%d\n{00FF00}Vehicle Tune protection = {FF0000}%d\n{00FF00}Speed Hack protection = {FF0000}%d\n{00FF00}Aimbot protection = {FF0000}%d\n{00FF00}Godmode protection = {FF0000}%d\n", ACInfo[Airbreak], ACInfo[vTune], ACInfo[SpeedCheat], ACInfo[AimScript], ACInfo[GodMode]);
- ShowPlayerDialog(playerid, DIALOG_MAIN, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- return 1;
- }
- CMD:acpunish(playerid, params[])
- {
- new string[256], status[32], status1[32], status2[32], status3[32], status4[32];
- if(!IsPlayerAdmin(playerid)) return SCM(playerid, COLOR_ERROR, ERROR);
- if(ACInfo[AirbreakC] == 0) { status = "Kick"; }
- else if(ACInfo[AirbreakC] == 1) { status = "Message to admins"; }
- if(ACInfo[vTuneC] == 0) { status1 = "Kick"; }
- else if(ACInfo[vTuneC] == 1) { status1 = "Message to admins"; }
- if(ACInfo[SpeedCheatC] == 0) { status2 = "Kick"; }
- else if(ACInfo[SpeedCheatC] == 1) { status2 = "Message to admins"; }
- if(ACInfo[AimScriptC] == 0) { status3 = "Kick"; }
- else if(ACInfo[AimScriptC] == 1) { status3 = "Message to admins"; }
- if(ACInfo[GodModeC] == 0) { status4 = "Kick"; }
- else if(ACInfo[GodModeC] == 1) { status4 = "Message to admins"; }
- format(string, sizeof(string), "{00FF00}Airbreak punish = {FF0000}%s\n{00FF00}Vehicle Tune punish = {FF0000}%s\n{00FF00}Speed Hack punish = {FF0000}%s\n{00FF00}Aimbot punish = {FF0000}%s\n{00FF00}Godmode punish = {FF0000}%s\n", status, status1, status2, status3, status4);
- ShowPlayerDialog(playerid, DIALOG_MAIN2, DIALOG_STYLE_LIST, "Anticheat setup", string, "Choose", "Close");
- return 1;
- }
- //All stocks are here
- stock GetPlayerSpeed(playerid)
- {
- new Float:ST[4];
- if(IsPlayerInAnyVehicle(playerid))
- GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
- else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
- ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 181.5;
- return floatround(ST[3]);
- }
- stock GetName(playerid)
- {
- new pname[MAX_PLAYER_NAME]; pname="Invalid PlayerID";
- if(IsPlayerConnected(playerid)) {
- GetPlayerName(playerid, pname, sizeof (pname));
- }
- return pname;
- }
- stock Path(playerid)
- {
- new str[128],name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- format(str,sizeof(str),AC_DATA_FILE,name);
- return str;
- }
- stock IsPlayerInInvalidNosVehicle(playerid)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- #define MAX_INVALID_NOS_VEHICLES 52
- new InvalidNosVehicles[MAX_INVALID_NOS_VEHICLES] =
- {
- 581,523,462,521,463,522,461,448,468,586,417,425,469,487,512,520,563,593,
- 509,481,510,472,473,493,520,595,484,430,453,432,476,497,513,533,577,
- 452,446,447,454,590,569,537,538,570,449,519,460,488,511,519,548,592
- };
- if(IsPlayerInAnyVehicle(playerid))
- {
- for(new i = 0; i < MAX_INVALID_NOS_VEHICLES; i++)
- {
- if(GetVehicleModel(vehicleid) == InvalidNosVehicles[i]) return true;
- }
- }
- return false;
- }
- IsPlayerNearBizEnt(playerid)
- {
- for(new b = 1; b < sizeof(BusinessInfo); b++)
- {
- if(IsPlayerInRangeOfPoint(playerid, 2.0, BusinessInfo[b][bEntranceX], BusinessInfo[b][bEntranceY], BusinessInfo[b][bEntranceZ])) return b;
- }
- return -1;
- }
- stock BusinessType(b)
- {
- new string[30];
- switch(BusinessInfo[b][bType])
- {
- case 1: string = "24/7";
- case 2: string = "Club";
- case 3: string = "Bar";
- case 4: string = "Clothes Shop";
- case 5: string = "Ammo";
- case 4: string = "Casino";
- }
- return string;
- }
- stock IsComponentidCompatible(modelid, componentid)
- {
- if(componentid == 1025 || componentid == 1073 || componentid == 1074 || componentid == 1075 || componentid == 1076 ||
- componentid == 1077 || componentid == 1078 || componentid == 1079 || componentid == 1080 || componentid == 1081 ||
- componentid == 1082 || componentid == 1083 || componentid == 1084 || componentid == 1085 || componentid == 1096 ||
- componentid == 1097 || componentid == 1098 || componentid == 1087 || componentid == 1086)
- return true;
- switch (modelid)
- {
- case 400: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 401: return (componentid == 1005 || componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 114 || componentid == 1020 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 402: return (componentid == 1009 || componentid == 1009 || componentid == 1010);
- case 404: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007);
- case 405: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1014 || componentid == 1023 || componentid == 1000);
- case 409: return (componentid == 1009);
- case 410: return (componentid == 1019 || componentid == 1021 || componentid == 1020 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 411: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 412: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 415: return (componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 418: return (componentid == 1020 || componentid == 1021 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1016);
- case 419: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 420: return (componentid == 1005 || componentid == 1004 || componentid == 1021 || componentid == 1019 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1003);
- case 421: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1023 || componentid == 1016 || componentid == 1000);
- case 422: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1017 || componentid == 1007);
- case 426: return (componentid == 1005 || componentid == 1004 || componentid == 1021 || componentid == 1019 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003);
- case 429: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 436: return (componentid == 1020 || componentid == 1021 || componentid == 1022 || componentid == 1019 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 438: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 439: return (componentid == 1003 || componentid == 1023 || componentid == 1001 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1017 || componentid == 1007 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1013);
- case 442: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 445: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 451: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 458: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 466: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 467: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 474: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 475: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 477: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1017 || componentid == 1007);
- case 478: return (componentid == 1005 || componentid == 1004 || componentid == 1012 || componentid == 1020 || componentid == 1021 || componentid == 1022 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 479: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 480: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 489: return (componentid == 1005 || componentid == 1004 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1016 || componentid == 1000);
- case 491: return (componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 492: return (componentid == 1005 || componentid == 1004 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1016 || componentid == 1000);
- case 496: return (componentid == 1006 || componentid == 1017 || componentid == 1007 || componentid == 1011 || componentid == 1019 || componentid == 1023 || componentid == 1001 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1003 || componentid == 1002 || componentid == 1142 || componentid == 1143 || componentid == 1020);
- case 500: return (componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1013 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 506: return (componentid == 1009);
- case 507: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 516: return (componentid == 1004 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1015 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007);
- case 517: return (componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1002 || componentid == 1023 || componentid == 1016 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 518: return (componentid == 1005 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 526: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 527: return (componentid == 1021 || componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1014 || componentid == 1015 || componentid == 1017 || componentid == 1007);
- case 529: return (componentid == 1012 || componentid == 1011 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 533: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 534: return (componentid == 1126 || componentid == 1127 || componentid == 1179 || componentid == 1185 || componentid == 1100 || componentid == 1123 || componentid == 1125 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1180 || componentid == 1178 || componentid == 1101 || componentid == 1122 || componentid == 1124 || componentid == 1106);
- case 535: return (componentid == 1109 || componentid == 1110 || componentid == 1113 || componentid == 1114 || componentid == 1115 || componentid == 1116 || componentid == 1117 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1120 || componentid == 1118 || componentid == 1121 || componentid == 1119);
- case 536: return (componentid == 1104 || componentid == 1105 || componentid == 1182 || componentid == 1181 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1184 || componentid == 1183 || componentid == 1128 || componentid == 1103 || componentid == 1107 || componentid == 1108);
- case 540: return (componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
- case 541: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 542: return (componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1014 || componentid == 1015);
- case 545: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 546: return (componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
- case 547: return (componentid == 1142 || componentid == 1143 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1016 || componentid == 1003 || componentid == 1000);
- case 549: return (componentid == 1012 || componentid == 1011 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 550: return (componentid == 1005 || componentid == 1004 || componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003);
- case 551: return (componentid == 1005 || componentid == 1020 || componentid == 1021 || componentid == 1019 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1002 || componentid == 1023 || componentid == 1016 || componentid == 1003);
- case 555: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 558: return (componentid == 1092 || componentid == 1089 || componentid == 1166 || componentid == 1165 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1168 || componentid == 1167 || componentid == 1088 || componentid == 1091 || componentid == 1164 || componentid == 1163 || componentid == 1094 || componentid == 1090 || componentid == 1095 || componentid == 1093);
- case 559: return (componentid == 1065 || componentid == 1066 || componentid == 1160 || componentid == 1173 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1159 || componentid == 1161 || componentid == 1162 || componentid == 1158 || componentid == 1067 || componentid == 1068 || componentid == 1071 || componentid == 1069 || componentid == 1072 || componentid == 1070 || componentid == 1009);
- case 560: return (componentid == 1028 || componentid == 1029 || componentid == 1169 || componentid == 1170 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1141 || componentid == 1140 || componentid == 1032 || componentid == 1033 || componentid == 1138 || componentid == 1139 || componentid == 1027 || componentid == 1026 || componentid == 1030 || componentid == 1031);
- case 561: return (componentid == 1064 || componentid == 1059 || componentid == 1155 || componentid == 1157 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1154 || componentid == 1156 || componentid == 1055 || componentid == 1061 || componentid == 1058 || componentid == 1060 || componentid == 1062 || componentid == 1056 || componentid == 1063 || componentid == 1057);
- case 562: return (componentid == 1034 || componentid == 1037 || componentid == 1171 || componentid == 1172 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1149 || componentid == 1148 || componentid == 1038 || componentid == 1035 || componentid == 1147 || componentid == 1146 || componentid == 1040 || componentid == 1036 || componentid == 1041 || componentid == 1039);
- case 565: return (componentid == 1046 || componentid == 1045 || componentid == 1153 || componentid == 1152 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1150 || componentid == 1151 || componentid == 1054 || componentid == 1053 || componentid == 1049 || componentid == 1050 || componentid == 1051 || componentid == 1047 || componentid == 1052 || componentid == 1048);
- case 566: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 567: return (componentid == 1129 || componentid == 1132 || componentid == 1189 || componentid == 1188 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1187 || componentid == 1186 || componentid == 1130 || componentid == 1131 || componentid == 1102 || componentid == 1133);
- case 575: return (componentid == 1044 || componentid == 1043 || componentid == 1174 || componentid == 1175 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1176 || componentid == 1177 || componentid == 1099 || componentid == 1042);
- case 576: return (componentid == 1136 || componentid == 1135 || componentid == 1191 || componentid == 1190 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1192 || componentid == 1193 || componentid == 1137 || componentid == 1134);
- case 579: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 580: return (componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
- case 585: return (componentid == 1142 || componentid == 1143 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1003 || componentid == 1017 || componentid == 1007);
- case 587: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 589: return (componentid == 1005 || componentid == 1004 || componentid == 1144 || componentid == 1145 || componentid == 1020 || componentid == 1018 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1024 || componentid == 1013 || componentid == 1006 || componentid == 1016 || componentid == 1000 || componentid == 1017 || componentid == 1007);
- case 600: return (componentid == 1005 || componentid == 1004 || componentid == 1020 || componentid == 1022 || componentid == 1018 || componentid == 1013 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1017 || componentid == 1007);
- case 602: return (componentid == 1008 || componentid == 1009 || componentid == 1010);
- case 603: return (componentid == 1144 || componentid == 1145 || componentid == 1142 || componentid == 1143 || componentid == 1020 || componentid == 1019 || componentid == 1018 || componentid == 1024 || componentid == 1008 || componentid == 1009 || componentid == 1010 || componentid == 1006 || componentid == 1001 || componentid == 1023 || componentid == 1017 || componentid == 1007);
- }
- return false;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- floatval(Float:val){
- new str[256];
- format(str, 256, "%.0f", val);
- return todec(str);
- }
- todec(str[]){
- return strval(str);
- }
- LoadTextDraws(){
- TDLabels[0]=TextDrawCreate(Label_X,TD_Y,"Drift Points");
- TextDrawColor(TDLabels[0],COLOR_Label);
- TextDrawSetShadow(TDLabels[0],0);
- TextDrawSetOutline(TDLabels[0],1);
- TextDrawLetterSize(TDLabels[0],0.5,2);
- TextDrawBackgroundColor(TDLabels[0],COLOR_LabelOut);
- TextDrawFont(TDLabels[0],1);
- TDLabels[1]=TextDrawCreate(Label_X,TD_Y+50,"Drift Bonus");
- TextDrawColor(TDLabels[1],COLOR_Label);
- TextDrawSetShadow(TDLabels[1],0);
- TextDrawSetOutline(TDLabels[1],1);
- TextDrawLetterSize(TDLabels[1],0.5,2);
- TextDrawBackgroundColor(TDLabels[1],COLOR_LabelOut);
- TextDrawFont(TDLabels[1],1);
- TDLabels[2]=TextDrawCreate(Label_X,TD_Y+100,"Drift Cash");
- TextDrawColor(TDLabels[2],COLOR_Label);
- TextDrawSetShadow(TDLabels[2],0);
- TextDrawSetOutline(TDLabels[2],1);
- TextDrawLetterSize(TDLabels[2],0.5,2);
- TextDrawBackgroundColor(TDLabels[2],COLOR_LabelOut);
- TextDrawFont(TDLabels[2],1);
- new i;
- for(i=0;i<=MAX_PLAYERS;i++){
- TDValueDrift[i]=TextDrawCreate(Value_X,TD_Y+20,"0");
- TextDrawColor(TDValueDrift[i],COLOR_Value);
- TextDrawSetShadow(TDValueDrift[i],0);
- TextDrawSetOutline(TDValueDrift[i],1);
- TextDrawLetterSize(TDValueDrift[i],0.5,2);
- TextDrawBackgroundColor(TDValueDrift[i],COLOR_ValueOut);
- TextDrawFont(TDValueDrift[i],3);
- TDValueBonus[i]=TextDrawCreate(Value_X,TD_Y+70,"X1");
- TextDrawColor(TDValueBonus[i],COLOR_Value);
- TextDrawSetShadow(TDValueBonus[i],0);
- TextDrawSetOutline(TDValueBonus[i],1);
- TextDrawLetterSize(TDValueBonus[i],0.5,2);
- TextDrawBackgroundColor(TDValueBonus[i],COLOR_ValueOut);
- TextDrawFont(TDValueBonus[i],3);
- TDValueCash[i]=TextDrawCreate(Value_X,TD_Y+120,"$0");
- TextDrawColor(TDValueCash[i],COLOR_Value);
- TextDrawSetShadow(TDValueCash[i],0);
- TextDrawSetOutline(TDValueCash[i],1);
- TextDrawLetterSize(TDValueCash[i],0.5,2);
- TextDrawBackgroundColor(TDValueCash[i],COLOR_ValueOut);
- TextDrawFont(TDValueCash[i],3);
- }
- return 1;
- }
- GetVType(vid){
- new Convertibles[4]={480, 533, 439, 555};
- new Industrial[26]={499, 422, 482, 498, 609, 524, 578, 455, 403, 414, 582, 443, 514, 413, 515, 440, 543, 605, 459, 531, 408, 552, 478, 456, 554};
- new LowRider[8]={536, 575, 534, 567, 535, 566, 576, 412};
- new OffRoad[13]={568, 424, 573, 579, 400, 500, 444, 556, 557, 470, 489, 505, 595};
- new Service[19]={416, 433, 431, 438, 437, 523, 427, 490, 528, 407, 544, 596, 596, 597, 598, 599, 432, 601, 420};
- new Saloon[35]={445, 504, 401, 518, 527, 542, 507, 562, 585, 419, 526, 604, 466, 492, 474, 546, 517, 410, 551, 516, 467, 600, 426, 436, 547, 405, 580, 560, 550, 549, 540, 491, 529, 421};
- new Sports[20]={602, 429, 496, 402, 541, 415, 589, 587, 565, 494, 502, 503, 411, 559, 603, 475, 506, 451, 558, 477};
- new Wagons[5]={418, 404, 479, 458, 561};
- new modelid=GetVehicleModel(vid);
- new i;
- for(i=0;i<3;i++){
- if(Convertibles[i]==modelid) return 1;
- }
- for(i=0;i<25;i++){
- if(Industrial[i]==modelid) return 1;
- }
- for(i=0;i<7;i++){
- if(LowRider[i]==modelid) return 1;
- }
- for(i=0;i<12;i++){
- if(OffRoad[i]==modelid) return 1;
- }
- for(i=0;i<19;i++){
- if(Service[i]==modelid) return 1;
- }
- for(i=0;i<35;i++){
- if(Saloon[i]==modelid) return 1;
- }
- for(i=0;i<20;i++){
- if(Sports[i]==modelid) return 1;
- }
- for(i=0;i<5;i++){
- if(Wagons[i]==modelid) return 1;
- }
- return 0;
- }
- stock IsValidCar(carid)
- {
- new badcars[22] =
- {520, 432, 430, 425, 406, 464, 476, 501, 537, 538, 556, 557, 564, 569, 570, 590};
- if(carid > 611 || carid < 400) return 0;
- for(new i = 0; i < 22; i++)
- {
- if(carid == badcars[i]) return 0;
- }
- return 1;
- }
- stock IsValidSkin(skinid)
- {
- new badSkins[22] =
- { 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273, 289};
- if(skinid > 299 || skinid < 0) return 0;
- for(new i = 0; i < 22; i++)
- {
- if(skinid == badSkins[i]) return 0;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment