Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #define KEY_AIM 128
- #include <a_samp>
- #include <Dini>
- new AdminDialog[] = {201,202,203,204,205};
- new SpeedBoostDialog[] = {221,222,223,224,225};
- new RegisterDialog[] = {241,242,243,244,245};
- new WeaponDialog[] = {261,262,263,264,265,266,267,268,269,270,271,272};
- new GravityDialog[] = {281,282};
- new AudioDialog[] = {291,292};
- new BankDialog[] = {301,302,303,304,305,306,307,308,309};
- new LotoDialog[] = {311,312,313};
- new CMDDialog[] = {321,322,323};
- new clickply[MAX_PLAYERS];
- new freezply[MAX_PLAYERS];
- new PlayerAdmin[MAX_PLAYERS];
- new Float:SpeedBoostMultiplier[2][MAX_PLAYERS];
- new PlyLogin[MAX_PLAYERS];
- new AutoSaveTime = 1;
- new IsplayerSpawned[MAX_PLAYERS];
- new WeaponDiaString[MAX_PLAYERS][250];
- new Text:BankShow0[MAX_PLAYERS];
- new MoneyransferID[MAX_PLAYERS];
- new PlayerColors[200] = {
- 0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,
- 0xEE82EEFF,0xFFD720FF,0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,
- 0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,
- 0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,0x275222FF,0xF09F5BFF,0x3D0A4FFF,
- 0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,0x057F94FF,
- 0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,
- 0x4B8987FF,0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,
- 0x48C000FF,0x2A51E2FF,0xE3AC12FF,0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,0x2FD9DEFF,
- 0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,0x3214AAFF,
- 0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,0x9F945CFF,0xDCDE3DFF,
- 0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF,
- 0xD8C762FF,0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,
- 0xF4A460FF,0xEE82EEFF,0xFFD720FF,0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,
- 0x10DC29FF,0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,
- 0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,0x275222FF,0xF09F5BFF,
- 0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,
- 0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,
- 0x18F71FFF,0x4B8987FF,0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,
- 0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF,0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,
- 0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,
- 0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,0x9F945CFF,
- 0xDCDE3DFF,0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,
- 0xD8C762FF,0xD8C762FF
- };
- new weapons[13][2][MAX_PLAYERS];
- enum WeaponInfo
- {
- Name[64],
- Slot,
- Ammo,
- Prices
- }
- new WeaponList[][WeaponInfo]=
- {
- {"Fist", 0, 1, 0},
- {"Brass Knuckles", 0, 1, 40},
- {"Golf Club", 1, 1, 200},
- {"Nightstick", 1, 1, 20},
- {"Knife", 1, 1, 50},
- {"Baseball Bat", 1, 1, 25},
- {"Shovel", 1, 1, 80},
- {"Pool Cue", 1, 1, 30},
- {"Katana", 1, 1, 25000},
- {"Chainsaw", 1, 1, 25000},
- {"Double-ended Dildo", 10, 1, 75},
- {"Dildo", 10, 1, 50},
- {"Vibrator", 10, 1, 35},
- {"Silver Vibrator", 10, 1, 65},
- {"FLowers", 10, 1, 50},
- {"Cane", 10, 1, 150},
- {"Grenade", 8, 5, 300},
- {"Tear Gas", 8, 10, 120},
- {"Molotov Cocktail", 8, 2, 50},
- {"empty", 0, 0, 0},
- {"empty", 0, 0, 0},
- {"empty", 0, 0, 0},
- {"9mm", 2, 30, 200},
- {"Silenced 9mm", 2, 30, 600},
- {"Desert Eagle", 2, 20, 1500},
- {"Shotgun", 3, 45, 1200},
- {"Sawnoff Shotgun", 3, 12, 800},
- {"Combat Shotgun", 3, 10, 1000},
- {"Micro SMG/Uzi", 4, 90, 2000},
- {"MP5", 4, 90, 2000},
- {"AK-47", 5, 120, 3500},
- {"M4", 5, 150, 3500},
- {"Tec-9", 4, 150, 5000},
- {"Country Rifle", 6, 25, 1000},
- {"Sniper Rifle", 6, 15, 5000},
- {"RPG", 7, 1, 4000},
- {"HS Rocket", 7, 1, 2500},
- {"Flamethrower", 7, 50, 250},
- {"Minigun", 7, 120, 10000},
- {"Satchel Charge", 8, 2, 2000},
- {"Detonator_NotInUse", 12, 1, 0},
- {"Spraycan", 9, 100, 15},
- {"Fire Extinguisher", 9, 65, 5},
- {"Camera", 9, 10, 0},
- {"Night Vis Goggles_NotInUse", 11, 1, 0},
- {"Thermal Goggles_NotInUse", 11, 1, 0},
- {"Parachute", 11, 1, 10}
- };
- new Float:ux,Float:uy,Float:dx,Float:dy;
- new uurs,mins;
- new Gangz;
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("-------------eXa-Admin------------------");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print("-------------eXa-Admin---------------");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- SetTimer("MainTimer", 1000, true);
- SetTimer("AutoSave", AutoSaveTime*60*1000, true);
- return 1;
- }
- forward MainTimer();
- public MainTimer()
- {
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- SetPlayerTime(i,uurs,mins);
- }
- }
- mins++;
- if(mins > 59)
- {
- uurs++;
- mins=0;
- }
- if(uurs > 23)
- {
- uurs=0;
- }
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlyLogin[i] == 1 && IsplayerSpawned[i] == 1)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(i, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- new MoneyString[128];
- format(MoneyString, sizeof(MoneyString), "~b~$%08d",floatround(dini_Float(file, "Bank"), floatround_round));
- TextDrawSetString(BankShow0[i], MoneyString);
- TextDrawShowForPlayer(i, BankShow0[i]);
- }
- }
- }
- return 1;
- }
- forward AutoSave();
- public AutoSave()
- {
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlyLogin[i] == 1 && IsplayerSpawned[i] == 1)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(i, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- dini_IntSet(file, "Score", GetPlayerScore(i));
- dini_IntSet(file, "Money", GetPlayerMoney(i));
- dini_IntSet(file, "PlayTime", dini_Int(file, "PlayTime" )+AutoSaveTime);
- dini_FloatSet(file, "SSB",SpeedBoostMultiplier[0][i]);
- dini_FloatSet(file, "SSB1",SpeedBoostMultiplier[1][i]);
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")*1.0001);
- for (new wep = 0; wep < 13; wep++)
- {
- new WeaponDini[24],WeaponDiniAmmo[24];
- GetPlayerWeaponData(i, wep, weapons[i][0][wep], weapons[i][1][wep]);
- format(WeaponDini, sizeof(WeaponDini), "Slot%dWep", wep);
- dini_IntSet(file, WeaponDini, weapons[i][0][wep]);
- format(WeaponDiniAmmo, sizeof(WeaponDiniAmmo), "Slot%dAmmo", wep);
- dini_IntSet(file, WeaponDiniAmmo, weapons[i][1][wep]);
- }
- }
- }
- }
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- BankShow0[playerid] = TextDrawCreate(499.0,100.0, " ");
- //TextDrawTextSize(BankShow0[playerid], 620.0, 480.0);
- TextDrawLetterSize(BankShow0[playerid],0.61,2.15);
- TextDrawFont(BankShow0[playerid], 3);
- TextDrawSetShadow(BankShow0[playerid],2);
- TextDrawSetProportional(BankShow0[playerid],1);
- TextDrawColor(BankShow0[playerid],0x000000FF);
- PlayerAdmin[playerid]=0;
- PlyLogin[playerid] = 0;
- SpeedBoostMultiplier[0][playerid]=1.2;
- SpeedBoostMultiplier[1][playerid]=1.2;
- SetPlayerColor(playerid, PlayerColors[playerid]);
- TogglePlayerClock(playerid, 1);
- IsplayerSpawned[playerid] = 0;
- for (new wep = 0; wep < 13; wep++)
- {
- weapons[wep][0][playerid]=0;
- weapons[wep][1][playerid]=0;
- }
- new plrIP[16];
- GetPlayerIp(playerid, plrIP, sizeof(plrIP));
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- if(!dini_Exists(file))
- {
- dini_Create(file);
- dini_Set(file, "Pass", "none");
- dini_IntSet(file, "Admin", 0);
- dini_IntSet(file, "Score", 0);
- dini_IntSet(file, "Money", 0);
- dini_IntSet(file, "Bank", 0);
- dini_IntSet(file, "Register", 0);
- dini_FloatSet(file, "SSB", 1.2);
- dini_Set(file, "Ip", plrIP);
- PlyLogin[playerid] = 1;
- }
- else
- {
- if(!strcmp(plrIP, dini_Get(file, "Ip")))
- {
- IsPLYLoggedIn(playerid);
- if(dini_Int(file, "Register") == 1)
- {
- SendClientMessage(playerid, 0x00FF00FF, "You are automatic logged in!");
- }
- }
- else if(dini_Int(file, "Register") == 1)
- {
- SendClientMessage(playerid, 0x00FFFFFF, "Use '/Login'");
- }
- }
- if(dini_Int(file, "Register") == 0)
- {
- SendClientMessage(playerid, 0x00FFFFFF, "Use '/register'");
- }
- return 1;
- }
- stock IsPLYLoggedIn(playerid)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- PlayerAdmin[playerid]=dini_Int(file, "Admin");
- SetPlayerScore(playerid, dini_Int(file, "Score"));
- ResetPlayerMoney(playerid);
- GivePlayerMoney(playerid, dini_Int(file, "Money"));
- PlyLogin[playerid] = 1;
- SpeedBoostMultiplier[0][playerid]=dini_Float(file, "SSB");
- SpeedBoostMultiplier[1][playerid]=dini_Float(file, "SSB1");
- for (new wep = 0; wep < 13; wep++)
- {
- new WeaponDini[24],WeaponDiniAmmo[24];
- format(WeaponDini, sizeof(WeaponDini), "Slot%dWep", wep);
- format(WeaponDiniAmmo, sizeof(WeaponDiniAmmo), "Slot%dAmmo", wep);
- GivePlayerWeapon(playerid, dini_Int(file, WeaponDini), dini_Int(file, WeaponDiniAmmo));
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(PlyLogin[playerid] == 1)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- dini_IntSet(file, "Score", GetPlayerScore(playerid));
- dini_IntSet(file, "Money", GetPlayerMoney(playerid));
- dini_FloatSet(file, "SSB",SpeedBoostMultiplier[0][playerid]);
- dini_FloatSet(file, "SSB1",SpeedBoostMultiplier[1][playerid]);
- for (new wep = 0; wep < 13; wep++)
- {
- new WeaponDini[24],WeaponDiniAmmo[24];
- GetPlayerWeaponData(playerid, wep, weapons[playerid][0][wep], weapons[playerid][1][wep]);
- format(WeaponDini, sizeof(WeaponDini), "Slot%dWep", wep);
- dini_IntSet(file, WeaponDini, weapons[playerid][0][wep]);
- format(WeaponDiniAmmo, sizeof(WeaponDiniAmmo), "Slot%dAmmo", wep);
- dini_IntSet(file, WeaponDiniAmmo, weapons[playerid][1][wep]);
- }
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- IsplayerSpawned[playerid] = 1;
- if(PlyLogin[playerid] == 1)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- for (new wep = 0; wep < 13; wep++)
- {
- new WeaponDini[24],WeaponDiniAmmo[24];
- format(WeaponDini, sizeof(WeaponDini), "Slot%dWep", wep);
- format(WeaponDiniAmmo, sizeof(WeaponDiniAmmo), "Slot%dAmmo", wep);
- GivePlayerWeapon(playerid, dini_Int(file, WeaponDini), dini_Int(file, WeaponDiniAmmo));
- }
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- for (new wep = 0; wep < 13; wep++)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- new WeaponDini[24],WeaponDiniAmmo[24];
- GetPlayerWeaponData(playerid, wep, weapons[playerid][0][wep], weapons[playerid][1][wep]);
- format(WeaponDini, sizeof(WeaponDini), "Slot%dWep", wep);
- dini_IntSet(file, WeaponDini, weapons[playerid][0][wep]);
- format(WeaponDiniAmmo, sizeof(WeaponDiniAmmo), "Slot%dAmmo", wep);
- dini_IntSet(file, WeaponDiniAmmo, weapons[playerid][1][wep]);
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/ssb", cmdtext, true, 10) == 0)
- {
- if(PlyLogin[playerid] == 1)
- {
- new ssbs[45];
- format(ssbs,sizeof(ssbs),"SSB1 - Set: %.2f\nSSB2 - Set: %.2f",SpeedBoostMultiplier[0][playerid],SpeedBoostMultiplier[1][playerid]);
- ShowPlayerDialog(playerid, SpeedBoostDialog[3], DIALOG_STYLE_LIST, "Select Speedboost", ssbs, "ok", "Cancel");
- }
- else
- {
- ShowPlayerDialog(playerid, SpeedBoostDialog[4], DIALOG_STYLE_MSGBOX, "Notice", "You need to log in for using this command. (/login)", "ok", "");
- }
- return 1;
- }
- if (strcmp("/Gravity", cmdtext, true, 10) == 0)
- {
- if(PlayerAdmin[playerid]==1)
- {
- ShowPlayerDialog(playerid, GravityDialog[0], DIALOG_STYLE_INPUT, "Gravity", "Enter value between -10 and 10", "ok", "Cancel");
- }
- else
- {
- SendClientMessage(playerid, 0x00FFFFFF, "You need admin for this command.");
- }
- return 1;
- }
- if (strcmp("/PlayAudio", cmdtext, true, 10) == 0)
- {
- if(PlayerAdmin[playerid]==1)
- {
- ShowPlayerDialog(playerid, AudioDialog[0], DIALOG_STYLE_INPUT, "Audio", "Enter AudioStream", "ok", "Cancel");
- }
- else
- {
- SendClientMessage(playerid, 0x00FFFFFF, "You need admin for this command.");
- }
- return 1;
- }
- if (strcmp("/register", cmdtext, true, 10) == 0)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- if(dini_Int(file, "Register") == 0)
- {
- ShowPlayerDialog(playerid, RegisterDialog[1], DIALOG_STYLE_INPUT, "Register:", "Enter a password\n[Passwords must be at least eight characters]", "ok", "Cancel");
- }
- else
- {
- ShowPlayerDialog(playerid, RegisterDialog[0], DIALOG_STYLE_MSGBOX, "Notice", "User already registered.", "ok", "");
- }
- return 1;
- }
- if (strcmp("/login", cmdtext, true, 10) == 0)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- if(PlyLogin[playerid] == 0)
- {
- ShowPlayerDialog(playerid, RegisterDialog[2], DIALOG_STYLE_INPUT, "Login", "Enter a password", "ok", "Cancel");
- }
- else if(dini_Int(file, "Register") == 0)
- {
- ShowPlayerDialog(playerid, RegisterDialog[0], DIALOG_STYLE_MSGBOX, "Notice", "You must first /register", "ok", "");
- }
- else if(PlyLogin[playerid] == 1)
- {
- ShowPlayerDialog(playerid, RegisterDialog[0], DIALOG_STYLE_MSGBOX, "Notice", "User already logged in.", "ok", "");
- }
- return 1;
- }
- if ((strcmp("/w", cmdtext, true, 10) == 0) || (strcmp("/wep", cmdtext, true, 10) == 0) || (strcmp("/weapon", cmdtext, true, 10) == 0))
- {
- ShowPlayerDialog(playerid,WeaponDialog[0], DIALOG_STYLE_LIST, "Select category", "Melee\nThrown\nPistols\nShotguns\nSub-machine guns\nAssault rifles\nRifles\nHeavy weapons\nHand held\nApparel", "Enter", "Cancel");
- return 1;
- }
- if (strcmp("/gangset1", cmdtext, true, 10) == 0)
- {
- GangZoneDestroy(Gangz);
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- ux = x;
- uy = y;
- return 1;
- }
- if (strcmp("/gangset2", cmdtext, true, 10) == 0)
- {
- GangZoneDestroy(Gangz);
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- dx = x;
- dy = y;
- return 1;
- }
- if (strcmp("/gangcreate", cmdtext, true, 10) == 0)
- {
- Gangz = GangZoneCreate(ux, uy, dx, dy);
- for (new i = 0; i < MAX_PLAYERS; i++)
- {
- GangZoneShowForPlayer(i, Gangz, 0xFFFF0096);
- }
- new string[64];
- format(string,sizeof(string),"GangZone: %f, %f, %f, %f",ux, uy, dx, dy);
- SendClientMessageToAll(-1, string);
- return 1;
- }
- if (strcmp("/bank", cmdtext, true, 10) == 0)
- {
- if(PlyLogin[playerid] == 1)
- {
- ShowPlayerDialog(playerid,BankDialog[2], DIALOG_STYLE_LIST, "Bank", "Deposit/Withdraw\nTransfer", "Enter", "Cancel");
- }
- else
- {
- ShowPlayerDialog(playerid, BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You need to log in for using this command. (/login)", "ok", "");
- }
- return 1;
- }
- if (strcmp("/loto", cmdtext, true, 10) == 0)
- {
- ShowPlayerDialog(playerid, LotoDialog[0], DIALOG_STYLE_INPUT, "Loto ticket: $50", "Give six numbers between 0 and 10 separated by a space.\n(example: '7 10 8 1 0 2')", "ok", "Cancel");
- return 1;
- }
- if (strcmp("/cmd", cmdtext, true, 10) == 0)
- {
- new string[200] = "";
- if(PlayerAdmin[playerid]==1)
- {
- format(string,sizeof(string),"======Admin======\n/Gravity\n/PlayAudio\n/Flymode\n");
- }
- format(string,sizeof(string),"%s\n======Player=====\n/SSB\n/register\n/login\n/weapon | /wep | /w\n/bank\n/loto\n/cmd\n/Obj\n/PlyObj\n/AF\n/vehicle | /veh | /v\n/eject\n/flip\n/kill",string);
- ShowPlayerDialog(playerid,CMDDialog[0], DIALOG_STYLE_LIST, "CMD", string, "Enter", "Cancel");
- return 1;
- }
- return 0;
- }
- public OnPlayerClickTextDraw(playerid, Text:clickedid)
- {
- 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)
- {
- 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 (IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if(newkeys & KEY_FIRE)
- {
- new Float:vx, Float:vy, Float:vz;
- GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
- if (floatabs(vx) < 4 && floatabs(vy) < 4 && floatabs(vz) < 4)
- {
- SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * SpeedBoostMultiplier[0][playerid], vy * SpeedBoostMultiplier[0][playerid], vz * SpeedBoostMultiplier[0][playerid]);
- }
- return 1;
- }
- else if (newkeys & KEY_CROUCH)
- {
- new Float:vx, Float:vy, Float:vz;
- GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
- if (floatabs(vx) < 4 && floatabs(vy) < 4 && floatabs(vz) < 4)
- {
- SetVehicleVelocity(GetPlayerVehicleID(playerid), vx * SpeedBoostMultiplier[1][playerid], vy * SpeedBoostMultiplier[1][playerid], vz * SpeedBoostMultiplier[1][playerid]);
- }
- return 1;
- }
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- 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[])
- {
- if(dialogid == AdminDialog[1])
- {
- if(response)
- {
- if(listitem == 0)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(clickply[playerid], x, y, z);
- TelePly(playerid,x+1, y+1, z);
- }
- if(listitem == 1)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- TelePly(clickply[playerid],x+1, y+1, z);
- }
- if(listitem == 2)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(clickply[playerid], x, y, z);
- CreateExplosion(x, y, z, 6, 10.0);
- }
- if(listitem == 3)
- {
- SetPlayerHealth(clickply[playerid], 0);
- }
- if(listitem == 4)
- {
- if(freezply[clickply[playerid]] == 0)
- {
- TogglePlayerControllable(clickply[playerid],0);
- freezply[clickply[playerid]] = 1;
- }
- else
- {
- TogglePlayerControllable(clickply[playerid],1);
- freezply[clickply[playerid]] = 0;
- }
- }
- if(listitem == 5)
- {
- ShowPlayerDialog(playerid, AdminDialog[2], DIALOG_STYLE_INPUT, "Chat:", "Enter text", "ok", "Cancel");
- }
- if(listitem == 6)
- {
- ShowPlayerDialog(playerid, AdminDialog[3], DIALOG_STYLE_INPUT, "PM:", "Enter text", "ok", "Cancel");
- }
- if(listitem == 7)
- {
- Kick(clickply[playerid]);
- }
- }
- return 1;
- }
- if(dialogid == AdminDialog[2])
- {
- if(response)
- {
- new string[512];
- format(string,sizeof(string),"{%06x}%s (%d):{ffffff} %s", GetPlayerColor(clickply[playerid]) >>> 8, GetPlyName(clickply[playerid]), clickply[playerid],inputtext);
- SendClientMessageToAll(0xFFFFFFAA,string);
- }
- return 1;
- }
- if(dialogid == AdminDialog[3])
- {
- if(response)
- {
- new string[512];
- format(string,sizeof(string),"{ffffff}PM: {%06x}%s (%d):{ffffff} %s", GetPlayerColor(clickply[playerid]) >>> 8, GetPlyName(clickply[playerid]), clickply[playerid],inputtext);
- SendClientMessage(clickply[playerid], 0xFFFFFFAA, string);
- }
- return 1;
- }
- //=================speedboost
- if(dialogid == SpeedBoostDialog[0])
- {
- if(response)
- {
- if(floatstr(inputtext) >= -2.0 && floatstr(inputtext) <= 4.0)
- {
- SpeedBoostMultiplier[0][playerid]=floatstr(inputtext);
- }
- else
- {
- ShowPlayerDialog(playerid, SpeedBoostDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You must enter a value between -2.0 and 4.0", "Ok", "");
- }
- }
- return 1;
- }
- if(dialogid == SpeedBoostDialog[2])
- {
- if(response)
- {
- if(floatstr(inputtext) >= -2.0 && floatstr(inputtext) <= 4.0)
- {
- SpeedBoostMultiplier[1][playerid]=floatstr(inputtext);
- }
- else
- {
- ShowPlayerDialog(playerid, SpeedBoostDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You must enter a value between -2.0 and 4.0", "Ok", "");
- }
- }
- return 1;
- }
- if(dialogid == SpeedBoostDialog[3])
- {
- if(response)
- {
- if(listitem == 0)
- {
- new ssbs[45];
- format(ssbs,sizeof(ssbs),"Enter value between -2.0 and 4.0\nCurrent: %.2f",SpeedBoostMultiplier[0][playerid]);
- ShowPlayerDialog(playerid, SpeedBoostDialog[0], DIALOG_STYLE_INPUT, "Speedboost multiplier", ssbs, "ok", "Cancel");
- }
- else if(listitem == 1)
- {
- new ssbs[45];
- format(ssbs,sizeof(ssbs),"Enter value between -2.0 and 4.0\nCurrent: %.2f",SpeedBoostMultiplier[1][playerid]);
- ShowPlayerDialog(playerid, SpeedBoostDialog[2], DIALOG_STYLE_INPUT, "Speedboost multiplier", ssbs, "ok", "Cancel");
- }
- }
- return 1;
- }
- //==============================register
- if(dialogid == RegisterDialog[1])
- {
- if(response)
- {
- if((strlen(inputtext) >= 8 && strlen(inputtext) <= 25))
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- dini_Set(file, "Pass", inputtext);
- dini_IntSet(file, "Register", 1);
- new string[128];
- format(string, sizeof(string), "You succesfully registered the nickname %s with password %s", pname, inputtext);
- ShowPlayerDialog(playerid, RegisterDialog[0], DIALOG_STYLE_MSGBOX, "Notice", string, "ok", "");
- }
- else
- {
- ShowPlayerDialog(playerid, RegisterDialog[0], DIALOG_STYLE_MSGBOX, "Notice", "Password must between 8 and 25 characters!", "ok", "");
- }
- }
- return 1;
- }
- if(dialogid == RegisterDialog[2])
- {
- if(response)
- {
- if((strlen(inputtext) >= 8 && strlen(inputtext) <= 25))
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- if(strcmp(dini_Get(file, "Password"), inputtext) == 0)
- {
- ShowPlayerDialog(playerid, RegisterDialog[0], DIALOG_STYLE_MSGBOX, "Notice", "You have succesfully logged in!", "ok", "");
- new plrIP[16];
- GetPlayerIp(playerid, plrIP, sizeof(plrIP));
- dini_Set(file, "Ip", plrIP);
- IsPLYLoggedIn(playerid);
- }
- else
- {
- ShowPlayerDialog(playerid, RegisterDialog[0], DIALOG_STYLE_MSGBOX, "Notice", "Wrong Password", "ok", "");
- }
- }
- else
- {
- ShowPlayerDialog(playerid, RegisterDialog[0], DIALOG_STYLE_MSGBOX, "Notice", "Password must between 8 and 25 characters!", "ok", "");
- }
- }
- return 1;
- }
- //=======weapon menu==========================================
- if(dialogid == WeaponDialog[0])
- {
- if(response)
- {
- new WeaponString[250];
- if(listitem == 0)//Melee
- {
- for(new w=1; w<15+1; w++)
- {
- format(WeaponString,sizeof(WeaponString), "%s\n%s ($%d)",WeaponString, WeaponList[w][Name],WeaponList[w][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[1], DIALOG_STYLE_LIST, "Select weapon", WeaponString, "Enter", "Back");
- }
- }
- else if(listitem == 1)//Thrown
- {
- for(new w=1; w<4+1; w++)
- {
- new wepid[5]={0,16,17,18,39};
- format(WeaponString,sizeof(WeaponString), "%s\n%s ($%d)",WeaponString, WeaponList[wepid[w]][Name],WeaponList[wepid[w]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[2], DIALOG_STYLE_LIST, "Select weapon", WeaponString, "Enter", "Back");
- }
- }
- else if(listitem == 2)//Pistols
- {
- for(new w=1; w<2+1; w++)
- {
- new wepid[5]={0,22,23};
- format(WeaponString,sizeof(WeaponString), "%s\n%s ($%d)",WeaponString, WeaponList[wepid[w]][Name],WeaponList[wepid[w]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[3], DIALOG_STYLE_LIST, "Select weapon", WeaponString, "Enter", "Back");
- }
- }
- else if(listitem == 3)//Shotguns
- {
- for(new w=1; w<3+1; w++)
- {
- new wepid[5]={0,25,26,27};
- format(WeaponString,sizeof(WeaponString), "%s\n%s ($%d)",WeaponString, WeaponList[wepid[w]][Name],WeaponList[wepid[w]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[4], DIALOG_STYLE_LIST, "Select weapon", WeaponString, "Enter", "Back");
- }
- }
- else if(listitem == 4)//Sub-machine guns
- {
- for(new w=1; w<3+1; w++)
- {
- new wepid[5]={0,28,29,32};
- format(WeaponString,sizeof(WeaponString), "%s\n%s ($%d)",WeaponString, WeaponList[wepid[w]][Name],WeaponList[wepid[w]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[5], DIALOG_STYLE_LIST, "Select weapon", WeaponString, "Enter", "Back");
- }
- }
- else if(listitem == 5)//Assault rifles
- {
- for(new w=1; w<2+1; w++)
- {
- new wepid[5]={0,30,31};
- format(WeaponString,sizeof(WeaponString), "%s\n%s ($%d)",WeaponString, WeaponList[wepid[w]][Name],WeaponList[wepid[w]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[6], DIALOG_STYLE_LIST, "Select weapon", WeaponString, "Enter", "Back");
- }
- }
- else if(listitem == 6)//Rifles
- {
- for(new w=1; w<2+1; w++)
- {
- new wepid[5]={0,33,34};
- format(WeaponString,sizeof(WeaponString), "%s\n%s ($%d)",WeaponString, WeaponList[wepid[w]][Name],WeaponList[wepid[w]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[7], DIALOG_STYLE_LIST, "Select weapon", WeaponString, "Enter", "Back");
- }
- }
- else if(listitem == 7)//Heavy weapons
- {
- for(new w=1; w<4+1; w++)
- {
- new wepid[5]={0,35,36,37,38};
- format(WeaponString,sizeof(WeaponString), "%s\n%s ($%d)",WeaponString, WeaponList[wepid[w]][Name],WeaponList[wepid[w]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[8], DIALOG_STYLE_LIST, "Select weapon", WeaponString, "Enter", "Back");
- }
- }
- else if(listitem == 8)//Hand held
- {
- for(new w=1; w<3+1; w++)
- {
- new wepid[5]={0,41,42,43};
- format(WeaponString,sizeof(WeaponString), "%s\n%s ($%d)",WeaponString, WeaponList[wepid[w]][Name],WeaponList[wepid[w]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[9], DIALOG_STYLE_LIST, "Select weapon", WeaponString, "Enter", "Back");
- }
- }
- else if(listitem == 9)//Apparel
- {
- for(new w=1; w<1+1; w++)
- {
- new wepid[5]={0,46};
- format(WeaponString,sizeof(WeaponString), "%s\n%s ($%d)",WeaponString, WeaponList[wepid[w]][Name],WeaponList[wepid[w]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[10], DIALOG_STYLE_LIST, "Select weapon", WeaponString, "Enter", "Back");
- }
- }
- WeaponDiaString[playerid] = WeaponString;
- //ShowPlayerDialog(playerid,WeaponDialog[0], DIALOG_STYLE_LIST, "Select category", "Melee\nThrown\nPistols\nShotguns\nSub-machine guns\nAssault rifles\nRifles\nHeavy weapons\nHand held\nApparel", "Enter", "Cancel");
- }
- return 1;
- }
- if((dialogid == WeaponDialog[1]) || (dialogid == WeaponDialog[2])|| (dialogid == WeaponDialog[3])|| (dialogid == WeaponDialog[4])|| (dialogid == WeaponDialog[5])||(dialogid == WeaponDialog[6])|| (dialogid == WeaponDialog[7])|| (dialogid == WeaponDialog[8])|| (dialogid == WeaponDialog[9])|| (dialogid == WeaponDialog[10]))
- {
- if(!response){ShowPlayerDialog(playerid,WeaponDialog[0], DIALOG_STYLE_LIST, "Select category", "Melee\nThrown\nPistols\nShotguns\nSub-machine guns\nAssault rifles\nRifles\nHeavy weapons\nHand held\nApparel", "Enter", "Cancel");}
- }
- if(dialogid == WeaponDialog[1])
- {
- if(response)
- {
- new wepid[16]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
- if(GetPlayerMoney(playerid) < WeaponList[wepid[listitem+1]][Prices]) return ShowPlayerDialog(playerid,WeaponDialog[11], DIALOG_STYLE_MSGBOX, "Notice", "you don't have enough money.", "Ok", "");
- GivePlayerWeapon(playerid, wepid[listitem+1], WeaponList[wepid[listitem+1]][Ammo]);
- GivePlayerMoney(playerid, - WeaponList[wepid[listitem+1]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[1], DIALOG_STYLE_LIST, "Select weapon", WeaponDiaString[playerid], "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == WeaponDialog[2])
- {
- if(response)
- {
- new wepid[5]={0,16,17,18,39};
- if(GetPlayerMoney(playerid) < WeaponList[wepid[listitem+1]][Prices]) return ShowPlayerDialog(playerid,WeaponDialog[11], DIALOG_STYLE_MSGBOX, "Notice", "you don't have enough money.", "Ok", "");
- GivePlayerWeapon(playerid, wepid[listitem+1], WeaponList[wepid[listitem+1]][Ammo]);
- GivePlayerMoney(playerid, - WeaponList[wepid[listitem+1]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[2], DIALOG_STYLE_LIST, "Select weapon", WeaponDiaString[playerid], "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == WeaponDialog[3])
- {
- if(response)
- {
- new wepid[5]={0,22,23};
- if(GetPlayerMoney(playerid) < WeaponList[wepid[listitem+1]][Prices]) return ShowPlayerDialog(playerid,WeaponDialog[11], DIALOG_STYLE_MSGBOX, "Notice", "you don't have enough money.", "Ok", "");
- GivePlayerWeapon(playerid, wepid[listitem+1], WeaponList[wepid[listitem+1]][Ammo]);
- GivePlayerMoney(playerid, - WeaponList[wepid[listitem+1]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[3], DIALOG_STYLE_LIST, "Select weapon", WeaponDiaString[playerid], "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == WeaponDialog[4])
- {
- if(response)
- {
- new wepid[5]={0,25,26,27};
- if(GetPlayerMoney(playerid) < WeaponList[wepid[listitem+1]][Prices]) return ShowPlayerDialog(playerid,WeaponDialog[11], DIALOG_STYLE_MSGBOX, "Notice", "you don't have enough money.", "Ok", "");
- GivePlayerWeapon(playerid, wepid[listitem+1], WeaponList[wepid[listitem+1]][Ammo]);
- GivePlayerMoney(playerid, - WeaponList[wepid[listitem+1]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[4], DIALOG_STYLE_LIST, "Select weapon", WeaponDiaString[playerid], "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == WeaponDialog[5])
- {
- if(response)
- {
- new wepid[5]={0,28,29,32};
- if(GetPlayerMoney(playerid) < WeaponList[wepid[listitem+1]][Prices]) return ShowPlayerDialog(playerid,WeaponDialog[11], DIALOG_STYLE_MSGBOX, "Notice", "you don't have enough money.", "Ok", "");
- GivePlayerWeapon(playerid, wepid[listitem+1], WeaponList[wepid[listitem+1]][Ammo]);
- GivePlayerMoney(playerid, - WeaponList[wepid[listitem+1]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[5], DIALOG_STYLE_LIST, "Select weapon", WeaponDiaString[playerid], "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == WeaponDialog[6])
- {
- if(response)
- {
- new wepid[5]={0,30,31};
- if(GetPlayerMoney(playerid) < WeaponList[wepid[listitem+1]][Prices]) return ShowPlayerDialog(playerid,WeaponDialog[11], DIALOG_STYLE_MSGBOX, "Notice", "you don't have enough money.", "Ok", "");
- GivePlayerWeapon(playerid, wepid[listitem+1], WeaponList[wepid[listitem+1]][Ammo]);
- GivePlayerMoney(playerid, - WeaponList[wepid[listitem+1]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[6], DIALOG_STYLE_LIST, "Select weapon", WeaponDiaString[playerid], "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == WeaponDialog[7])
- {
- if(response)
- {
- new wepid[5]={0,33,34};
- if(GetPlayerMoney(playerid) < WeaponList[wepid[listitem+1]][Prices]) return ShowPlayerDialog(playerid,WeaponDialog[11], DIALOG_STYLE_MSGBOX, "Notice", "you don't have enough money.", "Ok", "");
- GivePlayerWeapon(playerid, wepid[listitem+1], WeaponList[wepid[listitem+1]][Ammo]);
- GivePlayerMoney(playerid, - WeaponList[wepid[listitem+1]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[7], DIALOG_STYLE_LIST, "Select weapon", WeaponDiaString[playerid], "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == WeaponDialog[8])
- {
- if(response)
- {
- new wepid[5]={0,35,36,37,38};
- if(GetPlayerMoney(playerid) < WeaponList[wepid[listitem+1]][Prices]) return ShowPlayerDialog(playerid,WeaponDialog[11], DIALOG_STYLE_MSGBOX, "Notice", "you don't have enough money.", "Ok", "");
- GivePlayerWeapon(playerid, wepid[listitem+1], WeaponList[wepid[listitem+1]][Ammo]);
- GivePlayerMoney(playerid, - WeaponList[wepid[listitem+1]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[8], DIALOG_STYLE_LIST, "Select weapon", WeaponDiaString[playerid], "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == WeaponDialog[9])
- {
- if(response)
- {
- new wepid[5]={0,41,42,43};
- if(GetPlayerMoney(playerid) < WeaponList[wepid[listitem+1]][Prices]) return ShowPlayerDialog(playerid,WeaponDialog[11], DIALOG_STYLE_MSGBOX, "Notice", "you don't have enough money.", "Ok", "");
- GivePlayerWeapon(playerid, wepid[listitem+1], WeaponList[wepid[listitem+1]][Ammo]);
- GivePlayerMoney(playerid, - WeaponList[wepid[listitem+1]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[9], DIALOG_STYLE_LIST, "Select weapon", WeaponDiaString[playerid], "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == WeaponDialog[10])
- {
- if(response)
- {
- new wepid[5]={0,46};
- if(GetPlayerMoney(playerid) < WeaponList[wepid[listitem+1]][Prices]) return ShowPlayerDialog(playerid,WeaponDialog[11], DIALOG_STYLE_MSGBOX, "Notice", "you don't have enough money.", "Ok", "");
- GivePlayerWeapon(playerid, wepid[listitem+1], WeaponList[wepid[listitem+1]][Ammo]);
- GivePlayerMoney(playerid, - WeaponList[wepid[listitem+1]][Prices]);
- ShowPlayerDialog(playerid,WeaponDialog[10], DIALOG_STYLE_LIST, "Select weapon", WeaponDiaString[playerid], "Enter", "Back");
- }
- return 1;
- }
- //ShowPlayerDialog(playerid,WeaponDialog[0], DIALOG_STYLE_LIST, "Select category", "Melee\nThrown\nPistols\nShotguns\nSub-machine guns\nAssault rifles\nRifles\nHeavy weapons\nHand held\nApparel", "Enter", "Cancel");
- //========================gravity
- if(dialogid == GravityDialog[0])
- {
- if(response)
- {
- if(floatstr(inputtext) >= -10.0 && floatstr(inputtext) <= 10.0)
- {
- SetGravity(floatstr(inputtext));
- }
- else
- {
- ShowPlayerDialog(playerid, SpeedBoostDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You must enter a value between -10.0 and 10.0", "Ok", "");
- }
- }
- return 1;
- }
- //======================AudioStream
- if(dialogid == AudioDialog[0])
- {
- if(response)
- {
- for(new i; i<MAX_PLAYERS+1; i++)
- {
- if (!IsPlayerNPC(i))
- {
- PlayAudioStreamForPlayer(i, inputtext);
- }
- }
- }
- return 1;
- }
- //=======================bank
- if(dialogid == BankDialog[2])
- {
- if(response)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- if(listitem == 0)//Deposit/Withdraw
- {
- new Title[64];
- format(Title,sizeof(Title),"Deposit/Withdraw | Current money: $%d",floatround(dini_Float(file, "Bank"), floatround_round));
- ShowPlayerDialog(playerid,BankDialog[0], DIALOG_STYLE_LIST, Title, "-$500\n-$1000\n-$2500\n-$5000\n-$10000\n-$50000\n-All\n \n+$500\n+$1000\n+$2500\n+$5000\n+$10000\n+$50000\n+All", "Enter", "Cancel");
- }
- else if(listitem == 1)//transfer
- {
- new Title[64];
- format(Title,sizeof(Title),"Transfer | Current money: $%d",floatround(dini_Float(file, "Bank"), floatround_round));
- ShowPlayerDialog(playerid,BankDialog[3], DIALOG_STYLE_INPUT, Title, "Enter player name or ID.", "Enter", "Cancel");
- }
- }
- return 1;
- }
- if(dialogid == BankDialog[3])
- {
- if(response)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- new id;
- if(sscanf(inputtext, "u", id)) return ShowPlayerDialog(playerid, BankDialog[5], DIALOG_STYLE_MSGBOX, "Notice", "Enter player name or ID.", "Ok", "");
- if(!IsPlayerConnected(id)) return ShowPlayerDialog(playerid, BankDialog[5], DIALOG_STYLE_MSGBOX, "Notice", "This player is offline.", "Ok", "");
- if(IsPlayerNPC(id)) return ShowPlayerDialog(playerid, BankDialog[5], DIALOG_STYLE_MSGBOX, "Notice", "This player is an NPC.", "Ok", "");
- new Title[180];
- format(Title,sizeof(Title),"Transfer | Current money: $%d",floatround(dini_Float(file, "Bank"), floatround_round));
- new Text[180];
- format(Text,sizeof(Text),"{FFFFFF}You will transfer money to {00FF00}%s (%d).{FFFFFF} If this incorrect, hit the back button.\n \nEnter the amount of money you want to transfer.\n(example: '1500')",GetPlyName(id),id);
- MoneyransferID[playerid] = id;
- ShowPlayerDialog(playerid,BankDialog[4], DIALOG_STYLE_INPUT, Title, Text, "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == BankDialog[4])
- {
- new file[128], pname[MAX_PLAYER_NAME], Text[180],Textt[180];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- if(response)
- {
- new money;
- if(sscanf(inputtext, "i", money)) return ShowPlayerDialog(playerid, BankDialog[6], DIALOG_STYLE_MSGBOX, "Notice", "Enter the amount of money you want to transfer. (example: '1500')", "Ok", "");
- if(dini_Float(file, "Bank") < money) return ShowPlayerDialog(playerid,BankDialog[6], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- if(money < 50) return ShowPlayerDialog(playerid,BankDialog[6], DIALOG_STYLE_MSGBOX, "Notice", "You can only give money above $50", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")-money);
- GetPlayerName(MoneyransferID[playerid], pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")+money);
- format(Text,sizeof(Text),"{FFFFFF}You have successfully transfer $%d to {00FF00}%s (%d)",money,GetPlyName(MoneyransferID[playerid]),MoneyransferID[playerid]);
- ShowPlayerDialog(playerid,BankDialog[7], DIALOG_STYLE_MSGBOX, "Notice", Text , "Enter", "");
- format(Textt,sizeof(Textt),"%s (%d) have transfer $%d to you.",GetPlyName(playerid),playerid,money);
- SendClientMessage(MoneyransferID[playerid], -1, Textt);
- }
- else
- {
- new Title[64];
- format(Title,sizeof(Title),"Transfer | Current money: $%d",floatround(dini_Float(file, "Bank"), floatround_round));
- ShowPlayerDialog(playerid,BankDialog[3], DIALOG_STYLE_INPUT, Title, "Enter player name or ID.", "Enter", "Cancel");
- }
- return 1;
- }
- if(dialogid == BankDialog[5])
- {
- if(response)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- new Title[64];
- format(Title,sizeof(Title),"Transfer | Current money: $%d",floatround(dini_Float(file, "Bank"), floatround_round));
- ShowPlayerDialog(playerid,BankDialog[3], DIALOG_STYLE_INPUT, Title, "Enter player name or ID.", "Enter", "Cancel");
- }
- return 1;
- }
- if(dialogid == BankDialog[6])
- {
- if(response)
- {
- ShowPlayerDialog(playerid,BankDialog[4], DIALOG_STYLE_MSGBOX, "Notice", "Enter the amount of money you want to transfer.\n(example: '1500')", "Enter", "Back");
- }
- return 1;
- }
- if(dialogid == BankDialog[1])
- {
- if(response)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- new Title[64];
- format(Title,sizeof(Title),"Current money: $%d",dini_Int(file, "Bank"));
- ShowPlayerDialog(playerid,BankDialog[0], DIALOG_STYLE_LIST, Title, "-$500\n-$1000\n-$2500\n-$5000\n-$10000\n-$50000\n-All\n \n+$500\n+$1000\n+$2500\n+$5000\n+$10000\n+$50000\n+All", "Enter", "Cancel");
- }
- return 1;
- }
- if(dialogid == BankDialog[0])
- {
- if(response)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- if(listitem == 0)//-500
- {
- if(GetPlayerMoney(playerid) < 500) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")+500);
- GivePlayerMoney(playerid, -500);
- }
- if(listitem == 1)//-1000
- {
- if(GetPlayerMoney(playerid) < 1000) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")+1000);
- GivePlayerMoney(playerid, -1000);
- }
- if(listitem == 2)//-2500
- {
- if(GetPlayerMoney(playerid) < 2500) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")+2500);
- GivePlayerMoney(playerid, -2500);
- }
- if(listitem == 3)//-5000
- {
- if(GetPlayerMoney(playerid) < 5000) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")+5000);
- GivePlayerMoney(playerid, -5000);
- }
- if(listitem == 4)//-10000
- {
- if(GetPlayerMoney(playerid) < 10000) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")+10000);
- GivePlayerMoney(playerid, -10000);
- }
- if(listitem == 5)//-50000
- {
- if(GetPlayerMoney(playerid) < 50000) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")+50000);
- GivePlayerMoney(playerid, -50000);
- }
- if(listitem == 6)//-all
- {
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")+GetPlayerMoney(playerid));
- ResetPlayerMoney(playerid);
- }
- if(listitem == 7)//-nono
- {
- }
- if(listitem == 8)//+500
- {
- if(floatround(dini_Float(file, "Bank"), floatround_round) < 500) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")-500.0);
- GivePlayerMoney(playerid, 500);
- }
- if(listitem == 9)//+1000
- {
- if(floatround(dini_Float(file, "Bank"), floatround_round) < 1000) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")-1000.0);
- GivePlayerMoney(playerid, 1000);
- }
- if(listitem == 10)//+2500
- {
- if(floatround(dini_Float(file, "Bank"), floatround_round) < 2500) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")-2500.0);
- GivePlayerMoney(playerid, 2500);
- }
- if(listitem == 11)//+5000
- {
- if(floatround(dini_Float(file, "Bank"), floatround_round) < 5000) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")-5000.0);
- GivePlayerMoney(playerid, 5000);
- }
- if(listitem == 12)//+10000
- {
- if(floatround(dini_Float(file, "Bank"), floatround_round) < 10000) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")-10000.0);
- GivePlayerMoney(playerid, 10000);
- }
- if(listitem == 13)//+50000
- {
- if(floatround(dini_Float(file, "Bank"), floatround_round) < 50000) return ShowPlayerDialog(playerid,BankDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "You don't have enough money.", "OK", "");
- dini_FloatSet(file, "Bank", dini_Float(file, "Bank")-50000.0);
- GivePlayerMoney(playerid, 50000);
- }
- if(listitem == 14)//+all
- {
- GivePlayerMoney(playerid, floatround(dini_Float(file, "Bank"), floatround_round));
- dini_FloatSet(file, "Bank", 0.0);
- }
- new Title[64];
- format(Title,sizeof(Title),"Current money: $%d",dini_Int(file, "Bank"));
- ShowPlayerDialog(playerid,BankDialog[0], DIALOG_STYLE_LIST, Title, "-$500\n-$1000\n-$2500\n-$5000\n-$10000\n-$50000\n-All\n \n+$500\n+$1000\n+$2500\n+$5000\n+$10000\n+$50000\n+All", "Enter", "Cancel");
- }
- return 1;
- }
- if(dialogid == BankDialog[1])
- {
- if(response)
- {
- new file[128], pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(file, sizeof(file), "\\Users\\%s.ini", pname);
- new Title[64];
- format(Title,sizeof(Title),"Current money: %d",floatround(dini_Float(file, "Bank"), floatround_round));
- ShowPlayerDialog(playerid,BankDialog[0], DIALOG_STYLE_LIST, Title, "-$500\n-$1000\n-$2500\n-$5000\n-$10000\n-$50000\n-All\n \n+$500\n+$1000\n+$2500\n+$5000\n+$10000\n+$50000\n+All", "Enter", "Cancel");
- }
- return 1;
- }
- if(dialogid == LotoDialog[0])
- {
- if(response)
- {
- new num1,num2,num3,num4,num5,num6;
- if(sscanf(inputtext, "iiiiii", num1,num2,num3,num4,num5,num6)) return ShowPlayerDialog(playerid,LotoDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "Give six numbers between 0 and 20 separated by a space.\n(example: '7 10 02 11 0 19')", "OK", "");
- if(((num1 >= 0)&&(num1 <= 10))&&((num2 >= 0)&&(num2 <= 10))&&((num3 >= 0)&&(num3 <= 10))&&((num4 >= 0)&&(num4 <= 10))&&((num5 >= 0)&&(num5 <= 10))&&((num6 >= 0)&&(num6 <= 10)))
- {
- new tors[528];
- new num1r,num2r,num3r,num4r,num5r,num6r;
- num1r = randomEx(0, 11);
- num2r = randomEx(0, 11);
- num3r = randomEx(0, 11);
- num4r = randomEx(0, 11);
- num5r = randomEx(0, 11);
- num6r = randomEx(0, 11);
- new numbs=0;
- format(tors,sizeof(tors),"{FFFFFF} Ticket Num | WIN Num \n----------------------------------------------",tors, num1,num1r);
- if(num1 == num1r){format(tors,sizeof(tors),"%s\n{FFFFFF}1: %02d | %02d {00FF00}V",tors,num1,num1r);numbs++;}else{format(tors,sizeof(tors),"%s\n{FFFFFF}1: %02d | %02d {FF0000}X",tors,num1,num1r);}
- if(num2 == num2r){format(tors,sizeof(tors),"%s\n{FFFFFF}2: %02d | %02d {00FF00}V",tors,num2,num2r);numbs++;}else{format(tors,sizeof(tors),"%s\n{FFFFFF}2: %02d | %02d {FF0000}X",tors,num2,num2r);}
- if(num3 == num3r){format(tors,sizeof(tors),"%s\n{FFFFFF}3: %02d | %02d {00FF00}V",tors,num3,num3r);numbs++;}else{format(tors,sizeof(tors),"%s\n{FFFFFF}3: %02d | %02d {FF0000}X",tors,num3,num3r);}
- if(num4 == num4r){format(tors,sizeof(tors),"%s\n{FFFFFF}4: %02d | %02d {00FF00}V",tors,num4,num4r);numbs++;}else{format(tors,sizeof(tors),"%s\n{FFFFFF}4: %02d | %02d {FF0000}X",tors,num4,num4r);}
- if(num5 == num5r){format(tors,sizeof(tors),"%s\n{FFFFFF}5: %02d | %02d {00FF00}V",tors,num5,num5r);numbs++;}else{format(tors,sizeof(tors),"%s\n{FFFFFF}5: %02d | %02d {FF0000}X",tors,num5,num5r);}
- if(num6 == num6r){format(tors,sizeof(tors),"%s\n{FFFFFF}6: %02d | %02d {00FF00}V",tors,num6,num6r);numbs++;}else{format(tors,sizeof(tors),"%s\n{FFFFFF}6: %02d | %02d {FF0000}X",tors,num6,num6r);}
- format(tors,sizeof(tors),"%s\n{FFFFFF}----------------------------------------------\nTicket Price: -$50\n----------------------------------------------\nMatching groups: %d\n----------------------------------------------\nMoney Won: {00FF00}$%d",tors, numbs, floatround(floatpower(11,numbs), floatround_round));
- GivePlayerMoney(playerid,-50);
- GivePlayerMoney(playerid,floatround(floatpower(11,numbs), floatround_round));
- ShowPlayerDialog(playerid,LotoDialog[2], DIALOG_STYLE_MSGBOX, "Ticket", tors, "OK", "");
- if(floatround(floatpower(11,numbs), floatround_round) >= 5)
- {
- new string[64],pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string,sizeof(string),"%s won $%d by a '/loto' ticket.",pname,floatround(floatpower(11,numbs), floatround_round));
- SendClientMessageToAll(0xFFFFFFAA,string);
- }
- }
- else
- {
- ShowPlayerDialog(playerid,LotoDialog[1], DIALOG_STYLE_MSGBOX, "Notice", "One of your numbers is not between 0 and 10!", "OK", "");
- }
- }
- return 1;
- }
- if(dialogid == LotoDialog[1])
- {
- if(response)
- {
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- if(PlayerAdmin[playerid] == 1)
- {
- ShowPlayerDialog(playerid, AdminDialog[1], DIALOG_STYLE_LIST, "Admin:", "Goto\nGet\nExplode\nKill\nFreeze\nChat\nPm\nKick", "Ok", "Cancel");
- clickply[playerid] = clickedplayerid;
- }
- else
- {
- }
- return 1;
- }
- stock randomEx(min, max)
- {
- //Credits to y_less
- new rand = random(max-min)+min;
- return rand;
- }
- stock sscanf(string[], format[], {Float,_}:...)
- {
- #if defined isnull
- if (isnull(string))
- #else
- if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
- #endif
- {
- return format[0];
- }
- #pragma tabsize 4
- new
- formatPos = 0,
- stringPos = 0,
- paramPos = 2,
- paramCount = numargs(),
- delim = ' ';
- while (string[stringPos] && string[stringPos] <= ' ')
- {
- stringPos++;
- }
- while (paramPos < paramCount && string[stringPos])
- {
- switch (format[formatPos++])
- {
- case '\0':
- {
- return 0;
- }
- case 'i', 'd':
- {
- new
- neg = 1,
- num = 0,
- ch = string[stringPos];
- if (ch == '-')
- {
- neg = -1;
- ch = string[++stringPos];
- }
- do
- {
- stringPos++;
- if ('0' <= ch <= '9')
- {
- num = (num * 10) + (ch - '0');
- }
- else
- {
- return -1;
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num * neg);
- }
- case 'h', 'x':
- {
- new
- ch,
- num = 0;
- while ((ch = string[stringPos]) > ' ' && ch != delim)
- {
- switch (ch)
- {
- case 'x', 'X':
- {
- num = 0;
- continue;
- }
- case '0' .. '9':
- {
- num = (num << 4) | (ch - '0');
- }
- case 'a' .. 'f':
- {
- num = (num << 4) | (ch - ('a' - 10));
- }
- case 'A' .. 'F':
- {
- num = (num << 4) | (ch - ('A' - 10));
- }
- default:
- {
- return -1;
- }
- }
- }
- setarg(paramPos, 0, num);
- }
- case 'c':
- {
- setarg(paramPos, 0, string[stringPos++]);
- }
- case 'f':
- {
- setarg(paramPos, 0, _:floatstr(string[stringPos]));
- }
- case 'p':
- {
- delim = format[formatPos++];
- continue;
- }
- case '\'':
- {
- new
- end = formatPos - 1,
- ch;
- while ((ch = format[++end]) && ch != '\'') {}
- if (!ch)
- {
- return -1;
- }
- format[end] = '\0';
- if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
- {
- if (format[end + 1])
- {
- return -1;
- }
- return 0;
- }
- format[end] = '\'';
- stringPos = ch + (end - formatPos);
- formatPos = end + 1;
- }
- case 'u':
- {
- new
- end = stringPos - 1,
- id = 0,
- bool:num = true,
- ch;
- while ((ch = string[++end]) && ch != delim)
- {
- if (num)
- {
- if ('0' <= ch <= '9')
- {
- id = (id * 10) + (ch - '0');
- }
- else
- {
- num = false;
- }
- }
- }
- if (num && IsPlayerConnected(id))
- {
- setarg(paramPos, 0, id);
- }
- else
- {
- #if !defined foreach
- #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
- #define __SSCANF_FOREACH__
- #endif
- string[end] = '\0';
- num = false;
- new
- name[MAX_PLAYER_NAME];
- id = end - stringPos;
- foreach (Player, playerid)
- {
- GetPlayerName(playerid, name, sizeof (name));
- if (!strcmp(name, string[stringPos], true, id))
- {
- setarg(paramPos, 0, playerid);
- num = true;
- break;
- }
- }
- if (!num)
- {
- setarg(paramPos, 0, INVALID_PLAYER_ID);
- }
- string[end] = ch;
- #if defined __SSCANF_FOREACH__
- #undef foreach
- #undef __SSCANF_FOREACH__
- #endif
- }
- stringPos = end;
- }
- case 's', 'z':
- {
- new
- i = 0,
- ch;
- if (format[formatPos])
- {
- while ((ch = string[stringPos++]) && ch != delim)
- {
- setarg(paramPos, i++, ch);
- }
- if (!i)
- {
- return -1;
- }
- }
- else
- {
- while ((ch = string[stringPos++]))
- {
- setarg(paramPos, i++, ch);
- }
- }
- stringPos--;
- setarg(paramPos, i, '\0');
- }
- default:
- {
- continue;
- }
- }
- while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
- {
- stringPos++;
- }
- while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
- {
- stringPos++;
- }
- paramPos++;
- }
- do
- {
- if ((delim = format[formatPos++]) > ' ')
- {
- if (delim == '\'')
- {
- while ((delim = format[formatPos++]) && delim != '\'') {}
- }
- else if (delim != 'z')
- {
- return delim;
- }
- }
- }
- while (delim > ' ');
- return 0;
- }
- stock TelePly(playerid,Float:x,Float:y,Float:z,Float:a= 0.0)
- {
- SetPlayerPos(playerid,x,y,z);
- SetPlayerFacingAngle( playerid, a );
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("TelePlyTimer", 2000, 0, "d", playerid);
- GameTextForPlayer(playerid, "~g~Loading...", 2000, 3);
- return 1;
- }
- forward TelePlyTimer(playerid);
- public TelePlyTimer(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- stock GetPlyName(playerid)
- {
- new name[MAX_PLAYER_NAME+1];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement