Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- TwD Freeroam
- Copyright © SoomroTayab
- This script is made by SoomroTayab (Goldilox) from scratch.
- Please obey the terms of use.
- TERMS OF USE:
- ø You should not remove this entire comment, it doens't costs you anything.
- ø You can relase this script and can also remove the command /credits as long as you keep this comment.
- ø You can edit it anyway you want.
- ø You shouldn't credit yourself of creating this script.
- ø You can remove my name from entire script such as the prints as long as you keep this comment.
- If you experience any bug or something, I can fix it for you. Just reply on the topic, PM me or even email me at me@soomrotayab.com.
- If you are releasing this script, you can also change the hostname if you like to.
- I am working on another relase of this, by updating some stuff.
- Thanks for downloading.
- */
- #include <a_samp>
- #include <dini>
- #include <zcmd>
- #include <dudb>
- #include <sscanf>
- #include <acuf>
- #include <streamer>
- enum pInfo
- {
- VIP,
- Mute,
- TimePast,
- Hours,
- Minutes,
- AdminLevel
- }
- #define LOGIN 1
- #define REGISTER 2
- #define TUNE 3
- #define COLORCHAT 4
- #define COLORCAR 5
- #define PBALL 6
- #define PBINFO 7
- #define PB_PLAYERS 8
- #define MAX_COMP 40
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_GREY 0xCCCCCCFF
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_SYSTEM 0x58ACFAAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_GREEN 0x01DF01AA
- #define COLOR_RED 0xFF0000AA
- #define COLOR_TEAL 0xA9C4E4FF
- #define COLOR_ORANGE 0xFF8000AA
- #define COLOR_LIME 0x10F441AA
- #define COLOR_MAGENTA 0xFF00FFFF
- #define COLOR_MAROON 0x800000AA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_AQUA 0xF0F8FFAA
- forward SetupPlayerForClassSelection(playerid);
- forward SaveIn(filename[],text[]);
- forward LoadingArea(playerid);
- new name[MAX_PLAYER_NAME];
- new OnlineTimer[MAX_PLAYERS];
- new IsLogged[MAX_PLAYERS];
- new PlayerInfo[MAX_PLAYERS][pInfo];
- new registered[MAX_PLAYERS];
- new God[MAX_PLAYERS] = 0;
- new paintball;
- new VGod[MAX_PLAYERS] = 0;
- //blackmarket gates
- new Gate1;
- new Gate2;
- new countVehicle[MAX_PLAYERS];
- new componentsid[MAX_PLAYERS][MAX_COMP];
- new PB[MAX_PLAYERS];
- new bool:flying[MAX_PLAYERS];
- new pblv;
- new Float:PBSpawn[][] =
- {
- {2532.9934,2834.7104,10.8203,183.8086}, // Randomspawn
- {2578.1511,2807.3320,10.8203,303.1663}, // Randomspawn
- {2651.2966,2763.5530,10.8203,1.1102}, // Randomspawn
- {2626.1477,2779.5415,23.8222,128.6146}, // Randomspawn
- {2565.8464,2718.0959,22.9507,308.7598}, // Randomspawn
- {2596.3523,2718.1089,25.8222,339.7568}
- };
- main()
- {
- print("\n----------------------------------");
- print(" TwD Freeroam Copyright © SoomroTayab\n Thanks for downlaoding!.\n Please obey the terms of use.");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- pblv = CreateDynamicCP(2014.2784,1104.2804,10.8203,1.0,-1,-1,-1,15.0);
- paintball = CreateDynamicPickup(1239,1,2015.5741,1106.1957,10.8203,-1);
- SetGameModeText("Freeroam/Drifting");
- //gate blackmarket
- Gate1 = CreateObject(975, 2237.5, -2218.6001, 14.2, 0, 0, 314);
- Gate2 = CreateObject(975, 2231.3999, -2212.5, 14.2, 0, 0, 315);
- if(!fexist("Records.txt"))return dini_Create("Records.txt");
- AddPlayerClass(1,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 1");
- AddPlayerClass(2,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 2");
- AddPlayerClass(3,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 3");
- AddPlayerClass(4,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 4");
- AddPlayerClass(5,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 5");
- AddPlayerClass(6,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 6");
- AddPlayerClass(7,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 7");
- AddPlayerClass(8,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 8");
- AddPlayerClass(9,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 9");
- AddPlayerClass(10,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 10");
- AddPlayerClass(11,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 11");
- AddPlayerClass(12,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 12");
- AddPlayerClass(13,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 13");
- AddPlayerClass(14,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 14");
- AddPlayerClass(15,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 15");
- AddPlayerClass(16,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 16");
- AddPlayerClass(17,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 17");
- AddPlayerClass(18,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 18");
- AddPlayerClass(19,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 19");
- AddPlayerClass(20,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 20");
- AddPlayerClass(21,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 21");
- AddPlayerClass(22,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("Skin ID 22");
- AddPlayerClass(23,1310.1309,-1370.0226,13.5700,180.4759,0,0,0,0,0,0); // spawning
- print("________________");
- print("Classes successfully loaded");
- return 1;
- }
- public OnGameModeExit()
- {
- SStats(MAX_PLAYERS);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1256.7449,-1439.0409,18.8538);
- SetPlayerFacingAngle(playerid,259.4132);
- SetPlayerCameraPos(playerid, 1259.5579,-1439.0704,19.8866);
- SetPlayerCameraLookAt(playerid, 1256.7449,-1439.0409,18.8538);
- return 1;
- }
- public SetupPlayerForClassSelection(playerid)
- {
- SetPlayerInterior(playerid,14);
- SetPlayerFacingAngle(playerid, 270.0);
- PlayerPlaySound(playerid, 1186, 0.0, 0.0, 5.0);
- SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
- SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
- SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
- }
- public OnPlayerConnect(playerid)
- {
- PB[playerid]=0;
- if(dini_Exists(Pos(playerid)))
- {
- new str1[128];
- format(str1, 500, "{FFFFFF}Welcome back to Fg!\n\nUsername: %s\nAccount Status: {ADFF2F}Registered\n{FFFFFF}Please punch in your password in order to play.",name);
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Membership Area", str1, "Login", "");
- }
- if (!dini_Exists(Pos(playerid)))
- {
- new str1[128];
- format(str1, 500, "{FFFFFF}Welcome to Fg!\n\nUsername: %s\nAccount Status: {FE9A2E}Unregistered\n{FFFFFF}Choose an account password for registration. \nYou have to remember your password for all of your play time.", name);
- ShowPlayerDialog(playerid, REGISTER, DIALOG_STYLE_PASSWORD, "Registration", str1, "Register", "");
- }
- SendClientMessage(playerid,COLOR_WHITE, "You need to login in order to play.");
- OnlineTimer[playerid] = SetTimerEx("OnlineTime", 60000, 1, "i", playerid);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- if(IsLogged[playerid] == 1)
- {
- SStats(playerid);
- }
- new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- switch(reason)
- {
- case 0: format(string, sizeof(string), "~ %s has left the server. (Timeout)", pname);
- case 1: format(string, sizeof(string), "*%s has left the server.", pname);
- case 2: return 0;
- }
- SendClientMessageToAll(COLOR_GREY,string);
- KillTimer(OnlineTimer[playerid]);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(PB[playerid] == 1)
- {
- new Random = random(sizeof(PBSpawn));
- SetPlayerInterior(playerid,0);
- GivePlayerWeapon(playerid, 29, 2500);
- SetPlayerPos(playerid, PBSpawn[Random][0], PBSpawn[Random][1], PBSpawn[Random][2]);
- return 1;
- }
- if(registered[playerid] == 1)
- {
- registered[playerid]=0;
- ResetPlayerWeapons(playerid);
- SetPlayerInterior(playerid,0);
- GivePlayerMoney(playerid, 25000);
- SetPlayerVirtualWorld(playerid,0);
- dini_IntSet(Pos(playerid), "Skin",GetPlayerSkin(playerid));
- }
- SetPlayerVirtualWorld(playerid, 0);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(PB[playerid]==1)
- {
- new str[128],nam[24];
- GetPlayerName(playerid, nam, 24);
- GetPlayerName(killerid, name, 24);
- format(str,sizeof(str),"%s has hunted %s down",name,nam);
- GivePlayerMoney(playerid,250);
- GameTextForPlayer(playerid,"~g~+$250", 3000, 1);
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(PB[playerid] == 1)
- {
- SendClientMessage(i,COLOR_ORANGE,str);
- }
- }
- return 1;
- }
- 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("/mycommand", cmdtext, true, 10) == 0)
- {
- // Do something here
- 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)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- 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 == PBALL)
- {
- if(!response) return 1;
- switch (listitem)
- {
- case 0:
- {
- new string[128];
- new Random = random(sizeof(PBSpawn));
- if(GetPlayerWantedLevel(playerid) >= 1)return SendClientMessage(playerid,COLOR_GREY,"You're a suspect!");
- SetPlayerPos(playerid, PBSpawn[Random][0], PBSpawn[Random][1], PBSpawn[Random][2]);
- SetPlayerFacingAngle(playerid, PBSpawn[Random][3]);
- SendClientMessage(playerid,COLOR_YELLOW,"Type /paintball again in order to stop paintballing.");
- GivePlayerWeapon(playerid, 29, 2500);
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has joined paintball.",name);
- PB[playerid]=1;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PB[i] == 1)
- {
- SendClientMessage(i,0x04B4AEAA,string);
- return 1;
- }
- }
- }
- case 1:
- {
- SendClientMessage(playerid,COLOR_WHITE,"Welcome to Las Ventures Paintball! This game is developed for the entertainment");
- SendClientMessage(playerid,COLOR_WHITE,"of the players around the server. You got one M4 Gun inside and it's taken away as");
- SendClientMessage(playerid,COLOR_WHITE,"soon as you exit the paintball The area completely closed and doesn't have any way");
- SendClientMessage(playerid,COLOR_WHITE,"out during the game, that is to prevent the DM \nYou spawn in the paintball field");
- SendClientMessage(playerid,COLOR_WHITE,"randomly to prevent spawn kill Paintball don't restrict you from deathmatch but we");
- SendClientMessage(playerid,COLOR_WHITE,"appreciate you don't become violent on events occur in the paintball");
- SendClientMessage(playerid,COLOR_WHITE,"Have a nice time!");
- return 1;
- }
- case 3:
- {
- new count = 0;
- new string[128];
- new name1[MAX_PLAYER_NAME];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PB[i] == 1)
- {
- GetPlayerName(i,name1,MAX_PLAYER_NAME);
- }
- }
- format(string,sizeof(string), "%s", name1);
- ShowPlayerDialog(playerid,PB_PLAYERS,DIALOG_STYLE_MSGBOX,"Current Players",string,"Close","");
- count++;
- }
- }
- }
- if(dialogid == COLORCHAT)
- {
- if(!response) return 1;
- switch(listitem)
- {
- case 0:
- {
- SetPlayerColor(playerid,COLOR_BLUE);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to blue.");
- return 1;
- }
- case 1:
- {
- SetPlayerColor(playerid,0xF5A9A9FF);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to pink.");
- return 1;
- }
- case 2:
- {
- SetPlayerColor(playerid,COLOR_RED);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to red.");
- return 1;
- }
- case 3:
- {
- SetPlayerColor(playerid,COLOR_YELLOW);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to yellow.");
- return 1;
- }
- case 4:
- {
- SetPlayerColor(playerid,COLOR_ORANGE);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to orange.");
- return 1;
- }
- case 5:
- {
- SetPlayerColor(playerid,COLOR_AQUA);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to aqua.");
- return 1;
- }
- case 6:
- {
- SetPlayerColor(playerid,COLOR_LIME);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to lime.");
- return 1;
- }
- case 7:
- {
- SetPlayerColor(playerid,COLOR_MAROON);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to maroon.");
- return 1;
- }
- case 8:
- {
- SetPlayerColor(playerid,COLOR_MAGENTA);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to magenta.");
- return 1;
- }
- case 9:
- {
- SetPlayerColor(playerid,COLOR_TEAL);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to teal.");
- return 1;
- }
- case 10:
- {
- SetPlayerColor(playerid,COLOR_WHITE);
- SendClientMessage(playerid,COLOR_WHITE,"You've set your color to white.");
- return 1;
- }
- }
- }
- if(dialogid == COLORCAR)
- {
- if(!response) return 1;
- switch(listitem)
- {
- case 0:
- {
- new veh;
- veh = GetPlayerVehicleID(playerid);
- ChangeVehicleColor(veh,0,0);
- SendClientMessage(playerid,COLOR_WHITE,"You've set the car's color to black.");
- return 1;
- }
- case 1:
- {
- new veh;
- veh = GetPlayerVehicleID(playerid);
- ChangeVehicleColor(veh,1,1);
- SendClientMessage(playerid,COLOR_WHITE,"You've set the car's color to white.");
- return 1;
- }
- }
- }
- if(dialogid == TUNE)
- if(response)
- {
- for(new i=0;i<=countVehicle[playerid];i++)
- {
- if(listitem == i)
- {
- if(IsVehicleUpgradeCompatible(GetVehicleModel(GetPlayerVehicleID(playerid)),componentsid[playerid][i]))
- {
- AddVehicleComponent(GetPlayerVehicleID(playerid), componentsid[playerid][i]);
- new string[128];
- format(string, sizeof(string),"New component %s added!", GetComponentName(componentsid[playerid][i]));
- SendClientMessage(playerid,COLOR_WHITE,string);
- return cmd_tune(playerid, " ");
- }
- else SendClientMessage(playerid,COLOR_GREY, "This component is not compitable with your vehicle model.");
- }
- }
- }
- if (dialogid == REGISTER)
- {
- new string[128], str[128], str1[128];
- GetPlayerName(playerid, name, sizeof(name));
- if(!response) return Kick(playerid);
- format(str1, 128, "{FFFFFF}Welcome to Fg Clan\n\n{DDCA22}Account:{FFFFFF} %s\n\nPlease Enter Your Password Below", name);if(!strlen(inputtext)) return
- ShowPlayerDialog(playerid, REGISTER, DIALOG_STYLE_INPUT, "Registration", str1, "Register", "");
- dini_Create(Pos(playerid));
- IsLogged[playerid] = 1;
- registered[playerid] = 1;
- PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
- dini_IntSet(Pos(playerid), "Password", udb_hash(inputtext));
- dini_IntSet(Pos(playerid), "Banned", 0);
- dini_IntSet(Pos(playerid), "AdminLevel",PlayerInfo[playerid][AdminLevel] = 0);
- format(string, 128, "Your registration was successfull! Username: %s || Password: %s.", name, inputtext);
- format(str, 128, "Looks like you are new here.");
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SendClientMessage(playerid,COLOR_WHITE, str);
- SendClientMessage(playerid,COLOR_WHITE, "This is a Freeroam/Role-Play server.");
- SendClientMessage(playerid,COLOR_WHITE, "You can do whatever you want in the server as");
- SendClientMessage(playerid, COLOR_WHITE, "long as you are within the server rules.");
- SendClientMessage(playerid, COLOR_WHITE, "For the server rules, type /rules.");
- return 1;
- }
- if (dialogid == LOGIN)
- {
- new str1[128], tmp=dini_Int(Pos(playerid), "Password");
- if(!response) return Kick(playerid);
- GetPlayerName(playerid, name, sizeof(name));
- format(str1, 128, "{FFFFFF}Welcome to Fg Clan\n\n{DDCA22}Account:{FFFFFF} %s\n\nPlease Enter Your Password Below", name);
- if (!strlen(inputtext)) return ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Login Account",str1, "Login", "");
- if(udb_hash(inputtext) == tmp)
- {
- LoadStats(playerid);
- IsLogged[playerid] = 1;
- PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
- GetPlayerName(playerid, name, sizeof(name));
- format(str1, 128, "Welcome back %s! your statistics have been successfully restored.", name);
- SendClientMessage(playerid,COLOR_WHITE,str1);
- SetSpawnInfo(playerid,0,dini_Int(Pos(playerid),"Skin"),dini_Int(Pos(playerid), "X1"),dini_Int(Pos(playerid), "Y1"), dini_Int(Pos(playerid), "Z1"),0, 0, 0, 0, 0, 0, 0 );
- SpawnPlayer(playerid);
- PlayerConnect(playerid);
- if(PlayerInfo[playerid][VIP]== 1 || PlayerInfo[playerid][VIP]== 2)
- {
- SendClientMessage(playerid,0x086A87AA,"VIP Stauts: {FFFFFF}Active");
- }
- if(PlayerInfo[playerid][VIP]==3)
- {
- SendClientMessage(playerid,0x086A87AA,"VIP Status: {FFFFFF}Active - Lifetime");
- }
- }
- else
- {
- SendClientMessage(playerid,-1, "Login failed.");
- ShowPlayerDialog(playerid, LOGIN, DIALOG_STYLE_PASSWORD, "Membership Area", "{FFFFFF}Your entered password was incorrect\n\nPlease try again.", "Login", "");
- }
- return 1;
- }
- return 1;
- }
- public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
- {
- if(PlayerInfo[playerid][AdminLevel] >= 4)
- {
- SetPlayerPosFindZ(playerid, fX, fY, fZ);
- return 1;
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- stock Pos(playerid)
- {
- new x[128]; format(x, sizeof(x), "Accounts/%s.ini",GetPlayerName(playerid,name,sizeof(name)));
- return x;
- }
- SStats(playerid)
- {
- new Float:x,Float:y,Float:z,Float:armour;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerArmour(playerid, armour);
- dini_IntSet(Pos(playerid),"Armor", floatround(armour));
- dini_IntSet(Pos(playerid),"VIP",PlayerInfo[playerid][VIP]);
- dini_IntSet(Pos(playerid),"Money",GetPlayerMoney(playerid));
- dini_IntSet(Pos(playerid),"Score",GetPlayerScore(playerid));
- dini_IntSet(Pos(playerid),"TimePast",PlayerInfo[playerid][TimePast]);
- dini_IntSet(Pos(playerid),"Interior", GetPlayerInterior(playerid));
- dini_IntSet(Pos(playerid),"HoursPlayed",PlayerInfo[playerid][Hours]);
- dini_IntSet(Pos(playerid),"MinutesPlayed",PlayerInfo[playerid][Minutes]);
- dini_IntSet(Pos(playerid),"AdminLevel",PlayerInfo[playerid][AdminLevel]);
- return 1;
- }
- LoadStats(playerid)
- {
- SetPlayerArmour(playerid,dini_Int(Pos(playerid),"Armor"));
- SetPlayerScore(playerid, dini_Int(Pos(playerid),"Score"));
- PlayerInfo[playerid][VIP] = dini_Int(Pos(playerid),"VIP");
- PlayerInfo[playerid][TimePast] = dini_Int(Pos(playerid),"TimePast");
- PlayerInfo[playerid][Hours]=dini_Int(Pos(playerid),"HoursPlayed");
- PlayerInfo[playerid][AdminLevel] = dini_Int(Pos(playerid),"AdminLevel");
- PlayerInfo[playerid][Minutes] = dini_Int(Pos(playerid),"MinutesPlayed");
- }
- stock PlayerConnect(playerid)
- {
- new tmp3[50],PlayerName[MAX_PLAYER_NAME],string[128];
- GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
- GetPlayerIp(playerid,tmp3,50);
- if(strlen(dini_Get("Records.txt", tmp3)) == 0)
- dini_Set("Records.txt", tmp3, PlayerName);
- else
- {
- if( strfind( dini_Get("Records.txt", tmp3), PlayerName, true) == -1 )
- {
- format(string,sizeof(string),"%s,%s", dini_Get("Records.txt",tmp3), PlayerName);
- dini_Set("Records.txt", tmp3, string);
- }
- }
- return 1;
- }
- CMD:report(playerid, params[])
- {
- new str[50];
- if(sscanf(params, "s[50]", str)== 0) return SendClientMessage(playerid, COLOR_WHITE, "/report [text]");
- SendClientMessage(playerid, COLOR_YELLOW, "Your report has been sent to any online admins.");
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][AdminLevel]>= 1 || IsPlayerAdmin(i))
- {
- format(str, sizeof(str), "%s has reported, \"%s\"", GetPName(playerid), params);
- SendClientMessage(i, COLOR_SYSTEM, str);
- }
- }
- return 1;
- }
- CMD:godmode(playerid, params[])
- {
- if (God[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_RED, "You have disabled god mode.");
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- God[playerid] = 0;
- return 1;
- }
- else if(God[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN, "You have enabled god mode.");
- God[playerid] = 1;
- SetPlayerArmour(playerid, 9999999);
- SetPlayerHealth(playerid, 9999999);
- return 1;
- }
- return 1;
- }
- CMD:vgod(playerid, params[])
- {
- if(VGod[playerid] == 1)
- {
- VGod[playerid] = 0;
- SendClientMessage(playerid,COLOR_RED,"Vehicle god disabled.");
- return 1;
- }
- else if(VGod[playerid] == 0)
- {
- VGod[playerid] = 1;
- SendClientMessage(playerid,COLOR_GREEN,"Vehicle god enabled.");
- return 1;
- }
- return 1;
- }
- CMD:compound(playerid, params[])
- {
- SetPlayerPos(playerid,2178.9536,-2255.7134,14.7734);
- return 1;
- }
- CMD:acmds(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=1)
- {
- SendClientMessage(playerid, COLOR_WHITE, "/repair /freeze /unfreeze");
- }
- if(PlayerInfo[playerid][AdminLevel] >=2)
- {
- SendClientMessage(playerid, COLOR_WHITE, "/mute /unmute /goto /gethere /vrespawn /veh /kick");
- }
- if(PlayerInfo[playerid][AdminLevel] >=3)
- {
- SendClientMessage(playerid, COLOR_WHITE, "/ban /apm /disarm /akill");
- }
- if(PlayerInfo[playerid][AdminLevel] >=4)
- {
- SendClientMessage(playerid, COLOR_WHITE, "/sethp /restart /setscore /setarmour /givewep /setallskin /setskin");
- }
- if(PlayerInfo[playerid][AdminLevel] >=5)
- {
- SendClientMessage(playerid, COLOR_WHITE, "/setlevel /fly");
- }
- else
- {
- SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command.");
- }
- return 1;
- }
- CMD:setskin(playerid,params[])
- {
- if(PlayerInfo[playerid][AdminLevel] < 3) return 0;
- new SetterName[MAX_PLAYER_NAME],skin, SettedName[MAX_PLAYER_NAME], string[128], string2[128],pID;
- if(sscanf(params, "ud",pID,skin)) return SendClientMessage(playerid,COLOR_GREY,"/setskin [playerid] [skin id]");
- if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,COLOR_GREY,"Player is not connected.");
- if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_GREY,"Invalid ID");
- GetPlayerName(playerid, SetterName, sizeof(SetterName));
- GetPlayerName(pID, SettedName, sizeof(SettedName));
- format(string, sizeof(string), "You've set %s's skin to ID %d", SettedName, skin);
- format(string2, sizeof(string2), "An administrator has changed your skin.", skin);
- SendClientMessage(playerid, COLOR_WHITE, string);
- SendClientMessage(pID, COLOR_SYSTEM, string2);
- SetPlayerSkin(pID, skin);
- return 1;
- }
- CMD:setallskin(playerid,params[])
- {
- if(PlayerInfo[playerid][AdminLevel] < 3) return 0;
- new skin, string[128];
- if(sscanf(params, "d",skin)) return SendClientMessage(playerid,COLOR_GREY,"/skinall [skin id]");
- if(skin < 0 || skin > 299) return SendClientMessage(playerid,COLOR_GREY,"Invalid skin ID");
- format(string, sizeof(string), "You've set everyone's skin to ID %d", skin);
- SendClientMessage(playerid, COLOR_WHITE, string);
- for(new i = 0; i <MAX_PLAYERS; i++)
- {
- new string1[128];
- SetPlayerSkin(i, skin);
- format(string1,sizeof(string1),"An administrator has set everyone's skin ID to %d",skin);
- SendClientMessage(i,COLOR_SYSTEM,string1);
- }
- return 1;
- }
- CMD:givewep(playerid,params[])
- {
- if(PlayerInfo[playerid][AdminLevel] < 3) return 0;
- new pID,wepid,ammo,string[128],nameadmin[MAX_PLAYER_NAME];
- if(sscanf(params,"udd",pID,wepid,ammo)) return SendClientMessage(playerid,COLOR_GREY,"/givewep [playerid] [wepid] [ammo]");
- if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,COLOR_GREY,"Player is not connected.");
- if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_GREY,"Invalid player ID");
- if(wepid < 0 || wepid > 46) return SendClientMessage(playerid,COLOR_GREY," Invalid weapon ID");
- GetPlayerName(pID,name,sizeof(name));
- GetPlayerName(playerid,nameadmin,sizeof(nameadmin));
- format(string,sizeof(string),"An administrator has given you a weapon of ID %d",wepid);
- SendClientMessage(pID,COLOR_WHITE,string);
- GivePlayerWeapon(pID,wepid,ammo);
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][AdminLevel] > 1)
- {
- format(string,sizeof(string),"%s has give %s a weapon of ID %d with ammo of %d",nameadmin,name,wepid,ammo);
- SendClientMessage(i,COLOR_WHITE,string);
- }
- }
- return 1;
- }
- CMD:setarmour(playerid,params[])
- {
- if(PlayerInfo[playerid][AdminLevel] < 3) return 0;
- new Float:Armour, SetterName[MAX_PLAYER_NAME], SettedName[MAX_PLAYER_NAME], string[128], string2[128],pID;
- if(sscanf(params, "uf",pID,Armour)) return SendClientMessage(playerid,COLOR_GREY,"/setarmour [playerid] [ammount]");
- GetPlayerName(playerid, SetterName, sizeof(SetterName));
- GetPlayerName(pID, SettedName, sizeof(SettedName));
- format(string, sizeof(string), "You have set %s's armour to %f", SettedName, Armour);
- format(string2, sizeof(string2), "An administrator has set your armour to %f", Armour);
- SendClientMessage(playerid, COLOR_WHITE, string);
- SendClientMessage(pID, COLOR_SYSTEM, string2);
- SetPlayerArmour(pID, Armour);
- return 1;
- }
- CMD:setscore(playerid,params[])
- {
- if(PlayerInfo[playerid][AdminLevel] < 3) return 0;
- new SetterName[MAX_PLAYER_NAME], SettedName[MAX_PLAYER_NAME], string[128], string2[128], score,pID;
- if(sscanf(params, "ud",pID,score)) return SendClientMessage(playerid,COLOR_GREY,"/setscore [playerid] [score]");
- GetPlayerName(playerid, SetterName, sizeof(SetterName));
- GetPlayerName(pID, SettedName, sizeof(SettedName));
- format(string, sizeof(string), "You have set %s's score to %d", SettedName, score);
- format(string2, sizeof(string2), "Your score was set to %d by an Admin.", score);
- SendClientMessage(playerid, COLOR_SYSTEM, string);
- SendClientMessage(pID, COLOR_SYSTEM, string2);
- SetPlayerScore(pID, score);
- return 1;
- }
- //LEVEL 1
- CMD:fly(playerid,params[])
- {
- new Float:x, Float:y, Float:z;
- if(PlayerInfo[playerid][AdminLevel] > 4)
- {
- if((flying[playerid] = !flying[playerid]))
- {
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(playerid, x, y, z+5);
- SetPlayerArmour(playerid, 1000000000.0);
- SetPlayerHealth(playerid, 1000000000.0);
- SetTimerEx("AdminFly", 100, 0, "d", playerid);
- }
- else
- {
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(playerid, x, y, z+0.5);
- ClearAnimations(playerid);
- SetPlayerArmour(playerid, 100.0);
- SetPlayerHealth(playerid, 100.0);
- return 1;
- }
- }
- else return 0;
- return 1;
- }
- CMD:vrespawn(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=2)
- {
- new bool:unwanted[MAX_VEHICLES];
- for(new player=0; player<MAX_PLAYERS; player++)
- {
- if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
- }
- for(new i = 1; i <MAX_VEHICLES; i++)
- {
- if(!unwanted[i]) SetVehicleToRespawn(i);
- }
- SendClientMessage(playerid, COLOR_TEAL, "All currently unused vehicles have been respawned.");
- }
- else return 0;
- return 1;
- }
- CMD:goto(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=2)
- {
- new ID;
- new pn[MAX_PLAYER_NAME];
- new an[MAX_PLAYER_NAME];
- new str[128];
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /goto [ID]"); //This is a long line, "sscanf" is the plugin that search the missing params, "params" is the param that define params LOL, "u" is the PARAM that define the MISSING ID, ID is the param for the targetid
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This player is not connected");//Same as !IsPlayerAdmin, but instead of "playerid" we put "ID" because it's the targetid
- GetPlayerName(playerid, an, MAX_PLAYER_NAME);//Define the playerid's param
- GetPlayerName(ID, pn, MAX_PLAYER_NAME);//Define the ID's param
- new Float:x; //Defining float X
- new Float:y; //Same
- new Float:z; //Same
- GetPlayerPos(ID, x, y, z); //This line get the "ID" position
- SetPlayerPos(playerid, x+1, y+1, z); //This line set the "playerid" position from "ID" position, with some changes(x+1, y+1);
- format(str, sizeof(str), "You have been teleported to %s", pn); //Showed before, this is the line that give the message to playerid)
- SendClientMessage(playerid, 0x00FF00AA, str); //This line give the message to playerid
- if(IsPlayerInAnyVehicle(playerid)) //Mhh, let's give you a question, what should this callback do?
- {
- GetPlayerPos(ID, x, y, z);
- SetVehiclePos(playerid, x+1, y+1, z); //And this one? :D
- }
- else return 0;
- }
- return 1;
- }
- CMD:gethere(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=2) {
- new Float:x, Float:y, Float:z, Float:a, giveplayerid;
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /gethere [playerid]");
- if(!IsPlayerConnected(giveplayerid)) return 1;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, a);
- SetPlayerPos(giveplayerid, x-1, y-1, z);
- SetPlayerFacingAngle(giveplayerid, a);
- }
- return 1;
- }
- CMD:apm(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=3) {
- new str1[128],str[128], giveplayerid;
- if(sscanf(params, "us[50]", giveplayerid, str)== 0) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /apm [playerid] [text]");
- if(!IsPlayerConnected(giveplayerid)) return 1;
- format(str1, sizeof(str1), "PM from Administration: %s", params[2]);
- format(str, sizeof(str), "(ADMININFO) {FFFF00}Your admin PM was sent to %i", strval(params));
- SendClientMessage(giveplayerid, COLOR_SYSTEM, str1);
- SendClientMessage(playerid, COLOR_WHITE, str);
- }
- return 1;
- }
- CMD:repair(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=1) {
- if(IsPlayerInAnyVehicle(playerid)) {
- SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, COLOR_YELLOW, "You have repaired your vehicle.");
- }
- }
- return 1;
- }
- CMD:freeze(playerid, params[])
- {
- new giveplayerid, str[128];
- if(PlayerInfo[playerid][AdminLevel] >=1) {
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /freeze [playerid]");
- if(!IsPlayerConnected(giveplayerid)) return 1;
- format(str, 128, "You have frozen %s.", GetPName(giveplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "You have been frozen by an administrator.");
- TogglePlayerControllable(giveplayerid, 0);
- }
- return 1;
- }
- CMD:unfreeze(playerid, params[])
- {
- new giveplayerid, str[128];
- if(PlayerInfo[playerid][AdminLevel] >=1) {
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /unfreeze [playerid]");
- if(!IsPlayerConnected(giveplayerid)) return 1;
- format(str, 128, "You have unfrozen %s.", GetPName(giveplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "You have been unfrozen by an administrator.");
- TogglePlayerControllable(giveplayerid, 1);
- }
- return 1;
- }
- CMD:mute(playerid, params[])
- {
- new giveplayerid, str[128];
- if(PlayerInfo[playerid][AdminLevel] >=2) {
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mute [playerid]");
- if(!IsPlayerConnected(giveplayerid)) return 1;
- if(PlayerInfo[giveplayerid][Mute] == 0) {
- PlayerInfo[giveplayerid][Mute] = 1;
- format(str, 128, "You have muted %s.", GetPName(giveplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "You have been muted by an administrator.");
- }else {
- SendClientMessage(playerid, COLOR_RED, "Player is already muted!");
- }
- }
- return 1;
- }
- CMD:unmute(playerid, params[])
- {
- new giveplayerid, str[128];
- if(PlayerInfo[playerid][AdminLevel] >=2) {
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /unmute [playerid]");
- if(!IsPlayerConnected(giveplayerid)) return 1;
- if(PlayerInfo[giveplayerid][Mute] == 1) {
- PlayerInfo[giveplayerid][Mute] = 0;
- format(str, 128, "You have unmuted %s.", GetPName(giveplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "You have been unmuted by an administrator.");
- }else {
- SendClientMessage(playerid, COLOR_RED, "Player is not muted!");
- }
- }
- return 1;
- }
- CMD:a(playerid, params[])
- {
- new str[50];
- if(PlayerInfo[playerid][AdminLevel] >=1) {
- if(sscanf(params, "s[50]", str)== 0) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /a [announcement]");
- SendClientMessageToAll(COLOR_RED, params);
- }
- return 1;
- }
- CMD:disarm(playerid, params[])
- {
- new giveplayerid, str[128];
- if(PlayerInfo[playerid][AdminLevel] >=3) {
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /disarm [playerid]");
- if(!IsPlayerConnected(giveplayerid)) return 1;
- format(str, 128, "You have disarmed %s.", GetPName(giveplayerid));
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "Your weapons have been reset by an administrator.");
- ResetPlayerWeapons(giveplayerid);
- }
- return 1;
- }
- CMD:veh(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=2) {
- new car;
- if(IsPlayerInAnyVehicle(playerid)) return 1;
- if(sscanf(params, "i", car)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /veh [vehid]");
- if(strval(params) >611 || strval(params) <400) return SendClientMessage(playerid, COLOR_RED, "Invalid model id!");
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- car = CreateVehicle(strval(params), x, y, z,a, -1, -1, 60);
- PutPlayerInVehicle(playerid, car, 0);
- SetPVarInt(playerid, "AdminVeh", car);
- }
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- new playerb, string1[128];
- if(PlayerInfo[playerid][AdminLevel] < 1) return 0;
- if(sscanf(params, "us[128]", playerb, params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [playerid] [reason]");
- if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
- if(PlayerInfo[playerid][AdminLevel] < PlayerInfo[playerb][AdminLevel]) return SendClientMessage(playerid, COLOR_GREY, "Player has a higher admin level than you.");
- KickWithMessage(playerb);
- format(string1,sizeof(string1),"You have been kicked from this server, reason ~ %s",params);
- SendClientMessage(playerb,COLOR_GREY,string1);
- return 1;
- }
- CMD:givemoney(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=3) {
- new giveplayerid, money;
- if(sscanf(params, "ui", giveplayerid, money)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givemoney [playerid] [amount]");
- if(!IsPlayerConnected(giveplayerid)) return 1;
- GivePlayerMoney(playerid, money);
- }
- return 1;
- }
- CMD:akill(playerid, params[])
- {
- new giveplayerid, str[128];
- if(PlayerInfo[playerid][AdminLevel] >=3) {
- if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /akill [playerid]");
- if(!IsPlayerConnected(giveplayerid)) return 1;
- SetPlayerHealth(giveplayerid, 0);
- format(str, 128, "You have admin-killed %s.", GetPName(giveplayerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
- SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, "You have been killed by an administrator.");
- }
- return 1;
- }
- CMD:checkhp(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=3)
- {
- new id, Float:hp, string[256];
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "Syntax: /checkhp [playeri/partofname]");
- else
- {
- GetPlayerHealth(id, hp);
- format(string, sizeof(string), "Player has %.d hp.", hp);
- SendClientMessage(playerid, -1, string);
- }
- }
- return 1;
- }
- CMD:ban(playerid,params[])
- {
- if(PlayerInfo[playerid][AdminLevel] < 2) return 0;
- new BannerName[MAX_PLAYER_NAME], BannedName[MAX_PLAYER_NAME], string[256], reason[24],pID;
- if(sscanf(params,"us", pID,reason)) return SendClientMessage(playerid,COLOR_GREY,"/ban [playerid] [reason]");
- GetPlayerName(playerid,BannerName,sizeof(BannerName));
- GetPlayerName(pID,BannedName,sizeof(BannedName));
- for (new a=0;a<MAX_PLAYERS;a++)
- {
- if (IsPlayerConnected(a))
- {
- if(PlayerInfo[a][AdminLevel]>=1)
- {
- format(string,sizeof(string),"%s has banned %s - %s",BannerName, BannedName, reason);
- SendClientMessage(a,COLOR_WHITE,string);
- }
- }
- }
- format(string, sizeof(string), "%s has been banned from the server for %s by %s", BannedName, reason,BannerName);
- SaveIn("Logs",string);
- TogglePlayerControllable(pID, false);
- dini_IntSet(Pos(pID), "Banned", 1);
- dini_Set(Pos(pID), "Reason", reason);
- dini_Set(Pos(pID), "Banner", BannerName);
- GetPlayerIp(playerid, string, sizeof(string));
- dini_Set(Pos(pID),"IP",string);
- SetCameraBehindPlayer(pID);
- BanWithMessage(pID);
- GetPlayerName(playerid, BannerName, sizeof(BannerName));
- GetPlayerName(pID, BannedName, sizeof(BannedName));
- format(string, sizeof(string), "%s has been banned from the server - %s", BannedName, reason);
- SendClientMessageToAll(COLOR_RED, string);
- return 1;
- }
- CMD:sethp(playerid, params[])
- {
- new user, health;
- if(!sscanf(params, "ui", user, health))
- {
- if(user != INVALID_PLAYER_ID)
- {
- SetPlayerHealth(user, health);
- }
- else return SendClientMessage(playerid, COLOR_RED, "Invalid Player ID.");
- }
- else return SendClientMessage(playerid, COLOR_WHITE, "/sethealth [playerid] [health]");
- return 1;
- }
- CMD:restart(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=4) {
- SendRconCommand("gmx");
- }
- return 1;
- }
- CMD:setweather(playerid, params[])
- {
- if(PlayerInfo[playerid][AdminLevel] >=4)
- {
- new id,string[128];
- if(sscanf(params,"d",id)) return SendClientMessage(playerid, COLOR_GREY, "/setweather [weatherid]");
- if(id < 0 || id > 22) return SendClientMessage(playerid,COLOR_GREY,"Weather IDs [0 - 22]");
- GetPlayerName(playerid,name,24);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- PlayerPlaySound(i,1057,0.0,0.0,0.0);
- SetPlayerWeather(i, id);
- }
- }
- new wname[128];
- if(id == 8)
- {
- wname = "Stormy";
- }
- else if(id == 9)
- {
- wname = "Foggy";
- }
- else if(id == 11 || id == 17 || id == 18)
- {
- wname = "Scorching Hot";
- }
- else if(id == 16)
- {
- wname = "Cloudy/Rainly";
- }
- else if(id == 19)
- {
- wname = "Sand Storm";
- }
- else if(id == 20)
- {
- wname = "Green Fog";
- }
- else if(id == 12 || id == 13 || id == 14 || id == 15)
- {
- wname = "Hazzy";
- }
- else if(id == 27 || id == 28 || id == 29)
- {
- wname = "Fresh Sky";
- }
- else if(id == -66)
- {
- wname = "Spazzy";
- }
- else if(id == 0 || id == 1 || id == 2 || id == 3 || id == 4 || id == 5 || id == 6 || id == 7 || id == 10)
- {
- wname = "Bright/Cloudy";
- }
- else if(id == 21 || id == 22)
- {
- wname = "Dark";
- }
- format(string,sizeof(string),"An administrator has changed the weather to %s",wname);
- return SendClientMessageToAll(0x00FF80AA, string);
- }
- else return 0;
- }
- CMD:setlevel(playerid, params[])
- {
- new levels,Nam[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME],str[500],ID,mode[128];
- if(PlayerInfo[playerid][AdminLevel] == 5 || IsPlayerAdmin(playerid))
- {
- if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,COLOR_GREY, "/setlevel [playerid] [level 1 - 5]");
- if(levels > 5) return SendClientMessage(playerid,COLOR_GREY,"LEVELS AVAILABLE 1-5!");
- if(!IsPlayerConnected(ID))return SendClientMessage(playerid,COLOR_GREY,"User is not connected.");
- if(PlayerInfo[ID][AdminLevel] == levels) return SendClientMessage(playerid,COLOR_GREY, "Player already has that level.");
- GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);
- GetPlayerName(ID,pname,MAX_PLAYER_NAME);
- if(levels==1)
- {mode = "{FF6600}Server Moderator";}
- if(levels==2)
- {mode = "{0000AA}Global Moderator";}
- if(levels==3)
- {mode = "{DB0000}Admin{FFFFFF}";}
- if(levels==4)
- {mode = "{008000}Leading Admin";}
- if(levels==5)
- {mode = "{008000}Founder";}
- if(levels==6)
- {mode = "{008000}Scripter";}
- if(levels < PlayerInfo[ID][AdminLevel])
- {
- format(str, sizeof(str),"You have been {F0101}Demoted{FFFFFF} to %s {FFFFFF} by Server.",mode);
- GameTextForPlayer(ID,"~r~Demotion", 2000, 0);
- SendClientMessage(ID,COLOR_WHITE,str);
- format(str, sizeof(str),"Level set [%s to %s{FFFFFF}]",pname,mode);
- SendClientMessage(playerid,COLOR_WHITE,str);
- PlayerInfo[ID][AdminLevel] = levels;
- return 1;
- }
- else
- {
- format(str, sizeof(str),"You have been {04B404}Promoted{FFFFFF} to %s by Server.",mode);
- SendClientMessage(ID,COLOR_WHITE,str);
- GameTextForPlayer(ID,"~g~Promotion", 2000, 0);
- format(str, sizeof(str),"Level set [%s to %s{FFFFFF}]",pname,mode);
- SendClientMessage(playerid,COLOR_WHITE,str);
- PlayerInfo[ID][AdminLevel] = levels;
- }
- }else return 0;
- return 1;
- }
- CMD:fr(playerid, params[])
- {
- new Float:x, Float:y, Float:z;
- PlayerPlaySound(playerid, 1133, x, y, z);
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle!");
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, COLOR_WHITE, "Your vehicle has been successfully repaired!");
- return 1;
- }
- CMD:help(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_TEAL, "To view the existing server commands, type /cmds");
- return 1;
- }
- CMD:url(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_TEAL, "ST Official Web URL");
- SendClientMessage(playerid, COLOR_YELLOW, "http://www.soomrotayab.com");
- return 1;
- }
- CMD:open(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 15.0, 2237.5, -2218.6001, 14.2))
- {
- MoveObject(Gate1,2242.69995, -2223.80005, 14.2,1);
- MoveObject(Gate2,2226.1001, -2207.6001, 14.2,1);
- SendClientMessage(playerid, COLOR_GREEN, "Gate has been opened");
- return 1;
- }
- return 1;
- }
- CMD:close(playerid, params[])
- {
- new Closed =MoveObject(Gate1,2237.5, -2218.6001, 14.2,1);
- new Closed1 =MoveObject(Gate2,2231.3999, -2212.5, 14.2,1);
- if(IsPlayerInRangeOfPoint(playerid, 15.0, 2237.5, -2218.6001, 14.2))
- if (Closed == 1)
- if (Closed1 == 1)
- {
- MoveObject(Gate1,2237.5, -2218.6001, 14.2,1);
- MoveObject(Gate2,2231.3999, -2212.5, 14.2,1);
- SendClientMessage(playerid, COLOR_GREEN, "Gate has been closed");
- return 1;
- }
- else {
- SendClientMessage(playerid, COLOR_TEAL, "Gate already closed.");
- return 1;
- }
- return 1;
- }
- CMD:rules(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_TEAL, "TwD Server Rules");
- SendClientMessage(playerid, COLOR_YELLOW, "Goto the website of TwD to view the list of rules.");
- SendClientMessage(playerid, COLOR_YELLOW, "Server Website http://www.soomrotayab.com");
- SendClientMessage(playerid, COLOR_WHITE, "_________________________");
- return 1;
- }
- CMD:cmds(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "TwD Official Command List");
- SendClientMessage(playerid, COLOR_WHITE, "/help - /suicide - /rules - /flip - /fr - /url");
- SendClientMessage(playerid, COLOR_WHITE, "/credits - /drift1 - /drift2 - /drift3 - ");
- SendClientMessage(playerid, COLOR_WHITE, "/open - /close");
- SendClientMessage(playerid, COLOR_YELLOW, "_________________________");
- return 1;
- }
- CMD:suicide(playerid, params[])
- {
- SetPlayerHealth(playerid,0);
- SendClientMessage(playerid, COLOR_RED, "You have commited suicide.");
- return 1;
- }
- CMD:flip(playerid, params[])
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- new Float:PX, Float:PY, Float:PZ, Float:PA;
- GetPlayerPos(playerid, PX, PY, PZ);
- GetVehicleZAngle(GetPlayerVehicleID(playerid), PA);
- SetVehiclePos(GetPlayerVehicleID(playerid), PX, PY, PZ+1);
- SetVehicleZAngle(GetPlayerVehicleID(playerid), PA);
- SendClientMessage(playerid, COLOR_WHITE, "Your vehicle has been flipped!");
- PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle to use this command!");
- }
- return 1;
- }
- CMD:credits(playerid, params[])
- {
- SendClientMessage(playerid, COLOR_YELLOW, "TwD Development Team");
- SendClientMessage(playerid, COLOR_GREEN, "Founder/Developer: {FFFFFF}SoomroTayab (Goldilox)");
- SendClientMessage(playerid, 0xF80000AA, "Other: {FFFFFF}Alex Y_Less Cole\n Bennie\n Onfroi");
- SendClientMessage(playerid, COLOR_WHITE, "_______________");
- return 1;
- }
- CMD:stats(playerid, params[])
- {
- new str[128],PName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, PName, MAX_PLAYER_NAME);
- SendClientMessage(playerid,0x80DD22C8,"______________________________");
- format(str,sizeof(str),"|_______|%sStats|________|",PName);
- SendClientMessage(playerid,0x80DD22C8,str);
- format(str,sizeof(str),"Score: {FFFFFF}%d",GetPlayerScore(playerid));
- SendClientMessage(playerid,0x40BFA600,str);
- format(str,sizeof(str),"Cash: {FFFFFF} $%d",GetPlayerMoney(playerid));
- SendClientMessage(playerid,0xEEE8AA00,str);
- return 1;
- }
- CMD:drift(playerid,params[])
- {
- new did;
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_GREY,"You have to be in vehicle.");
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_GREY,"You've to be the driver of a car.");
- if(sscanf(params,"d",did)) return SendClientMessage(playerid,COLOR_GREY,"/drift [id]") && SendClientMessage(playerid,COLOR_GREY,"Current IDs [1-3]");
- if(did < 1 || did > 3) return SendClientMessage(playerid,COLOR_GREY,"Invalid ID");
- if(did == 1)
- {
- new string[128], pName[MAX_PLAYER_NAME];
- SetVehiclePos(GetPlayerVehicleID(playerid), -358.1943,1531.2909,75.1698 );
- SetVehicleZAngle(GetPlayerVehicleID(playerid), 264.7289);
- SetCameraBehindPlayer(playerid);
- format(string, sizeof(string), "%s [ID:%d] has gone to Drift 1 (/drift1)", pName, playerid);
- SendClientMessageToAll(COLOR_YELLOW, string);
- GameTextForPlayer(playerid, "~w~Welcome To Drift 1! ~G~", 5000, 5);
- }
- else if(did == 2)
- {
- new string[128], pName[MAX_PLAYER_NAME];
- SetVehiclePos(GetPlayerVehicleID(playerid), 2265.3010,1399.5085,42.8203);
- SetVehicleZAngle(GetPlayerVehicleID(playerid), 269.7637);
- SetCameraBehindPlayer(playerid);
- format(string, sizeof(string), "%s [ID:%d] has gone to Drift 2 (/drift2)", pName, playerid);
- SendClientMessageToAll(COLOR_YELLOW, string);
- GameTextForPlayer(playerid, "~w~Welcome To Drift 2! ~G~", 5000, 5);
- }
- else if(did == 3)
- {
- new string[128], pName[MAX_PLAYER_NAME];
- SetVehiclePos(GetPlayerVehicleID(playerid),835.6555,-878.2632,68.0216);
- SetVehicleZAngle(GetPlayerVehicleID(playerid), 238.8432);
- SetCameraBehindPlayer(playerid);
- format(string, sizeof(string), "%s [ID:%d] has gone to Drift 53 (/drift3)", pName, playerid);
- SendClientMessageToAll(COLOR_YELLOW, string);
- GameTextForPlayer(playerid, "~w~Welcome To Drift 3! ~G~", 5000, 5);
- }
- return 1;
- }
- CMD:setvip(playerid, params[])
- {
- new levels,Nam[MAX_PLAYER_NAME],pname[MAX_PLAYER_NAME],str[128],ID;
- if(PlayerInfo[playerid][AdminLevel] == 5 || IsPlayerAdmin(playerid))
- {
- if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,COLOR_GREY, "/setvip [id] [level]");
- if(levels > 3) return SendClientMessage(playerid,COLOR_GREY,"Maximum level - 3");
- if(!IsPlayerConnected(ID))return SendClientMessage(playerid,COLOR_GREY,"That user is not connected.");
- new string[128];
- format(string,sizeof(string),"That person already posses VIP Level %d.",levels);
- if(PlayerInfo[ID][VIP] == levels) return SendClientMessage(playerid,COLOR_GREY,string);
- GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);
- GetPlayerName(ID,pname,MAX_PLAYER_NAME);
- if(levels==1)
- {
- SendClientMessage(ID,COLOR_YELLOW,"You have recieved VIP Package 1 (2 Months) Subscribtion.");
- GameTextForPlayer(ID, "Enjoy~g~ 2 Month VIP!", 3000, 5);
- SendClientMessage(ID,COLOR_WHITE,"Type /vipcmds for the list of VIP commands.");
- format(str, sizeof(str),"You've given %s a VIP Package 1 (2 Months) subscription",pname);
- SendClientMessage(playerid,COLOR_WHITE,str);
- PlayerInfo[ID][VIP] = levels;
- // just do this, it is quicker
- dini_IntSet(Pos(ID),"VIPTIME",gettime()+60*60*24*60);
- }
- if(levels==2)
- {
- SendClientMessage(ID,COLOR_YELLOW,"You have recieved VIP Package 2 (5 Months) Subscribtion.");
- GameTextForPlayer(ID, "Enjoy~g~ 5 Month VIP!", 3000, 5);
- SendClientMessage(ID,COLOR_WHITE,"Type /vipcmds for the list of VIP commands.");
- format(str, sizeof(str),"You've given %s a VIP Package 2 (5 Months) subscription",pname);
- SendClientMessage(playerid,COLOR_WHITE,str);
- PlayerInfo[ID][VIP] = levels;
- dini_IntSet(Pos(ID),"VIPTIME",gettime()+60*60*24*150);
- }
- if(levels==3)
- {
- SendClientMessage(ID,COLOR_YELLOW,"You have recieved VIP Package 3 (Lifetime) Subscribtion.");
- GameTextForPlayer(ID, "Enjoy~g~ Lifetime VIP!", 3000, 5);
- SendClientMessage(ID,COLOR_WHITE,"Type /vipcmds for the list of VIP commands.");
- format(str, sizeof(str),"You've given %s a VIP Package 3 (Lifetime) subscription",pname);
- SendClientMessage(playerid,COLOR_WHITE,str);
- PlayerInfo[ID][VIP] = levels;
- dini_IntSet(Pos(ID),"VIPTIME",gettime()+60*60*24*1000);
- }
- if(levels ==0)
- {
- SendClientMessage(ID,COLOR_RED,"Your VIP privillages have been removed.");
- SendClientMessage(ID,COLOR_WHITE,"If it was unfair, post it on forum.");
- return 1;
- }
- if(levels > 3)
- {
- SendClientMessage(playerid,COLOR_GREY,"Maximum V.I.P Level is 3.");
- }
- if(levels < 0)
- {
- SendClientMessage(playerid,COLOR_GREY,"Minumum V.I.P Level is 1.");
- }
- }
- return 1;
- }
- CMD:heal(playerid, params[]){ //A typical vip command (Health)
- if(PlayerInfo[playerid][VIP] < 1) return 0;
- SetPlayerHealth(playerid, 100);
- SendClientMessage(playerid, COLOR_GREEN, "You have been healed.");
- return 1;
- }
- CMD:armour(playerid, params[]){ //A typical vip command2 (Armor)
- if(PlayerInfo[playerid][VIP] < 1) return 0;
- SetPlayerArmour(playerid, 100);
- SendClientMessage(playerid, COLOR_WHITE, "Armor activated.");
- return 1;}
- CMD:night(playerid, params[]){
- if(PlayerInfo[playerid][VIP] < 1) return 0;
- new time;
- SetPlayerTime(playerid,time,0);
- SendClientMessage(playerid, COLOR_WHITE, "You have set night time at you.");
- return 1;}
- CMD:tune(playerid, params[]){
- if(PlayerInfo[playerid][VIP] < 1) return 0;
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You must be the the driver of the vehicle.");
- new vehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid));
- if(vehiclemodel < 400 || vehiclemodel > 611) return SendClientMessage(playerid,COLOR_GREY, "Untunable vehicle.");
- new string[2048];
- new component;
- countVehicle[playerid] = 1;
- while(GetVehicleCompatibleUpgrades(vehiclemodel, countVehicle[playerid], component)){
- if(countVehicle[playerid] <= MAX_COMP){
- if(countVehicle[playerid] == 1) format(string, sizeof(string), "%s", GetComponentName(component));
- else format(string, sizeof(string), "%s\n%s", string, GetComponentName(component));
- componentsid[playerid][countVehicle[playerid]-1] = component;
- countVehicle[playerid]++;
- }
- else break;
- }
- new title[80];
- format(title, sizeof(title), "Vehicle Components for vehicle model %d", vehiclemodel);
- ShowPlayerDialog(playerid,TUNE,DIALOG_STYLE_LIST, title, string, "Attach", "Cancel");
- return 1;
- }
- CMD:day(playerid, params[]){
- if(PlayerInfo[playerid][VIP] < 1) return 0;
- new time;
- SetPlayerTime(playerid,time,10);
- SendClientMessage(playerid, COLOR_WHITE, "You have set night time at you.");
- return 1;}
- CMD:viphelp(playerid, params[])
- {
- if(PlayerInfo[playerid][VIP] < 1) return 0;
- SendClientMessage(playerid, COLOR_TEAL, "For available vip commands, type /vcmds.");
- return 1;
- }
- CMD:vcmds(playerid, params[])
- {
- if(PlayerInfo[playerid][VIP] < 1) return 0;
- SendClientMessage(playerid,COLOR_YELLOW,"VIP Commands");
- SendClientMessage(playerid,COLOR_WHITE,"/heal - /armour - /tune");
- SendClientMessage(playerid,COLOR_WHITE,"/day - /night - /color");
- return 1;
- }
- CMD:color(playerid,params[])
- {
- if(PlayerInfo[playerid][VIP] < 1) return 0;
- new PlayerState = GetPlayerState(playerid);
- if(PlayerState == PLAYER_STATE_DRIVER)
- {
- ShowPlayerDialog(playerid,COLORCAR,DIALOG_STYLE_LIST,"Color Menu","Black\nWhite","Apply","");
- }
- if(PlayerState == PLAYER_STATE_ONFOOT)
- {
- ShowPlayerDialog(playerid,COLORCHAT,DIALOG_STYLE_LIST,"Color Menu","Blue\nPink\nRed\nYellow\nOrange\nAqua\nLime\nMaroon\nMagenta\nTeal\nWhite","Apply","");
- }
- return 1;
- }
- CMD:paintball(playerid,params[])
- {
- if(PB[playerid]==0)
- {
- if(!IsPlayerInRangeOfPoint(playerid, 10,2015.5741,1106.1957,10.8203)) return SendClientMessage(playerid,COLOR_GREY,"You're no where close to paintball.");
- new Random = random(sizeof(PBSpawn));
- if(GetPlayerWantedLevel(playerid) >= 1)return SendClientMessage(playerid,COLOR_GREY,"You're a suspect!");
- SetPlayerPos(playerid, PBSpawn[Random][0], PBSpawn[Random][1], PBSpawn[Random][2]);
- SetPlayerFacingAngle(playerid, PBSpawn[Random][3]);
- SetTimer("LoadingArea",5000,0);
- TogglePlayerControllable(playerid,0);
- GameTextForPlayer(playerid,"Loading Area...",5200,5);
- }
- else if(PB[playerid] == 1)
- {
- new string[128];
- SetPlayerPos(playerid,2015.5741,1106.1957,10.8203);
- SendClientMessage(playerid,COLOR_WHITE,"Thanks for playing paintball.");
- ResetPlayerWeapons(playerid);
- SetPlayerHealth(playerid,100);
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has left paintball.",name);
- PB[playerid]=0;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PB[i] == 1)
- {
- SendClientMessage(i,0x04B4AEAA,string);
- return 1;
- }
- }
- }
- return 1;
- }
- GetPName(playerid)
- {
- new PName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, PName, sizeof(PName));
- return PName;
- }
- forward KickPublic(playerid);
- public KickPublic(playerid) { Kick(playerid); }
- stock KickWithMessage(playerid)
- {
- SetTimerEx("KickPublic", 300, 0, "d", playerid); //Delay of 1 second before kicking the player so he recieves the message
- }
- forward BanPublic(playerid);
- public BanPublic(playerid) { Ban(playerid); }
- stock BanWithMessage(playerid)
- {
- SetTimerEx("BanPublic", 300, 0, "d", playerid); //Delay of 1 second before kicking the player so he recieves the message
- }
- public SaveIn(filename[],text[])
- {
- new File:Lfile;
- new filepath[256];
- new string[256];
- new year,month,day;
- getdate(year,month,day);
- format(filepath,sizeof(filepath),"%s.txt",filename);
- Lfile = fopen(filepath,io_append);
- format(string,sizeof(string),"[%02d/%02d/%02d] %s\r\n",day,month,year,text);
- fwrite(Lfile,string);
- fclose(Lfile);
- return 1;
- }
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == pblv)
- {
- ShowPlayerDialog(playerid,PBALL,DIALOG_STYLE_LIST,"Paintball","Join\nInformation\nCurrent Players","Okay","");
- }
- return 1;
- }
- public LoadingArea(playerid)
- {
- new string[128];
- SendClientMessage(playerid,COLOR_YELLOW,"Type /paintball again in order to stop paintballing.");
- GivePlayerWeapon(playerid, 29, 2500);
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s has joined paintball.",name);
- PB[playerid]=1;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(PB[i] == 1)
- {
- SendClientMessage(i,0x04B4AEAA,string);
- return 1;
- }
- }
- TogglePlayerControllable(playerid,1);
- return 1;
- }
- public OnPlayerPickUpDynamicPickup(playerid, pickupid)
- {
- if(pickupid == paintball)
- {
- SendClientMessage(playerid,COLOR_YELLOW,"Welcome to Paintball.");
- SendClientMessage(playerid,-1,"Type /paintball to start paintballing.");
- return 1;
- }
- return 1;
- }
- forward VIPCLOCK();
- public VIPCLOCK()
- {
- for(new i=0; i<MAX_PLAYERS; i++)
- {
- if(PlayerInfo[i][VIP] > 0)
- {
- if(IsPlayerConnected(i))
- {
- if(gettime() > dini_Int(Pos(i),"VIPTIME"))
- {
- PlayerInfo[i][VIP] = 0;
- SendClientMessage(i,COLOR_ORANGE,"Your VIP Subscribtion has been ended.");
- GameTextForPlayer(i, "Thanks for donating!", 3000, 5);
- SendClientMessage(i,COLOR_WHITE,"We're hoping you enjoyed being V.I.P"); }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement