Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************************************
- * ------San Andreas Hard DeathMatch GameMode------ *
- * ------Created By Vlad------ *
- * Credits: *
- * 90% of the credits goes to me, the rest goes to Y_LESS, V_LOPE and Devilxz97... *
- * Permissions: *
- * You can modify/host this GM just if the credits goes to me. DON'T REMOVE ANY OF THESE CREDITS! *
- * You'll see the credits when u start the server. *
- * Info: *
- * This GM took me 1 week and it's my first GM, so feel free to corect any mistakes i made in this GM. *
- * I know that in this GM i didn't used much text but this is a basic DM script. *
- * Before editing this GM keep in mind that you have to keep the credits! *
- * Have Fun! *
- *******************************************************************************************************/
- #include <a_samp>
- #include <Dini>
- #include <sscanf>
- #define Register 0
- #define Logged 1
- #define COLOR_GRAD1 0xB4B5B7FF
- #define COLOR_GRAD2 0xBFC0C2FF
- #define COLOR_GRAD3 0xCBCCCEFF
- #define COLOR_GRAD4 0xD8D8D8FF
- #define COLOR_GRAD5 0xE3E3E3FF
- #define COLOR_GRAD6 0xF0F0F0FF
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_FADE1 0xE6E6E6E6
- #define COLOR_FADE2 0xC8C8C8C8
- #define COLOR_FADE3 0xAAAAAAAA
- #define COLOR_FADE4 0x8C8C8C8C
- #define COLOR_FADE5 0x6E6E6E6E
- #define COLOR_PURPLE 0xC2A2DAAA
- #define COLOR_DBLUE 0x2641FEAA
- #define COLOR_ALLDEPT 0xFF8282AA
- forward timer_out_of_jail (playerid);
- forward timer_teleport_spawn (playerid);
- forward timer_teleport_pdls (playerid);
- forward timer_teleport_lsair (playerid);
- forward timer_teleport_lv (playerid);
- forward timer_teleport_airlv (playerid);
- new Login[MAX_PLAYERS];
- strtok(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[20];
- while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("-----------------------------------------------");
- print("| San Andreas Hard DeathMatch GM |");
- print("| Created By Vlad |");
- print("| |");
- print("| Enjoy the server! |");
- print("-----------------------------------------------");
- print(" ");
- print("----------------------------------");
- print("| Keep The Credits! |");
- print("----------------------------------");
- }
- #endif
- public OnGameModeInit()
- {
- SetGameModeText("San Andreas DM");
- AddPlayerClass(46, 1310.1509, -1367.6149 ,13.5383 ,179.3588, 0, 0, 0, 0, 0, 0);
- SetTeamCount( 10 );
- EnableStuntBonusForAll(0);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, 0xEAFF00, " ");
- SendClientMessage (playerid, COLOR_YELLOW, "Welcome to San Andreas Hard DeathMatch!");
- SendClientMessage (playerid, COLOR_YELLOW, "Please wait, connecting...");
- SendClientMessage (playerid, COLOR_YELLOW, "Please insert your password!");
- if(IsPlayerAdmin(playerid)) SendClientMessageToAll(0xDEEE20FF, "An admin connected to the server!");
- else SendClientMessageToAll(0xDEEE20FF, "A player connected to the server!");
- TogglePlayerClock(playerid, 1); // Show the clock - 1=show 0=hide
- SetPlayerTime(playerid,12,0);
- SetPlayerTeam(playerid, 1);
- SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
- Login[playerid] = 0;
- new nombre[MAX_PLAYER_NAME], archivo[256];
- GetPlayerName(playerid, nombre, sizeof(nombre));
- format(archivo, sizeof(archivo), "/Users/%s.ini", nombre);
- if (!dini_Exists(archivo))
- {
- //Register Dialog
- ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "Insert Your password here", "Acept", "Cancel");
- SetPlayerScore (playerid, 1000);
- GivePlayerMoney (playerid, 1000000);
- }
- else
- {
- //Login Dialog
- ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Insert your password here", "Acept", "Cancel");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetPlayerPos (playerid, 1310.1509,-1367.6149,13.5383);
- SetPlayerHealth (playerid, 100);
- SetPlayerArmour (playerid, 100);
- new PlayerName[MAX_PLAYER_NAME],
- string[128];
- GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
- format(string, sizeof(string), "%s has spawned.", PlayerName);
- SendClientMessageToAll(0xFFFFFFFF, string);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- SendClientMessage (playerid, COLOR_RED, "You died");
- GivePlayerMoney (playerid, -100);
- SetPlayerScore (playerid, -10);
- SendClientMessage (playerid, COLOR_RED, "Medic: Your medical bill contained $200. Have a nice day!");
- GivePlayerMoney (killerid, 1000);
- SetPlayerScore (killerid, 10);
- SetPlayerWantedLevel (killerid, 6);
- SendClientMessage (killerid, COLOR_RED, "You killed a player!");
- SendClientMessage (killerid, COLOR_RED, "The police is coming for you, be careful!");
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- stock IsPlayerAtPoliceStation(playerid)
- {
- if (IsPlayerInRangeOfPoint(playerid,10,248.3816,68.2929,1003.6406)) return 1;
- return 0;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid,cmdtext[])
- {
- if (!strcmp("/help",cmdtext,true,7))
- {
- SendClientMessage (playerid, 0x61FF36, "|_________________________________Commands_________________________________|");
- SendClientMessage (playerid, 0x61FF36, "General Commands: /help /refuel /rules /tips /surrender");
- SendClientMessage (playerid, 0x61FF36, "Weapon Commands: /1weapon /2weapon /3weapon /4weapon /health /armour");
- SendClientMessage (playerid, 0x61FF36, "Animation Commands: /smoke /beer /sprunk /selftie /handsup /stopanim");
- SendClientMessage (playerid, 0x61FF36, "Animation Commands: /dance1 /dance2 /dance3 /dance4");
- SendClientMessage (playerid, 0x61FF36, "Other Commands: /jetpack /weather /teleports");
- return 1;
- }
- if (!strcmp("/rules",cmdtext,true,7))
- {
- SendClientMessage (playerid, 0x006EFF, "|____________________________________Rules__________________________________________|");
- SendClientMessage (playerid, 0x006EFF, "Don't use any kind of cheats! Nice Cheat = Nice Ban!");
- SendClientMessage (playerid, 0x006EFF, "Don't ask for admin rank! You'll get kicked!");
- SendClientMessage (playerid, 0x006EFF, "There are the server's rules, please respect them!");
- return 1;
- }
- if (!strcmp("/1weapon",cmdtext,true,7))
- {
- if (GetPlayerMoney(playerid) - 2000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $2.000!");
- GivePlayerMoney (playerid, -2000);
- SendClientMessage (playerid, 0xFA73F8, "You bought a Deagle, AK47, Knife and MP5 for $2.000!");
- GivePlayerWeapon (playerid, 24, 100);
- GivePlayerWeapon (playerid, 30, 240);
- GivePlayerWeapon (playerid, 4, 1);
- GivePlayerWeapon (playerid, 29, 420);
- return 1;
- }
- if (!strcmp("/3weapon",cmdtext,true,7))
- {
- if (GetPlayerMoney(playerid) - 100000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $100.000!");
- GivePlayerMoney (playerid, -100000);
- SendClientMessage (playerid, 0xFA73F8, "You bought Minigun for $100.000!");
- GivePlayerWeapon (playerid, 38, 500);
- return 1;
- }
- if (!strcmp("/2weapon",cmdtext,true,7))
- {
- if (GetPlayerMoney(playerid) - 30000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $30.000!");
- GivePlayerMoney (playerid, -30000);
- SendClientMessage (playerid, 0xFA73F8, "You bought Combat Shotgun, Uzi, M4, Sniper Rifle si Satchel Charge pentru $30.000!");
- GivePlayerWeapon (playerid, 27, 124);
- GivePlayerWeapon (playerid, 28, 500);
- GivePlayerWeapon (playerid, 31, 1000);
- GivePlayerWeapon (playerid, 34, 80);
- GivePlayerWeapon (playerid, 39, 50);
- return 1;
- }
- if (!strcmp("/health",cmdtext,true,7))
- {
- if (GetPlayerMoney(playerid) - 1000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $1.000!");
- GivePlayerMoney (playerid, -1000);
- SendClientMessage (playerid, 0xFA73F8, "You bought full health for $1.000!");
- SetPlayerHealth (playerid, 100);
- return 1;
- }
- if (!strcmp("/armour",cmdtext,true,7))
- {
- if (GetPlayerMoney(playerid) - 1000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $1.000!");
- GivePlayerMoney (playerid, -1000);
- SendClientMessage (playerid, 0xFA73F8, "You bought full armour for $1.000!");
- SetPlayerArmour (playerid, 100);
- return 1;
- }
- if (!strcmp("/tips",cmdtext,true,7))
- {
- SendClientMessage (playerid, 0x45FF54, "|____________________________________Tips____________________________________|");
- SendClientMessage (playerid, 0x45FF54, "Tip: Do you want a lot of money? Then just kill all the players you see!");
- SendClientMessage (playerid, 0x45FF54, "Tip: Every time you kill someone you'll get wanted level 6!");
- SendClientMessage (playerid, 0x45FF54, "Tip: If you weren't know, the admins are the cops!");
- SendClientMessage (playerid, 0x45FF54, "Tip: Do you want to have a bigger chat? Use /pagesize!");
- return 1;
- }
- if (!strcmp("/4weapon",cmdtext,true,7))
- {
- if (GetPlayerMoney(playerid) - 90000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $90.000!");
- GivePlayerMoney (playerid, -90000);
- SendClientMessage (playerid, 0xFA73F8, "You bought Rocket Launcher and Sniper Rifle for $90.000!");
- GivePlayerWeapon (playerid, 35, 30);
- GivePlayerWeapon (playerid, 34, 50);
- return 1;
- }
- if (!strcmp("/jetpack",cmdtext,true,7))
- {
- if (GetPlayerMoney(playerid) - 50000 <0) return SendClientMessage(playerid,0xFFC800FF,"You don't have enough money! You need $50.000!");
- SendClientMessage (playerid, 0xFA73F8, "You bought a jetpack for $50.000!");
- GivePlayerMoney (playerid, -50000);
- SetPlayerSpecialAction (playerid,SPECIAL_ACTION_USEJETPACK);
- return 1;
- }
- if (!strcmp("/weather",cmdtext,true,7))
- {
- SendClientMessage (playerid, 0x45FCFF, "INFO: [/bluesky/stormy/sandstorm]");
- SendClientMessage (playerid, 0x45FCFF, "Example: /bluesky");
- return 1;
- }
- if (!strcmp("/bluesky",cmdtext,true,7))
- {
- SendClientMessage (playerid, COLOR_WHITE, "The weather has been changed - blue sky!");
- SetPlayerWeather (playerid, 0); //Please note that this will change only the player's weather!
- return 1;
- }
- if (!strcmp("/stormy",cmdtext,true,7))
- {
- SendClientMessage (playerid, COLOR_WHITE, "The weather has been changed - stormy!");
- SetPlayerWeather (playerid, 8); //Please note that this will change only the player's weather!
- return 1;
- }
- if (!strcmp("/sandstorm",cmdtext,true,7))
- {
- SendClientMessage (playerid, COLOR_WHITE, "The weather has been changed - sand storm!");
- SetPlayerWeather (playerid, 19); //Please note that this will change only the player's weather!
- return 1;
- }
- if (!strcmp("/surrender",cmdtext,true,7))
- {
- if (!IsPlayerAtPoliceStation(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not at the police station!");
- SendClientMessage (playerid, COLOR_RED, "JAIL: You went to the police station!");
- SendClientMessage (playerid, COLOR_RED, "JAIL: You got 2 minutes in jail!");
- SendClientMessage (playerid, COLOR_RED, "JAIL: The police took $10.000 from you as a bribe");
- GivePlayerMoney (playerid, -10000);
- SetPlayerWantedLevel (playerid, 0);
- SetPlayerInterior (playerid, 6);
- SetPlayerPos (playerid, 264.2000122,77.6999969,1000.5999756);
- TogglePlayerControllable (playerid, 0);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CUFFED);
- SetTimer("timer_out_of_jail",120000,false); //You can modify 120000 to any value you want, but keep in mind that 60000ms=60seconds=1minute
- return 1;
- }
- if (!strcmp("/teleports",cmdtext,true,7))
- {
- ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Teleports", "/gotospawn /gotopdls /gotolsair /gotolv /gotoairlv", "OK", "OK");
- return 1;
- }
- if (!strcmp("/gotospawn",cmdtext,true,7)) //gotospawn means the spawn place (where you spawn after a death)
- {
- SendClientMessage (playerid, COLOR_GREY, "You will be teleported in 6 seconds!");
- SetTimer("timer_teleport_spawn",6000,false);
- return 1;
- }
- if (!strcmp("/gotopdls",cmdtext,true,7))
- {
- SendClientMessage (playerid, COLOR_GREY, "You will be teleported in 6 seconds!");
- SetTimer("timer_teleport_pdls",6000,false);
- return 1;
- }
- if (!strcmp("/gotolsair",cmdtext,true,7))
- {
- SendClientMessage (playerid, COLOR_GREY, "You will be teleported in 6 seconds!");
- SetTimer("timer_teleport_lsair",6000,false);
- return 1;
- }
- if (!strcmp("/gotolv",cmdtext,true,7))
- {
- SendClientMessage (playerid, COLOR_GREY, "You will be teleported in 6 seconds!");
- SetTimer("timer_teleport_lv",6000,false);
- return 1;
- }
- if (!strcmp("/gotoairlv",cmdtext,true,7))
- {
- SendClientMessage (playerid, COLOR_GREY, "You will be teleported in 6 seconds!");
- SetTimer("timer_teleport_airlv",6000,false);
- return 1;
- }
- return 0;
- }
- 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)
- {
- TogglePlayerControllable (playerid, 1);
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- if(!success) //If the password was incorrect
- {
- printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
- new pip[16];
- for(new i=0; i<MAX_PLAYERS; i++) //Loop through all players
- {
- GetPlayerIp(i, pip, sizeof(pip));
- if(!strcmp(ip, pip, true)) //If a player's IP is the IP that failed the login
- {
- SendClientMessage(i, COLOR_WHITE, "The RCON password is incorrect! You got banned!"); //Send a message
- Ban(i); //They are now banned.
- }
- }
- }
- 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 == Register)
- {
- new nombrejugador[MAX_PLAYER_NAME], archivo[256];
- if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "Insert Your password here", "Acept", "Cancel");
- if (!response) return ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "Insert Your password here", "Acept", "Cancel");
- GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
- format(archivo, sizeof(archivo), "/Users/%s.ini", nombrejugador);
- dini_Create(archivo);
- dini_Set(archivo, "User", nombrejugador);
- dini_Set(archivo, "Password", inputtext);
- ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Insert Your password here", "Acept", "Cancel");
- }
- if (dialogid == Logged)
- {
- new nombrejugador[MAX_PLAYER_NAME], archivo[256], comprobante[256];
- if (!strlen(inputtext)) return ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Insert Your password here", "Acept", "Cancel");
- if (!response) return ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Insert Your password here", "Acept", "Cancel");
- GetPlayerName(playerid, nombrejugador, sizeof(nombrejugador));
- format(archivo, sizeof(archivo), "/Users/%s.ini", nombrejugador);
- format(comprobante, sizeof(comprobante), "%s", dini_Get(archivo, "Password"));
- if (!strcmp (inputtext, comprobante))
- {
- Login[playerid] = 1;
- }
- else
- {
- ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Insert Your password here", "Acept", "Cancel");
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- //Timers
- public timer_out_of_jail(playerid)
- {
- TogglePlayerControllable (playerid, 1);
- SetPlayerSpecialAction (playerid, SPECIAL_ACTION_NONE);
- SetPlayerVirtualWorld (playerid, 0);
- SetPlayerInterior (playerid, 0);
- SetPlayerPos (playerid, 1545.2037,-1675.7291,13.5599);
- SendClientMessage (playerid, COLOR_RED, "JAIL: Try to be a better citizen! You are free!");
- }
- public timer_teleport_spawn(playerid)
- {
- SendClientMessage (playerid, COLOR_GREY, "You have been teleported");
- SetPlayerInterior (playerid, 0);
- SetPlayerPos (playerid, 1310.1509,-1367.6149,13.5383);
- printf("ID %s has been teleported to Spawn Place",playerid);
- }
- public timer_teleport_pdls(playerid)
- {
- SendClientMessage (playerid, COLOR_GREY, "You have been teleported");
- SetPlayerInterior (playerid, 0);
- SetPlayerPos (playerid, 1545.2037,-1675.7291,13.5599);
- printf("ID %s has been teleported to Los Santos Police Department",playerid);
- }
- public timer_teleport_lsair(playerid)
- {
- SendClientMessage (playerid, COLOR_GREY, "You have been teleported");
- SetPlayerInterior (playerid, 0);
- SetPlayerPos (playerid, 1937.3033,-2339.5210,13.5469);
- printf("ID %s has been teleported to Los Santos Airport",playerid);
- }
- public timer_teleport_lv(playerid)
- {
- SendClientMessage (playerid, COLOR_GREY, "You have been teleported");
- SetPlayerInterior (playerid, 0);
- SetPlayerPos (playerid, 2029.8820,1007.4957,10.8203);
- printf("ID %s has been teleported to Las Venturas",playerid);
- }
- public timer_teleport_airlv(playerid)
- {
- SendClientMessage (playerid, COLOR_GREY, "You have been teleported");
- SetPlayerInterior (playerid, 0);
- SetPlayerPos (playerid, 1681.0872,1447.7493,10.7731);
- printf("ID %s has been teleported to Las Venturas Airport",playerid);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement