Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //==============================================================================
- dcmd_crimes(playerid, params[])
- {
- #pragma unused params
- if (PlayerInfo[playerid][pSpawn] == 1){
- if (PlayerInfo[playerid][pTeam] == TEAM_CIVILIAN){
- new string[256],Wanted[128],idx,giveplayerid,tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- //SendClientMessage(playerid, COLOR_ERROR, "USAGE: /crimes (Name/Id).");
- //return 1;
- giveplayerid = playerid;
- }else{
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- }
- switch (PlayerInfo[giveplayerid][pWantedLevel])
- {
- case 0:format(string, sizeof(string), "Wated Level %d - Innocent Civilian",PlayerInfo[giveplayerid][pWantedLevel]);
- case 1..5:format(string, sizeof(string), "~y~Wated Level %d",PlayerInfo[giveplayerid][pWantedLevel]);
- case 6..10:format(string, sizeof(string), "~r~Wated Level %d",PlayerInfo[giveplayerid][pWantedLevel]);
- }
- strmid(Wanted, string, 0, strlen(string), 256);
- if(PlayerCrimeListRowNo[giveplayerid] > 0)
- {
- TextDrawHideForPlayer(playerid, Menu_Title[playerid]);
- TextDrawHideForPlayer(playerid, Menu_Stats[playerid]);
- TextDrawHideForPlayer(playerid, Menu_End[playerid]);
- for(new r = 0; r < MAX_TEXTDRAW_ROWS; r++)
- {
- TextDrawHideForPlayer(playerid, Menu_Column1[playerid][r]);
- TextDrawHideForPlayer(playerid, Menu_Column2[playerid][r]);
- }
- ShowTextDrawMenu(playerid, TD_MENU_INFO,"~g~Crime History", PlayerCrimeListRowNo[giveplayerid] + 5, 0);
- //ShowTextDrawMenuItems(playerid, 0, " ", " ", " ",0);
- format(string, sizeof(string), "%s (%d)~n~%s",PlayerInfo[giveplayerid][pName],giveplayerid,Wanted);
- ShowTextDrawMenuItems(playerid, 0, string, " ", " ",0);
- ShowTextDrawMenuItems(playerid, 1, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 2, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 3, " ", " ", " ",0);
- //ShowTextDrawMenuItems(playerid, 3, " ", Line[0], LineEx[0],0);
- ShowTextDrawMenuItems(playerid, 4, " ", PlayerCrimeList[playerid][1], " ",0);
- ShowTextDrawMenuItems(playerid, 5, " ", PlayerCrimeList[playerid][2], " ",0);
- ShowTextDrawMenuItems(playerid, 6, " ", PlayerCrimeList[playerid][3], " ",0);
- ShowTextDrawMenuItems(playerid, 7, " ", PlayerCrimeList[playerid][4], " ",0);
- ShowTextDrawMenuItems(playerid, 8, " ", PlayerCrimeList[playerid][5], " ",0);
- ShowTextDrawMenuItems(playerid, 9, " ", PlayerCrimeList[playerid][6], " ",0);
- ShowTextDrawMenuItems(playerid, 10, " ", PlayerCrimeList[playerid][7], " ",0);
- ShowTextDrawMenuItems(playerid, 11, " ", PlayerCrimeList[playerid][8], " ",0);
- ShowTextDrawMenuItems(playerid, 12, " ", PlayerCrimeList[playerid][9], " ",0);
- }else{
- format(string, sizeof(string), "No Crimes Committed By %s (%d).",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Only Civilians Can Use This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_timeme(playerid,params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0)
- {
- if (PlayerInfo[playerid][pSpawn] == 1)
- {
- if(PlayerInfo[playerid][pTimeMe] == 0)
- {
- PlayerInfo[playerid][pTimeMeMinute] = 0;
- PlayerInfo[playerid][pTimeMeHour] = 0;
- PlayerInfo[playerid][pTimeMe] = 1;
- TextDrawShowForPlayer(playerid, StatsDisplay[playerid]);
- SendClientMessage(playerid, COLOR_ADMIN, "TIMER ON.");
- }else{
- PlayerInfo[playerid][pTimeMe] = 0;
- TextDrawHideForPlayer(playerid, StatsDisplay[playerid]);
- SendClientMessage(playerid, COLOR_ADMIN, "TIMER OFF.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_gametext(playerid,params[])
- {
- //#pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,Style,id,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /gametext (style) (text).");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Style.");
- return 1;
- }
- Style = strval(tmp);
- if (Style < 0 || Style > 6 && Style != 2)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Please Enter A Number 0 - 6.");
- return 1;
- }
- if (Style == 2)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Please Enter A Number Another Style this is bugged in SA-MP.");
- return 1;
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- //reason = "No Reason Given.";
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /gametext (style) (text).");
- return 1;
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- format(string, sizeof(string), "%s",reason);
- GameTextForAll(string, 5000, Style);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_gotomb(playerid,params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 3)
- {
- SetPlayerPos(playerid, MoneyBagPos[0], MoneyBagPos[1] +3, MoneyBagPos[2]);
- SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "You Have Been teleported To The Money Bag");
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_kill(playerid,params[])
- {
- #pragma unused params
- if (PlayerInfo[playerid][pSpawn] == 1)
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0)
- {
- //ForceClassSelection(playerid);
- SetPlayerHealth(playerid, 0);
- PlayerInfo[playerid][pResume] = 0;
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_help(playerid,params[])
- {
- #pragma unused params
- if (PlayerInfo[playerid][pSpawn] == 1)
- {
- new string[256];
- SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "{FFFFFF}Type /pagesize (#) To Set How Many Lines Of Chat Are Displayed.");
- format(string, sizeof(string), "{FFFFFF}*** {00AAFF}%s %s {FFFFFF}- {00AAFF}%s {D6D631}Version %s {FFFFFF}***",SERVER_NAME ,GAME_MODE ,ServerInfo[sMapName] ,VERSION);
- SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, string);
- SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "{0000FF}BLUE {FFFFFF}= Law Enforcement {8A2BE2}PURPLE {FFFFFF}= Cop Requesting Backup");
- SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "{D6D631}YELLOW {FFFFFF}= Wanted Suspect ({FF0000}ISSUE A TICKET {D6D631}/tk{FFFFFF})");
- SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "{FF8800}ORANGE {FFFFFF}= Suspect With Warrant For Arrest ({FF0000}ARREST {D6D631}/ar{FFFFFF})");
- SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "{32CD32}GREEN {FFFFFF}= Driver On Duty (Taxi, Bus, Limo ...)");
- SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "{FF0000}NO RANDOM KILLING OR YOU WILL BE KICKED / BANNED");
- format(string, sizeof(string), "{FFFFFF}Type {D6D631}/commands {FFFFFF}Or {D6D631}/rules {FFFFFF}Or Visit {00AAFF}%s {FFFFFF}for Game Info.",WEBSITE);
- SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, string);
- TextDrawSetString(MediumTextdraw0[playerid], " ~n~~y~Sasuke_Uchiha's's~n~~b~Cops ~w~And ~r~Robbers~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- format(string, sizeof(string), "~g~%s~n~ ~n~~y~Version "VERSION"",ServerInfo[sMapName]);
- TextDrawSetString(MediumTextdraw1[playerid], string);
- TextDrawSetString(MediumTextdraw2[playerid], "~n~ ~n~White = Innocent Civilian~n~~y~Yellow = Minor Suspect (Ticket)~n~~r~Orange = Wanted Criminal (Arrest)~n~~g~Green = Driver On Duty (Taxi)~n~~b~Blue = Law Enforcement~n~~p~Purple = Police Requesting Backup");
- TextDrawSetString(MediumTextdraw3[playerid], " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~~w~This Is ~r~NOT ~w~a Deathmatch Server.~n~Do ~r~NOT ~w~Attack People For No Reason~n~Or You Will Be Kicked / Banned~n~ ~n~~w~Type ~y~/help ~w~or ~y~/commands ~w~For More Information~n~Website: ~b~"WEBSITE"~n~ ~n~ ~n~~w~Press ~y~MMB ~w~To Close This Box");
- TextDrawShowForPlayer(playerid, MediumTextdraw0[playerid]);
- TextDrawShowForPlayer(playerid, MediumTextdraw1[playerid]);
- TextDrawShowForPlayer(playerid, MediumTextdraw2[playerid]);
- TextDrawShowForPlayer(playerid, MediumTextdraw3[playerid]);
- PlayerInfo[playerid][pTextdraw] = TD_MENU_INFO;
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_vehhelp(playerid,params[])
- {
- #pragma unused params
- if (PlayerInfo[playerid][pTextdraw] == 0)
- {
- HideTextDrawMenu(playerid);
- ShowTextDrawMenu(playerid, TD_MENU_VEH_CMDS,"~b~Vehicle Commands", 8, 0);
- ShowTextDrawMenuItems(playerid, 0, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 1, " ", "~y~/lk ~w~- Lock Your Vehicle", " ",0);
- ShowTextDrawMenuItems(playerid, 2, " ", "~y~/ulk ~w~- Unlock Your Vehicle", " ",0);
- ShowTextDrawMenuItems(playerid, 3, " ", "~y~/eja ~w~- Eject All Passengers", " ",0);
- ShowTextDrawMenuItems(playerid, 4, " ", "~y~/eje ~w~- Eject Everyone Including You", " ",0);
- ShowTextDrawMenuItems(playerid, 5, " ", "~y~/ejm ~w~- Eject Yourself", " ",0);
- ShowTextDrawMenuItems(playerid, 6, " ", "~y~/ej [name/id] ~w~- Eject A Player", " ",0);
- ShowTextDrawMenuItems(playerid, 7, " ", "~y~/sell ~w~- Sell Your Vehicle At The Crane", " ",0);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Please Close The Current Box Before Opening Another Box.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_rules(playerid,params[])
- {
- #pragma unused params
- if (PlayerInfo[playerid][pSpawn] == 1)
- {
- TextDrawSetString(MediumTextdraw0[playerid], " ~n~~y~Sasuke_Uchiha's~n~~b~Cops ~w~And ~r~Robbers~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- TextDrawSetString(MediumTextdraw1[playerid], "~r~SERVER RULES");
- TextDrawSetString(MediumTextdraw2[playerid], "- This Is ~r~NOT ~w~a Deathmatch Server.~n~- Do ~r~NOT ~w~Attack People For No Reason~n~Or You Will Be Kicked / Banned~n~ ~n~- No Cheating / Abusing Bugs or Glitches~n~- Respect Admins and Other Players~n~- No Advertising");
- TextDrawSetString(MediumTextdraw3[playerid], " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~Speak The Language You Want~n~- Use ~y~/complain ~w~For All Complaints~n~- Drive Properly~n~- ~r~No MODS Allowed~n~ ~n~~w~Type ~y~/help ~w~or ~y~/commands ~w~For More Information~n~Website: ~b~"WEBSITE"~n~ ~n~ ~n~~w~Press ~y~MMB ~w~To Close This Box");
- TextDrawShowForPlayer(playerid, MediumTextdraw0[playerid]);
- TextDrawShowForPlayer(playerid, MediumTextdraw1[playerid]);
- TextDrawShowForPlayer(playerid, MediumTextdraw2[playerid]);
- TextDrawShowForPlayer(playerid, MediumTextdraw3[playerid]);
- PlayerInfo[playerid][pTextdraw] = TD_MENU_INFO;
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_policerules(playerid,params[])
- {
- #pragma unused params
- if (PlayerInfo[playerid][pSpawn] == 1)
- {
- TextDrawSetString(MediumTextdraw0[playerid], " ~n~~y~Sasuke_Uchiha's~n~~b~Cops ~w~And ~r~Robbers~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- TextDrawSetString(MediumTextdraw1[playerid], "~r~POLICE RULES");
- TextDrawSetString(MediumTextdraw2[playerid], "- This Is ~r~NOT ~w~a Deathmatch Server.~n~- Do ~r~NOT ~w~Attack People For No Reason~n~Or You Will Be Kicked / Banned~n~ ~n~- Do Not Attack Other Law Enforcement Agents (~b~Blue~w~)~n~- Do Not Bother Innocent Civilians (White)~n~ ~n~- Issue ~p~Tickets ~w~To Suspects (~y~Yellow~w~)");
- TextDrawSetString(MediumTextdraw3[playerid], " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~- Arrest Wanted Suspects (~r~Orange~w~)~n~- Shoot Only In ~r~Self Defence~n~~w~Or To ~r~Disable ~w~A Fleeing Vehicle~n~- Cops ~r~Do Not ~w~Work With Suspects~n~ ~n~Type ~y~/help ~w~or ~y~/commands ~w~For More Information~n~Website: ~b~"WEBSITE"~n~~w~Press ~y~MMB ~w~To Close This Box");
- TextDrawShowForPlayer(playerid, MediumTextdraw0[playerid]);
- TextDrawShowForPlayer(playerid, MediumTextdraw1[playerid]);
- TextDrawShowForPlayer(playerid, MediumTextdraw2[playerid]);
- TextDrawShowForPlayer(playerid, MediumTextdraw3[playerid]);
- PlayerInfo[playerid][pTextdraw] = TD_MENU_INFO;
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_cmds(playerid, params[])
- {
- dcmd_commands(playerid, params);
- return 1;
- }
- dcmd_commands(playerid,params[])
- {
- #pragma unused params
- if (PlayerInfo[playerid][pSpawn] == 1)
- {
- TextDrawHideForPlayer(playerid, Menu_Title[playerid]);
- TextDrawHideForPlayer(playerid, Menu_Stats[playerid]);
- TextDrawHideForPlayer(playerid, Menu_End[playerid]);
- for(new r = 0; r < MAX_TEXTDRAW_ROWS; r++)
- {
- TextDrawHideForPlayer(playerid, Menu_Column1[playerid][r]);
- TextDrawHideForPlayer(playerid, Menu_Column2[playerid][r]);
- }
- ShowTextDrawMenu(playerid, TD_MENU_CMDS,"~g~Commands", 13, 11);
- ShowTextDrawMenuItems(playerid, 0, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 1, " ", "~y~1 ~w~- General Commands", " ",0);
- ShowTextDrawMenuItems(playerid, 2, " ", "~y~2 ~w~- Information Commands", " ",0);
- ShowTextDrawMenuItems(playerid, 3, " ", "~y~3 ~w~- Messaging Commands", " ",0);
- ShowTextDrawMenuItems(playerid, 4, " ", "~y~4 ~w~- Vehicle Commands", " ",0);
- //ShowTextDrawMenuItems(playerid, 5, " ", "~y~5 ~w~- Group Commands", " ",0);
- ShowTextDrawMenuItems(playerid, 5, " ", "~y~5 ~w~- Jail Commands", " ",0);
- ShowTextDrawMenuItems(playerid, 6, " ", "~y~6 ~w~- Police Commands", " ",0);
- ShowTextDrawMenuItems(playerid, 7, " ", "~y~7 ~w~- Civilian Commands", " ",0);
- ShowTextDrawMenuItems(playerid, 8, " ", "~y~8 ~w~- Services", " ",0);
- ShowTextDrawMenuItems(playerid, 9, " ", "~y~9 ~w~- House Commands", " ",0);
- ShowTextDrawMenuItems(playerid, 10, " ", "~y~10 ~w~- Service Commands", " ",0);
- ShowTextDrawMenuItems(playerid, 11, " ", "~y~11 ~w~- Animation Commands", " ",0);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_version(playerid,params[])
- {
- #pragma unused params
- if (PlayerInfo[playerid][pSpawn] == 1)
- {
- new string[256];
- TextDrawSetString(SmallTextdraw0[playerid], " ~n~~y~Sasuke_Uchiha's~n~~b~Cops ~w~And ~r~Robbers~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- TextDrawSetString(SmallTextdraw1[playerid], " ~n~ ~n~~b~"WEBSITE"");
- format(string, sizeof(string), "~g~%s ~w~- ~y~Version "VERSION"~n~~w~By ~b~Sasuke_Uchiha~w~, ~b~Sasuke_Uchiha~n~Special Thanks To~n~sa-mp~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~~w~Press ~y~MMB ~w~To Close This Box",ServerInfo[sMapName]);//~w~, ~b~Tristan ~w~and ~b~SirJoe ~w~Thanks To The ~b~SA-MP Team
- TextDrawSetString(SmallTextdraw2[playerid], string);
- TextDrawShowForPlayer(playerid, SmallTextdraw0[playerid]);
- TextDrawShowForPlayer(playerid, SmallTextdraw1[playerid]);
- TextDrawShowForPlayer(playerid, SmallTextdraw2[playerid]);
- PlayerInfo[playerid][pTextdraw] = TD_MENU_INFO;
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_time(playerid, params[])
- {
- #pragma unused params
- new string[128];
- if (GameHour < 10)
- format(string, sizeof(string), "%s, 0%d",WeekDays[GameDay],GameHour);
- else
- format(string, sizeof(string), "%s, %d",WeekDays[GameDay],GameHour);
- if (GameMinute < 10)
- format(string, sizeof(string), "%s:0%d",string,GameMinute);
- else
- format(string, sizeof(string), "%s:%d",string,GameMinute);
- format(string, sizeof(string), "{FFFFFF}Game Time: {BDBDBD}%s",string);
- SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, string);
- return 1;
- }
- //==============================================================================
- dcmd_register(playerid, params[])
- {
- #pragma unused params
- new string[256];
- if (PlayerInfo[playerid][pRegistered] == 0)
- {
- format(string, sizeof(string), "Cops And Robbers\n \nNew Registration - Name: %s\n \nDo Not Register Multiple Accounts\nDo Not Use The Same Password That You Use Elsewhere\nMinimum 6 Chars Maximum 12 Chars\n \nPlease Enter A Password For Your Account:",PlayerInfo[playerid][pName],playerid);
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT , "CnR Registration",string, "Register", "Cancel");
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Are Already Registered.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_spawn(playerid,params[])
- {
- #pragma unused params
- TextDrawHideForPlayer(playerid, Menu_Title[playerid]);
- TextDrawHideForPlayer(playerid, Menu_Stats[playerid]);
- TextDrawHideForPlayer(playerid, Menu_End[playerid]);
- for(new r = 0; r < MAX_TEXTDRAW_ROWS; r++)
- {
- TextDrawHideForPlayer(playerid, Menu_Column1[playerid][r]);
- TextDrawHideForPlayer(playerid, Menu_Column2[playerid][r]);
- }
- ShowTextDrawMenu(playerid, TD_MENU_SPAWN_OPTIONS,"~b~New Life", 6, 2);
- ShowTextDrawMenuItems(playerid, 0, "Do You Really Want~n~To Start A ~r~New Life~w~?", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 1, " ", "~y~1 ~w~- ~g~YES", " ",0);
- ShowTextDrawMenuItems(playerid, 2, " ", "~y~2 ~w~- ~r~NO", " ",0);
- return 1;
- }
- //==============================================================================
- //==============================================================================
- //==============================================================================
- //======================START OF ADMINISTRATION COMMANDS========================
- //==============================================================================
- //==============================================================================
- //==============================================================================
- //==============================================================================
- //==============================================================================
- dcmd_freeme(playerid,params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0)
- {
- if (PlayerInfo[playerid][pSpawn] == 1)
- {
- if (PlayerInfo[playerid][pJailed] == 1)
- {
- UnJail(playerid);
- TextDrawHideForPlayer(playerid, StatsDisplay[playerid]);
- }
- PlayerInfo[playerid][pJailed] = 0;
- PlayerInfo[playerid][pJailHour] = 0;
- PlayerInfo[playerid][pJailMinute] = 0;
- PlayerInfo[playerid][pWantedLevel] = 0;
- SetPlayerWantedLevel(playerid,0);
- ShowPlayerWantedStats(playerid);
- SendClientMessage(playerid,COLOR_SERVER_HELP_MSG, "Your Wanted Criminal History Has Been Cleared.");
- GameTextForPlayer(playerid,"~w~Criminal History Cleared",5000,3);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_adrugs(playerid,params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0)
- {
- if (PlayerInfo[playerid][pSpawn] == 1)
- {
- PlayerInfo[playerid][pDrugs] = 500;
- SendClientMessage(playerid,COLOR_SERVER_HELP_MSG, "You Now Have 500 Grams Of Drugs.");
- GameTextForPlayer(playerid,"~w~500 Grams Of Drugs",5000,3);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_acmds(playerid, params[])
- {
- dcmd_admincommands(playerid, params);
- return 1;
- }
- dcmd_admincommands(playerid,params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0)
- {
- if (PlayerInfo[playerid][pSpawn] == 1)
- {
- HideTextDrawMenu(playerid);
- ShowTextDrawMenu(playerid, TD_MENU_ADMIN_CMDS,"~g~Admin Commands", 6, 3);
- ShowTextDrawMenuItems(playerid, 0, " ", " ", " ",0);
- ShowTextDrawMenuItems(playerid, 1, " ", "~y~1 ~w~- Admin Level 1", " ",0);
- ShowTextDrawMenuItems(playerid, 2, " ", "~y~2 ~w~- Admin Level 2", " ",0);
- ShowTextDrawMenuItems(playerid, 3, " ", "~y~3 ~w~- Admin Level 3", " ",0);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You Are Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_atime(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,DAY,HOUR,MINUTE,tmp[256],string[128];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /atime (day) (hour) (minute)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Day Please Use A Numeric Character.");
- return 1;
- }
- DAY = strval(tmp);
- if(DAY < 0 || DAY > 6)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Day Please Enter A Number 0 - 6.");
- return 1;
- }
- GameDay = DAY;
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /atime (day) (hour) (minute)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Hour Please A Numeric Character.");
- return 1;
- }
- HOUR = strval(tmp);
- if(HOUR < 0 || HOUR > 23)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Hour Please Enter A Number 0 - 23.");
- return 1;
- }
- GameHour = HOUR;
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /atime (day) (hour) (minute)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Minute Please A Numeric Character.");
- return 1;
- }
- MINUTE = strval(tmp);
- if(MINUTE < 0 || MINUTE > 59)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Minute Please Enter A Number 0 - 59.");
- return 1;
- }
- GameMinute = MINUTE;
- if (GameHour < 10)
- format(string, sizeof(string), "%s, 0%d",WeekDays[GameDay],GameHour);
- else
- format(string, sizeof(string), "%s, %d",WeekDays[GameDay],GameHour);
- if (GameMinute < 10)
- format(string, sizeof(string), "%s:0%d",string,GameMinute);
- else
- format(string, sizeof(string), "%s:%d",string,GameMinute);
- format(string, sizeof(string), "{FFFFFF}Game Time: {BDBDBD}%s",string);
- SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, string);
- SetWorldTime(HOUR);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_247(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,interiorid,tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /247 (id)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Use Numeric Characters.");
- return 1;
- }
- interiorid = strval(tmp);
- if(interiorid < 1 || interiorid > 6)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Enter An ID 1 - 6.");
- return 1;
- }
- //SetPlayerPosEx(playerid,Float:x,Float:y,Float:z,Float:angle,interior,world);
- if(interiorid == 1)
- {
- SetPlayerPosEx(playerid,-25.938776, -185.129852, 1003.546875, 2.149587,17,0);
- }
- if(interiorid == 2)
- {
- SetPlayerPosEx(playerid,6.171852, -28.530193, 1003.549438, 358.279632,10,0);
- }
- if(interiorid == 3)
- {
- SetPlayerPosEx(playerid,-31.114776, -89.261940, 1003.546875, 2.533348,18,0);
- }
- if(interiorid == 4)
- {
- SetPlayerPosEx(playerid,-25.784944, -137.862976, 1003.546875, 358.536712,16,0);
- }
- if(interiorid == 5)
- {
- SetPlayerPosEx(playerid,-27.429084, -28.376251, 1003.557250, 1.216269,4,0);
- }
- if(interiorid == 6)
- {
- SetPlayerPosEx(playerid,-27.227264, -55.081371, 1003.546875, 2.479649,6,0);
- }
- format(tmp, sizeof(tmp), "24-7 ID %d", interiorid);
- SendClientMessage(playerid, COLOR_YELLOW, tmp);
- strmid(PlayerInfo[playerid][pInteriorName], tmp, 0, strlen(tmp), 256);
- strmid(PlayerInfo[playerid][pLocation], tmp, 0, strlen(tmp), 256);
- TextDrawSetString(ZoneName[playerid], tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_charhouses(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,interiorid,tmp[256],interiornames[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /charhouses (id)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Use Numeric Characters.");
- return 1;
- }
- interiorid = strval(tmp);
- if(interiorid < 1 || interiorid > 10)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Enter An ID 1 - 10.");
- return 1;
- }
- switch(interiorid)
- {
- case 1: {SetPlayerPos(playerid,1531,-10,1003); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,180); interiornames = "B Dup's Appartement";} // B Dup's Appartement
- case 2: {SetPlayerPos(playerid,1526.5,-48,1003); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,90); interiornames = "B Dup's Crack Palace";} // B Dup's Crack Palace
- case 3: {SetPlayerPos(playerid,2543,-1306,1025); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,180); interiornames = "Big Smoke's Crack Palace";} // Big Smoke's Crack Palace
- case 4: {SetPlayerPos(playerid,2807.5,-1172.5,1026); SetPlayerInterior(playerid,8); SetPlayerFacingAngle(playerid,0); interiornames = "Colonel Fuhrberger's House";} // Colonel Fuhrberger's House
- case 5: {SetPlayerPos(playerid,1299,-795.2,1084); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,0); interiornames = " Sasuke_Uchiha's Mansion East";} // Madd Dogg's Mansion East
- case 6: {SetPlayerPos(playerid,1263,-785.3,1092); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,270); interiornames = "Sasuke_Uchiha's Mansion West";} // Madd Dogg's Mansion West
- case 7: {SetPlayerPos(playerid,520,-17.5,1002); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,90); interiornames = "OG Loc's House";} // OG Loc's House
- case 8: {SetPlayerPos(playerid,2464,-1698,1014); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,90); interiornames = "Ryder's Place";} // Ryder's Place
- case 9: {SetPlayerPos(playerid,2526.5,-1679.5,1016); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,270); interiornames = "Sweet's House";} // Sweet's House
- case 10: {SetPlayerPos(playerid,-2163,642,1053); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,90); interiornames = "Wu Zi Mu's Crib";} // Wu Zi Mu's Crib
- }
- format(tmp, sizeof(tmp), "%s", interiornames);
- SendClientMessage(playerid, COLOR_YELLOW, tmp);
- strmid(PlayerInfo[playerid][pInteriorName], tmp, 0, strlen(tmp), 256);
- strmid(PlayerInfo[playerid][pLocation], tmp, 0, strlen(tmp), 256);
- TextDrawSetString(ZoneName[playerid], tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_afood(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,interiorid,tmp[256],interiornames[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /afood (id)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Use Numeric Characters.");
- return 1;
- }
- interiorid = strval(tmp);
- if(interiorid < 1 || interiorid > 11)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Enter An ID 1 - 11.");
- return 1;
- }
- switch(interiorid)
- {
- case 1: {SetPlayerPos(playerid,364.4,-73.6,1002); SetPlayerInterior(playerid,10); SetPlayerFacingAngle(playerid,315);interiornames = "Burger Shot";} // Burger Shot
- case 2: {SetPlayerPos(playerid,365.7,-10.7,1002); SetPlayerInterior(playerid,9); SetPlayerFacingAngle(playerid,0);interiornames = "Clucking' Bell";} // Clucking' Bell
- case 3: {SetPlayerPos(playerid,372,-131,1002); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,0);interiornames = "Well Stacked Pizza";} // Well Stacked Pizza
- case 4: {SetPlayerPos(playerid,459,-108.5,1005); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,0); interiornames = "Diner";SendClientMessage(playerid,0x00F600AA,"In normal game this interior is compleetly unsolid, the FS has makes it solid so you can explore it.");} // Diner
- case 5: {SetPlayerPos(playerid,377,-192,1001); SetPlayerInterior(playerid,17); SetPlayerFacingAngle(playerid,0);interiornames = "Jim's Sticky Ring";} // Jim's Sticky Ring
- case 6: {SetPlayerPos(playerid,-227,1401,28); SetPlayerInterior(playerid,18); SetPlayerFacingAngle(playerid,270);interiornames = "Lil' Probe'Inn";} // Lil' Probe'Inn
- case 7: {SetPlayerPos(playerid,455,-21,1001); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,0);interiornames = "Red Restaurant";} // Red Restaurant
- case 8: {SetPlayerPos(playerid,459,-88.5,1000); SetPlayerInterior(playerid,4); SetPlayerFacingAngle(playerid,90);interiornames = "Rusty Browns Ring Donuts";} // Rusty Browns Ring Donuts
- case 9: {SetPlayerPos(playerid,442,-51,1005); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid,180);interiornames = "Small Restaurant"; SendClientMessage(playerid,0x00F600AA,"In normal game this interior is compleetly unsolid, the FS has makes it solid so you can explore it.");} // Small Restaurant
- case 10: {SetPlayerPos(playerid,502,-69,999); SetPlayerInterior(playerid,11); SetPlayerFacingAngle(playerid,180);interiornames = "The Bar";} // The Bar
- case 11: {SetPlayerPos(playerid,681.5,-451,-26); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,180);interiornames = "The Welcome Pump";} // The Welcome Pump
- }
- format(tmp, sizeof(tmp), "%s", interiornames);
- SendClientMessage(playerid, COLOR_YELLOW, tmp);
- strmid(PlayerInfo[playerid][pInteriorName], tmp, 0, strlen(tmp), 256);
- strmid(PlayerInfo[playerid][pLocation], tmp, 0, strlen(tmp), 256);
- TextDrawSetString(ZoneName[playerid], tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_girl(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,interiorid,tmp[256],interiornames[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /girl (id)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Use Numeric Characters.");
- return 1;
- }
- interiorid = strval(tmp);
- if(interiorid < 1 || interiorid > 6)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Enter An ID 1 - 6.");
- return 1;
- }
- switch(interiorid)
- {
- case 1: {SetPlayerPos(playerid,322,303,1000); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,0);interiornames = "Barbara's House";} // Barbara's House
- case 2: {SetPlayerPos(playerid,245,305,1000); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,270);interiornames = "Denise's House";} // Denise's House
- case 3: {SetPlayerPos(playerid,292,310,1000); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,90);interiornames = "Helena's House";} // Helena's House
- case 4: {SetPlayerPos(playerid,267.6,305,1000); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,270);interiornames = "Katie's House";} // Katie's House
- case 5: {SetPlayerPos(playerid,309,311,1004); SetPlayerInterior(playerid,4); SetPlayerFacingAngle(playerid,180);interiornames = "Michelle's House";} // Michelle's House
- case 6: {SetPlayerPos(playerid,345,305,1000); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid,270);interiornames = "Millie's House";} // Millie's House
- }
- format(tmp, sizeof(tmp), "%s", interiornames);
- SendClientMessage(playerid, COLOR_YELLOW, tmp);
- strmid(PlayerInfo[playerid][pInteriorName], tmp, 0, strlen(tmp), 256);
- strmid(PlayerInfo[playerid][pLocation], tmp, 0, strlen(tmp), 256);
- TextDrawSetString(ZoneName[playerid], tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_bur(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,interiorid,tmp[256],interiornames[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /bur (id)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Use Numeric Characters.");
- return 1;
- }
- interiorid = strval(tmp);
- if(interiorid < 1 || interiorid > 23)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Enter An ID 1 - 23.");
- return 1;
- }
- switch(interiorid)
- {
- case 1: {SetPlayerPos(playerid,223,1288,1082); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 1";} // Burglary House 1
- case 2: {SetPlayerPos(playerid,225.4,1240,1082); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,90);interiornames = "Burglary House 2";} // Burglary House 2
- case 3: {SetPlayerPos(playerid,447,1398,1085.3); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 3";} // Burglary House 3
- case 4: {SetPlayerPos(playerid,491,1399,1081); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 4";} // Burglary House 4
- case 5: {SetPlayerPos(playerid,235,1187,1080.3); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 5";} // Burglary House 5
- case 6: {SetPlayerPos(playerid,-263,1456.7,1084.4);SetPlayerInterior(playerid,4); SetPlayerFacingAngle(playerid,90);interiornames = "Burglary House 6";} // Burglary House 6
- case 7: {SetPlayerPos(playerid,221.4,1142.4,1083); SetPlayerInterior(playerid,4); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 7";} // Burglary House 7
- case 8: {SetPlayerPos(playerid,261,1286.5,1081); SetPlayerInterior(playerid,4); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 8";} // Burglary House 8
- case 9: {SetPlayerPos(playerid,22.8,1404.6,1085); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 9";} // Burglary House 9
- case 10: {SetPlayerPos(playerid,229,1114.4,1081); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,270);interiornames = "Burglary House 10";}// Burglary House 10
- case 11: {SetPlayerPos(playerid,140.5,1369,1084); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 11";} // Burglary House 11
- case 12: {SetPlayerPos(playerid,83.1,1324.2,1084); SetPlayerInterior(playerid,9); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 12";} // Burglary 12
- case 13: {SetPlayerPos(playerid,260.3,1239.7,1085); SetPlayerInterior(playerid,9); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 13";} // Burglary 13
- case 14: {SetPlayerPos(playerid,9433,1341.3,1085); SetPlayerInterior(playerid,10); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 14";} // Burglary 14
- case 15: {SetPlayerPos(playerid,234.3,1066.4,1085); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 15";} // Burglary 15
- case 16: {SetPlayerPos(playerid,-69,1354,1081); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 16";} // Burglary 16
- case 17: {SetPlayerPos(playerid,-285.7,1470.7,1085);SetPlayerInterior(playerid,15); SetPlayerFacingAngle(playerid,90);interiornames = "Burglary House 17";} // Burglary 17
- case 18: {SetPlayerPos(playerid,327.8,1479.7,1085); SetPlayerInterior(playerid,15); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 18";} // Burglary 18
- case 19: {SetPlayerPos(playerid,375.6,1417.4,1082); SetPlayerInterior(playerid,15); SetPlayerFacingAngle(playerid,90);interiornames = "Burglary House 19";} // Burglary 19
- case 20: {SetPlayerPos(playerid,384.6,1471.5,1081); SetPlayerInterior(playerid,15); SetPlayerFacingAngle(playerid,90);interiornames = "Burglary House 20";} // Burglary 20
- case 21: {SetPlayerPos(playerid,295.5,1474.7,1081); SetPlayerInterior(playerid,15); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 21";} // Burglary 21
- case 22: {SetPlayerPos(playerid,-42.5,1407.6,1085); SetPlayerInterior(playerid,8); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 22";} // Burglary 22
- case 23: {SetPlayerPos(playerid,225.7,1023,1084); SetPlayerInterior(playerid,7); SetPlayerFacingAngle(playerid,0);interiornames = "Burglary House 23";} // Burglary 23
- }
- format(tmp, sizeof(tmp), "%s", interiornames);
- SendClientMessage(playerid, COLOR_YELLOW, tmp);
- strmid(PlayerInfo[playerid][pInteriorName], tmp, 0, strlen(tmp), 256);
- strmid(PlayerInfo[playerid][pLocation], tmp, 0, strlen(tmp), 256);
- TextDrawSetString(ZoneName[playerid], tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_ahouse(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- new idx,interiorid,tmp[256];//,interiornames[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /house (id)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Use Numeric Characters.");
- return 1;
- }
- interiorid = strval(tmp);
- if(interiorid < 1 || interiorid > 24)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Enter An ID 1 - 42.");
- return 1;
- }
- switch(interiorid)
- {
- case 1: {SetPlayerPosEx(playerid,247.207580, 304.963256, 999.148437, 271.584045, 1,0);}//Comment: Denise's House CP Spawn inside interior 1
- case 2: {SetPlayerPosEx(playerid,269.962371, 304.934020, 999.148437, 270.828033, 2,0);}//Comment: Katie's House CP Spawn inside interior 2
- case 3: {SetPlayerPosEx(playerid,2807.816894, -1171.652221, 1025.570312, 357.635467, 8,0);}//Comment: Colonel Fuhrberger's Exit CP spawn inside interior 8
- case 4: {SetPlayerPosEx(playerid,2465.324218, -1698.427734, 1013.515197, 91.960250, 2,0);}//Comment: Ryders House Exit CP spawn inside interior 2
- case 5: {SetPlayerPosEx(playerid,2496.014892, -1695.171020, 1014.742187, 179.300827, 3,0);}//Comment: Johnson House Exit CP spawn inside interior 3
- case 6: {SetPlayerPosEx(playerid,419.228637, 2536.651611, 10.000000, 87.954605, 10,0);}//Comment: Airport Safe House Exit CP spawn inside interior 10
- //case 7: {SetPlayerPosEx(playerid,-0.350109, -3.234085, 999.428405, 86.336982, 2,0);}//Comment: Angel Pine Trailer Safe House Exit CP spawn inside interior 2
- case 7: {SetPlayerPosEx(playerid,2267.533935, -1210.496337, 1048.116455, 88.593872, 10,0);}//Comment: Hasbury Safe House Exit CP spawn inside interior 10
- //case 9: {SetPlayerPosEx(playerid,2251.958251, -1139.891479, 1050.632812, 89.628273, 9,0);}//Comment: Jefferson Safe House 1 Exit CP spawn inside interior 9
- case 8: {SetPlayerPosEx(playerid,2262.245361, -1135.970092, 1050.632812, 269.300811, 10,0);}//Comment: Jefferson Safe House 2 Exit CP spawn inside interior 10
- case 9: {SetPlayerPosEx(playerid,2324.347167, -1145.709716, 1050.710083, 0.584272, 12,0);}//Comment: Modern Safe House Exit CP spawn inside interior 12
- case 10: {SetPlayerPosEx(playerid,2319.676757, -1023.681579, 1050.210937, 357.934661, 9,0);}//Comment: Prickle Pine Safe House Exit CP spawn inside interior 9
- case 11: {SetPlayerPosEx(playerid,2233.601562, -1111.768554, 1050.882812, 352.136596, 5,0);}//Comment: Motel Safe House Exit CP spawn inside interior 5
- case 12: {SetPlayerPosEx(playerid,2282.909667, -1137.524047, 1050.898437, 0.729693, 11,0);}//Comment: Safe House 1 Exit CP spawn inside interior 11
- case 13: {SetPlayerPosEx(playerid,2365.066162, -1132.477172, 1050.875000, 2.093142, 8,0);}//Comment: Safe House 2 Exit CP spawn inside interior 8
- case 14: {SetPlayerPosEx(playerid,2333.235839, -1074.122436, 1049.023437, 358.472747, 6,0);}//Comment: Safe House 3 Exit CP spawn inside interior 6
- case 15: {SetPlayerPosEx(playerid,2215.748535, -1076.159179, 1050.484375, 88.178146, 1,0);}//Comment: Safe House 4 Exit CP spawn inside interior 1
- case 16: {SetPlayerPosEx(playerid,2194.085937, -1204.052246, 1049.023437, 91.824943, 6,0);}//Comment: Safe House 5 Exit CP spawn inside interior 6
- case 17: {SetPlayerPosEx(playerid,2308.542724, -1209.783325, 1049.023437, 358.599151, 6,0);}//Comment: Safe House 6 Exit CP spawn inside interior 6
- case 18: {SetPlayerPosEx(playerid,2237.633300, -1078.569458, 1049.023437, 358.301971, 2,0);}//Comment: Safe House 7 Exit CP spawn inside interior 2
- case 19: {SetPlayerPosEx(playerid,223.166397, 1289.926513, 1082.132812, 352.048309, 1,0);}//Comment: Burglary House 1 Exit CP spawn inside interior 1
- case 20: {SetPlayerPosEx(playerid,223.827362, 1239.993774, 1082.140625, 90.555923, 2,0);}//Comment: Burglary House 2 Exit CP spawn inside interior 2
- case 21: {SetPlayerPosEx(playerid,447.068176, 1399.770874, 1084.304687, 1.605515, 2,0);}//Comment: Burglary House 3 Exit CP spawn inside interior 2
- case 22: {SetPlayerPosEx(playerid,490.918975, 1402.460937, 1080.264526, 5.356579, 2,0);}//Comment: Burglary House 4 Exit CP spawn inside interior 2
- case 23: {SetPlayerPosEx(playerid,235.239440, 1190.123413, 1080.257812, 1.590167, 3,0);}//Comment: Burglary House 5 Exit CP spawn inside interior 3
- case 24: {SetPlayerPosEx(playerid,318.637695, 1117.218994, 1083.882812, 359.494110, 5,0);}//Comment: Crack House 5 Exit CP spawn inside interior 3
- /*case 24: {SetPlayerPosEx(playerid,-263.593017, 1456.760131, 1084.367187, 89.161979, 4,0);}//Comment: Burglary House 6 Exit CP spawn inside interior 4
- case 25: {SetPlayerPosEx(playerid,221.754486, 1143.238769, 1082.609375, 2.681358, 4,0);}//Comment: Burglary House 7 Exit CP spawn inside interior 4
- case 26: {SetPlayerPosEx(playerid,261.064971, 1287.058593, 1080.257812, 358.325073, 4,0);}//Comment: Burglary House 8 Exit CP spawn inside interior 4
- case 27: {SetPlayerPosEx(playerid,22.852340, 1406.338134, 1084.429687, 0.651276, 5,0);}//Comment: Burglary House 9 Exit CP spawn inside interior 5
- case 28: {SetPlayerPosEx(playerid,229.352645, 1114.153442, 1080.992187, 269.018920, 5,0);}//Comment: Burglary House 10 Exit CP spawn inside interior 5
- case 29: {SetPlayerPosEx(playerid,140.204483, 1368.589721, 1083.863159, 3.312550, 5,0);}//Comment: Burglary House 11 Exit CP spawn inside interior 5
- case 30: {SetPlayerPosEx(playerid,82.946197, 1325.014648, 1083.859375, 0.590419, 9,0);}//Comment: Burglary House 12 Exit CP spawn inside interior 9
- case 31: {SetPlayerPosEx(playerid,260.909454, 1239.600585, 1084.257812, 358.078399, 9,0);}//Comment: Burglary House 13 Exit CP spawn inside interior 9
- case 32: {SetPlayerPosEx(playerid,234.146011, 1066.790527, 1084.207763, 0.954461, 6,0);}//Comment: Burglary House 15 Exit CP spawn inside interior 6
- case 33: {SetPlayerPosEx(playerid,-68.810073, 1353.848266, 1080.210937, 359.835968, 6,0);}//Comment: Burglary House 16 Exit CP spawn inside interior 6
- case 34: {SetPlayerPosEx(playerid,-285.584014, 1471.216796, 1084.375000, 90.173202, 15,0);}//Comment: Burglary House 17 Exit CP spawn inside interior 15
- case 35: {SetPlayerPosEx(playerid,327.973846, 1480.341918, 1084.437500, 0.100674, 15,0);}//Comment: Burglary House 18 Exit CP spawn inside interior 15
- case 36: {SetPlayerPosEx(playerid,374.457885, 1417.281616, 1081.328125, 87.147857, 15,0);}//Comment: Burglary House 19 Exit CP spawn inside interior 15
- case 37: {SetPlayerPosEx(playerid,383.710296, 1471.667968, 1080.194946, 93.898910, 15,0);}//Comment: Burglary House 20 Exit CP spawn inside interior 15
- case 38: {SetPlayerPosEx(playerid,295.267852, 1475.183349, 1080.257812, 359.870056, 15,0);}//Comment: Burglary House 21 Exit CP spawn inside interior 15
- case 39: {SetPlayerPosEx(playerid,-42.591930, 1408.186157, 1084.429687, 2.230989, 8,0);}//Comment: Burglary House 22 Exit CP spawn inside interior 8
- case 40: {SetPlayerPosEx(playerid,225.800689, 1024.404663, 1084.007812, 359.589111, 7,0);}//Comment: Burglary House 23 Exit CP spawn inside interior 7
- */
- }
- SetPlayerVirtualWorld(playerid,1000);
- //format(tmp, sizeof(tmp), "%s", interiornames);
- //SendClientMessage(playerid, COLOR_YELLOW, tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_extras(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,interiorid,tmp[256],interiornames[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /extras (id)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Use Numeric Characters.");
- return 1;
- }
- interiorid = strval(tmp);
- if(interiorid < 1 || interiorid > 80)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Enter An ID 1 - 80.");
- return 1;
- }
- switch(interiorid)
- {
- case 1: {SetPlayerPos(playerid,286,-40.6,1002); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,0);interiornames = "Ammu-Nation 1";} // Ammu-Nation 1
- case 2: {SetPlayerPos(playerid,297,-110,1002); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid,0);interiornames = "Ammu-Nation 2";} // Ammu-Nation 2
- case 3: {SetPlayerPos(playerid,286,-84,1002); SetPlayerInterior(playerid,4); SetPlayerFacingAngle(playerid,0);interiornames = "Ammu-Nation 3";} // Ammu-Nation 3
- case 4: {SetPlayerPos(playerid,316.5,-168,1000); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid,0);interiornames = "Ammu-Nation 4";} // Ammu-Nation 4
- case 5: {SetPlayerPos(playerid,316,-141.5,1000); SetPlayerInterior(playerid,7); SetPlayerFacingAngle(playerid,0);interiornames = "Ammu-Nation 5";} // Ammu-Nation 5
- case 6: {SetPlayerPos(playerid,418.6,-82.6,1002); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,0);interiornames = "Barber";} // Barber
- case 7: {SetPlayerPos(playerid,207.7,-109.8,1006); SetPlayerInterior(playerid,15); SetPlayerFacingAngle(playerid,0);interiornames = "Binco";} // Binco
- case 8: {SetPlayerPos(playerid,204.3,-166.7,1001); SetPlayerInterior(playerid,14); SetPlayerFacingAngle(playerid,0);interiornames = "Didier Sachs";} // Didier Sachs
- case 9: {SetPlayerPos(playerid,207,-138.8,1004); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,0);interiornames = "ProLaps";} // ProLaps
- case 10: {SetPlayerPos(playerid,412,-52.6,1002); SetPlayerInterior(playerid,12); SetPlayerFacingAngle(playerid,0);interiornames = "Macisla Unisex Hair Salon";} // Macisla Unisex Hair Salon
- case 11: {SetPlayerPos(playerid,411.6,-21.4,1002); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,0);interiornames = "Reeces Hair Facial Studio";} // Reeces Hair Facial Studio
- case 12: {SetPlayerPos(playerid,-100,-23,1001); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,0);interiornames = "Sex Shop";} // Sex Shop
- case 13: {SetPlayerPos(playerid,203.8,-48.5,1002); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,0);interiornames = "Suburban";} // Sub Urban
- case 14: {SetPlayerPos(playerid,-204.5,-26,1003); SetPlayerInterior(playerid,16); SetPlayerFacingAngle(playerid,0);interiornames = "Tattoo Los Santos";} // Tattoo Los Santos
- case 15: {SetPlayerPos(playerid,-204.4,-8.5,1003); SetPlayerInterior(playerid,17); SetPlayerFacingAngle(playerid,0);interiornames = "Tattoo San Fierro";} // Tattoo San Fierro
- case 16: {SetPlayerPos(playerid,-204.4,-43.6,1003); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,0);interiornames = "Tattoo Las Venturas";} // Tattoo Las Venturas
- case 17: {SetPlayerPos(playerid,226.3,-7.4,1003); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,90);interiornames = "Victim";} // Victim
- case 18: {SetPlayerPos(playerid,-2240,129.2,1036); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid,0);interiornames = "Zero's RC Shop";} // Zero's RC Shop
- case 19: {SetPlayerPos(playerid,161.4,-95.3,1002); SetPlayerInterior(playerid,18); SetPlayerFacingAngle(playerid,0);interiornames = "ZIP";} // ZIP
- case 20: {SetPlayerPos(playerid,941,-17,1001); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,0);interiornames = "Brothel 1";} // Brothel 1
- case 21: {SetPlayerPos(playerid,965,-53,1001.2); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,90);interiornames = "Brothel 2";} // Brothel 2
- case 22: {SetPlayerPos(playerid,744.5,1437,1103); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid,0);interiornames = "Brothel 3";} // Brothel 3
- case 23: {SetPlayerPos(playerid,493.4,-22.7,1001); SetPlayerInterior(playerid,17); SetPlayerFacingAngle(playerid,0);interiornames = "Disco";} // Disco
- case 24: {SetPlayerPos(playerid,-2640,1406,907); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,90);interiornames = "Jizzy's Pleasure Domes";} // Jizzy's Pleasure Domes
- case 25: {SetPlayerPos(playerid,1212,-28.7,1001); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,180);interiornames = "The Big Spread Ranch";} // The Big Spread Ranch
- case 26: {SetPlayerPos(playerid,1205,-11.6,1001); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,0);interiornames = "The Pig Pen";} // The Pig Pen
- case 27: {SetPlayerPos(playerid,214,1874,13); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid,180);interiornames = "Area 69";} // Area 69
- case 28: {SetPlayerPos(playerid,1726,-1641,21); SetPlayerInterior(playerid,18); SetPlayerFacingAngle(playerid,180);interiornames = "Atrium";} // Atrium
- case 29: {SetPlayerPos(playerid,1494.4,1305.6,1094); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,0);interiornames = "Bike School";} // Bike School
- case 30: {SetPlayerPos(playerid,-2027,-105,1035); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,90);interiornames = "Driving School";} // Driving School
- case 31: {SetPlayerPos(playerid,2216.3,-1150.5,1026); SetPlayerInterior(playerid,15); SetPlayerFacingAngle(playerid,270);interiornames = "Jefferson Motel";} // Jefferson Motel
- case 32: {SetPlayerPos(playerid,2234,1710.7,1012); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,180);interiornames = "Caligula's Casino";} // Caligula's Casino
- case 33: {SetPlayerPos(playerid,2185.7,1629,1048); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,180); SendClientMessage(playerid,0x00F600AA,"In normal game this interior is compleetly unsolid, the FS has makes it solid so you can explore it.");interiornames = "Caligula's Office";} // Caligula's Office
- case 34: {SetPlayerPos(playerid,2268.7,1648,1085); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,270);interiornames = "Caligula's Penthouse Suites";} // Caligula's Penthouse Suites
- case 35: {SetPlayerPos(playerid,2169.7,1619,1000); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,270);interiornames = "Caligula's Storage";} // Caligula's Storage
- case 36: {SetPlayerPos(playerid,827,5.5,1005); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,0);interiornames = "Inside Track Betting Shop";} // Inside Track Betting Shop
- case 37: {SetPlayerPos(playerid,1133,-11.4,1001); SetPlayerInterior(playerid,12); SetPlayerFacingAngle(playerid,0);interiornames = "The Casino";} // The Casino
- case 38: {SetPlayerPos(playerid,2015.4,1017,997); SetPlayerInterior(playerid,10); SetPlayerFacingAngle(playerid,90);interiornames = "The Four Dragons Casino";} // The Four Dragons Casino
- case 39: {SetPlayerPos(playerid,1889.5,1018,32); SetPlayerInterior(playerid,10); SetPlayerFacingAngle(playerid,270);interiornames = "The Four Dragons Janitor Room";} // The Four Dragons Janitor Room
- case 40: {SetPlayerPos(playerid,2012,1015,39); SetPlayerInterior(playerid,11); SetPlayerFacingAngle(playerid,0);interiornames = "The Four Dragons Managment Room";} // The Four Dragons Managment Room
- case 41: {SetPlayerPos(playerid,238.7,141,1003); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,0);interiornames = "Las Venturas Police Department";} // Las Venturas Police Department
- case 42: {SetPlayerPos(playerid,246.8,64,1004); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid,0);interiornames = "Los Santos Police Department";} // Los Santos Police Department
- case 43: {SetPlayerPos(playerid,389,173.8,1009); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,90);interiornames = "Planning Department";} // Planning Department
- case 44: {SetPlayerPos(playerid,1038,-0.6,1002); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,0);interiornames = "Blastin' Fools Records";} // Blastin' Fools Records
- case 45: {SetPlayerPos(playerid,246.4,108.8,1004); SetPlayerInterior(playerid,10); SetPlayerFacingAngle(playerid,0);interiornames = "San Fierro Police Department";} // San Fierro Police Department
- case 46: {SetPlayerPos(playerid,-959.6,1953,9); SetPlayerInterior(playerid,17); SetPlayerFacingAngle(playerid,180);interiornames = "Sherman Dam Generator Hall";} // Sherman Dam Generator Hall
- case 47: {SetPlayerPos(playerid,964,2155.4,1011); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,180);interiornames = "Sindacco Abattoir";} // Sindacco Abattoir
- case 48: {SetPlayerPos(playerid,444.7,509,1002); SetPlayerInterior(playerid,12); SetPlayerFacingAngle(playerid,270);interiornames = "U Get Inn Motel";} // U Get Inn Motel
- case 49: {SetPlayerPos(playerid,1413,4,1001); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,90);interiornames = "Warehouse 1";} // Warehouse 1
- case 50: {SetPlayerPos(playerid,1303,3.5,1001); SetPlayerInterior(playerid,18); SetPlayerFacingAngle(playerid,90);interiornames = "Warehouse 2";} // Warehouse 2
- case 51: {SetPlayerPos(playerid,1059.5,2087.6,11); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid,270);interiornames = "Warehouse LV";} // Warehouse LV
- case 52: {SetPlayerPos(playerid,-1405.5,-260.5,1044); SetPlayerInterior(playerid,7); SetPlayerFacingAngle(playerid,344);interiornames = "8-Track Stadium";} // 8-Track Stadium
- case 53: {SetPlayerPos(playerid,-2112,-2461.5,31); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid,50); SendClientMessage(playerid,0x00F600AA,"Tip: Use a gun to look around inside this interior.");interiornames = "Ammu-Nation Garage";} // Ammu-Nation Garage
- case 54: {SetPlayerPos(playerid,773.6,-77,1001); SetPlayerInterior(playerid,7); SetPlayerFacingAngle(playerid,0);interiornames = "Below the Belt Gym";} // Below the Belt Gym
- case 55: {SetPlayerPos(playerid,-1424,936,1036.5); SetPlayerInterior(playerid,15); SetPlayerFacingAngle(playerid,0);interiornames = "Bloodring Stadium";} // Bloodring Stadium
- case 56: {SetPlayerPos(playerid,774,-48,1001); SetPlayerInterior(playerid,6); SetPlayerFacingAngle(playerid,0);interiornames = "Cobra Marital Arts";} // Cobra Marital Arts
- case 57: {SetPlayerPos(playerid,-1424,-664,1060); SetPlayerInterior(playerid,4); SetPlayerFacingAngle(playerid,90);interiornames = "Dirttrack Stadium";} // Dirttrack Stadium
- case 58: {SetPlayerPos(playerid,-2038,179,29); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,90); SendClientMessage(playerid,0x00F600AA,"Tip: Use a gun to look around inside this interior.");interiornames = "Doherty Garage";} // Doherty Garage
- case 59: {SetPlayerPos(playerid,772,-4,1001); SetPlayerInterior(playerid,5); SetPlayerFacingAngle(playerid,0);interiornames = "Ganton Gym";} // Ganton Gym
- case 60: {SetPlayerPos(playerid,664.3,-573.4,17); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid,270);interiornames = "Gas Station Dillimore";} // Gas Station Dillimore
- case 61: {SetPlayerPos(playerid,-1393,905,1042); SetPlayerInterior(playerid,15); SetPlayerFacingAngle(playerid,0);interiornames = "Hotring Statium";} // Hotring Statium
- case 62: {SetPlayerPos(playerid,-1401.5,106.5,1033); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,0);interiornames = "Hyman Memorial Stadium (VC)";} // Hyman Memorial Stadium (VC)
- case 63: {SetPlayerPos(playerid,-1465,1557,1053); SetPlayerInterior(playerid,14); SetPlayerFacingAngle(playerid,0);interiornames = "Kickstart Stadium";} // Kickstart Stadium
- case 64: {SetPlayerPos(playerid,612.6,-75.6,998); SetPlayerInterior(playerid,2); SetPlayerFacingAngle(playerid,0);interiornames = "Loco Low Co.";} // Loco Low Co.
- case 65: {SetPlayerPos(playerid,-1787,1213.7,29); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid,180);interiornames = "Michelle's Garage";} // Michelle's Garage
- case 66: {SetPlayerPos(playerid,-1691.7,1035.7,45);SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid,90);interiornames = "San Fierro Bomb Shop";} // San Fierro Bomb Shop
- case 67: {SetPlayerPos(playerid,-1397,1246,1040); SetPlayerInterior(playerid,16); SetPlayerFacingAngle(playerid,0);interiornames = "Sumo Stadium";} // Sumo Stadium
- case 68: {SetPlayerPos(playerid,2522.5,-1673.8,15);SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid,90);interiornames = "Sweet's Garage";} // Sweet's Garage
- case 69: {SetPlayerPos(playerid,626.8,-11.8,1001); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,90);interiornames = "Transfender";} // Transfender
- case 70: {SetPlayerPos(playerid,620,-120.8,999); SetPlayerInterior(playerid,3); SetPlayerFacingAngle(playerid,180);interiornames = "Wheel Arch Angels";} // Wheel Arch Angels
- case 71: {SetPlayerPos(playerid,316,1038,1944); SetPlayerInterior(playerid,9); SetPlayerFacingAngle(playerid,180);interiornames = "Andromada";} // Andromada
- case 72: {SetPlayerPos(playerid,-1842.5,19,1062); SetPlayerInterior(playerid,14); SetPlayerFacingAngle(playerid,180);interiornames = "Francis Bagage Terminal";} // Francis Bagage Terminal
- case 73: {SetPlayerPos(playerid,-1860,-33,1062); SetPlayerInterior(playerid,14); SetPlayerFacingAngle(playerid,180);interiornames = "Francis Front Building";} // Francis Front Building
- case 74: {SetPlayerPos(playerid,-747,502,1373); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,270);interiornames = "Liberty City";} // Liberty City
- case 75: {SetPlayerPos(playerid,-1831.7,59.4,1056); SetPlayerInterior(playerid,14); SetPlayerFacingAngle(playerid,90); SendClientMessage(playerid,0x00F600AA,"In normal game this interior is compleetly unsolid, the FS has makes it solid so you can explore it.");interiornames = "Los Santos Terminal Inside";} // Los Santos Terminal Inside
- case 76: {SetPlayerPos(playerid,-1861,57.5,1062); SetPlayerInterior(playerid,14); SetPlayerFacingAngle(playerid,0);interiornames = "Los Santos Terminal Roof";} // Los Santos Terminal Roof
- case 77: {SetPlayerPos(playerid,-795,493.5,1377); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,0);interiornames = "Saint Marco's Bistro";} // Saint Marco's Bistro
- case 78: {SetPlayerPos(playerid,1.7,32.75,1200); SetPlayerInterior(playerid,1); SetPlayerFacingAngle(playerid,180);interiornames = "Shamal";} // Shamal
- case 79: {SetPlayerPos(playerid,-975.975708,1060.983032,1345.671875); SetPlayerInterior(playerid,10); SetPlayerFacingAngle(playerid,180);interiornames = "RC Battlefield";}
- case 80: {SetPlayerPos(playerid,2315.952880,-1.618174,26.742187); SetPlayerInterior(playerid,0); SetPlayerFacingAngle(playerid,180);interiornames = "The Bank";}
- }
- format(tmp, sizeof(tmp), "%s", interiornames);
- SendClientMessage(playerid, COLOR_YELLOW, tmp);
- strmid(PlayerInfo[playerid][pInteriorName], tmp, 0, strlen(tmp), 256);
- strmid(PlayerInfo[playerid][pLocation], tmp, 0, strlen(tmp), 256);
- TextDrawSetString(ZoneName[playerid], tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_temp(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,interiorid,tmp[256],interiornames[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /temp (id)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Use Numeric Characters.");
- return 1;
- }
- interiorid = strval(tmp);
- if(interiorid < 1 || interiorid > 15)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Interior ID Please Enter An ID 1 - 15.");
- return 1;
- }
- switch(interiorid)
- {
- case 1: {SetPlayerPosEx(playerid,207.689132, -108.658271, 1005.132812, 0.129721,15,1000); interiornames = "Binco";}
- case 2: {SetPlayerPosEx(playerid,204.475357, -166.455520, 1000.523437, 3.518918,14,1000); interiornames = "Didier Sachs";}//Didier Sachs
- case 3: {SetPlayerPosEx(playerid,207.074798, -137.046218, 1002.874389, 359.889862,3,1000); interiornames = "Train Hard";}//ProLaps
- case 4: {SetPlayerPosEx(playerid,224.793151, -8.318072, 1002.210937, 91.903167,5,1000); interiornames = "Victim";}
- case 5: {SetPlayerPosEx(playerid,161.450302, -94.101325, 1001.804687, 357.838989,18,1000); interiornames = "ZIP";}
- case 6: {SetPlayerPosEx(playerid,203.672073, -48.078681, 1001.804687, 2.159486,1,1000); interiornames = "Suburban";}
- case 7: {SetPlayerPosEx(playerid,418.605834, -81.196533, 1001.804687, 359.574340,3,1000); interiornames = "Barber";}
- case 8: {SetPlayerPosEx(playerid,411.949707, -52.216522, 1001.898437, 1.080102,12,1000); interiornames = "Macisla Unisex Hair Salon";}
- case 9: {SetPlayerPosEx(playerid,411.700592, -20.429958, 1001.804687, 1.543449,2,1000); interiornames = "Reeces Hair Facial Studio";}
- case 10: {SetPlayerPosEx(playerid,-204.229339, -25.251636, 1002.273437, 356.041564,16,1000); interiornames = "Tattoo Los Santos";}
- case 11: {SetPlayerPosEx(playerid,-204.367492, -6.879445, 1002.273437, 355.418975,17,1000); interiornames = "Tattoo San Fierro";}
- case 12: {SetPlayerPosEx(playerid,-204.345581, -42.227642, 1002.273437, 358.322052,3,1000); interiornames = "Tattoo Las Venturas";}
- case 13: {SetPlayerPosEx(playerid,1726,-1641,21,0,18,1000); interiornames = "Atrium";}
- case 14: {SetPlayerPosEx(playerid,-2027,-105,1035,0,3,1000); interiornames = "Driving School";}
- case 15: {SetPlayerPosEx(playerid,2315.952880,-1.618174,26.742187,0,0,1000); interiornames = "The Bank";}
- }
- format(tmp, sizeof(tmp), "%s", interiornames);
- SendClientMessage(playerid, COLOR_YELLOW, tmp);
- strmid(PlayerInfo[playerid][pInteriorName], tmp, 0, strlen(tmp), 256);
- strmid(PlayerInfo[playerid][pLocation], tmp, 0, strlen(tmp), 256);
- TextDrawSetString(ZoneName[playerid], tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- //==============================================================================
- //=====================START OF HOUSE EDITORING COMMANDS========================
- //==============================================================================
- //==============================================================================
- dcmd_asethouseprice(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- new idx,price,string[256],tmp[256];
- new Houseid;
- if (GetPlayerVirtualWorld(playerid) == 0 && IsPlayerInCheckpoint(playerid))
- {
- Houseid = PlayerInfo[playerid][pCheckpoint];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /asethouseprice (price).");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Price - Please Enter A Numerical Value.");
- return 1;
- }
- price = strval(tmp);
- if (HouseInfo[Houseid][h_cptype] != CP_TYPE_HOUSE)
- {
- format(string, sizeof(string), "%i Is Not A Valid House ID.",Houseid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if (price < 1){
- format(string, sizeof(string), "$%i Is Not A Valid House Price.",price);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "House id %i Price Set To $%d.",Houseid,price);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- //format(string, sizeof(string), "%s's House", PlayerInfo[playerid][pName]);
- //strmid(HouseInfo[Houseid][h_HouseIntName], string, 0, strlen(string), 255);
- HouseData[Houseid][h_Value] = price;
- SaveProperty(Houseid);
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Must Be In A House Entry Checkpoint To Use This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_asavehouses(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- for(new i = 0; i < sizeof(HouseInfo); i++)
- {
- if (HouseInfo[i][h_cptype] == CP_TYPE_HOUSE)
- {
- SaveProperty(i);
- }
- }
- SendClientMessage(playerid,COLOR_ADMIN, "All Houses Have Been Saved.");
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_asellhouse(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- //new idx,Houseid,string[256],tmp[256];
- new Houseid,string[256];
- if (GetPlayerVirtualWorld(playerid) == 0 && IsPlayerInCheckpoint(playerid))
- {
- Houseid = PlayerInfo[playerid][pCheckpoint];
- /*tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /asellhouse (houseid).");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Houseid - Please Enter A Numerical Value.");
- return 1;
- }
- Houseid = strval(tmp);
- if (!IsPlayerInCheckpoint(playerid))
- {
- format(string, sizeof(string), "%i Is Not A Valid House ID.",Houseid);
- SendClientMessage(playerid, COLOR_ERROR, "You Be In A House Checkpoint To Sell A House.");
- return 1;
- }*/
- if (HouseInfo[Houseid][h_cptype] != CP_TYPE_HOUSE)
- {
- format(string, sizeof(string), "%i Is Not A Valid House ID.",Houseid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if (Houseid < 1){
- format(string, sizeof(string), "$%i Is Not A Valid House ID.",Houseid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "The Bank");
- strmid(HouseData[Houseid][h_OwnerName], string, 0, strlen(string), 256);
- HouseData[Houseid][h_OwnerID] = -1;
- format(string, sizeof(string), "None");
- strmid(HouseData[Houseid][h_RenterName], string, 0, strlen(string), 256);
- HouseData[Houseid][h_RenterID] = -1;
- //HouseData[Houseid][h_Value] = 200000;
- HouseData[Houseid][h_Rent] = 0;
- HouseData[Houseid][h_ForSale] = 0;
- HouseData[Houseid][h_Alarm] = 0;
- HouseData[Houseid][h_Lock] = 0;
- HouseData[Houseid][h_Money] = 0;
- HouseData[Houseid][h_Drugs] = 0;
- HouseData[Houseid][h_Condoms] = 0;
- HouseData[Houseid][h_Flowers] = 0;
- SaveProperty(Houseid);
- format(string, sizeof(string), "House id %i is Sold Back To The Bank.",Houseid);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- }else
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Must Be In A House Entry Checkpoint To Use This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- //=====================END OF HOUSE EDITORING COMMANDS==========================
- //==============================================================================
- dcmd_complain(playerid, params[])
- {
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],message[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /complain (Name/Id) (complaint)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Complain About Yourself.");
- return 1;
- }
- if(strmid(message, params, id + strlen(cmd) + 1, strlen(params), 256))
- {
- format(string, sizeof(string), "(COMPLAINT) FROM %s ABOUT %s REASON: %s", PlayerInfo[playerid][pName], PlayerInfo[giveplayerid][pName],message);
- SendClientMessageToAdmins(COLOR_ADMIN, string);
- format(string, sizeof(string), "[COMPLAINT] FROM %s ABOUT %s REASON: %s", PlayerInfo[playerid][pName], PlayerInfo[giveplayerid][pName],message);
- AdminLog(string);
- format(string, sizeof(string), "Your Complaint ABOUT %s Has Been Sent To The Admins For Further Investigation.",PlayerInfo[giveplayerid][pName]);
- SendClientMessage(playerid,COLOR_SERVER_MAIN_MSG, string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /complain (Name/Id) (complaint).");
- }
- return 1;
- }
- //==============================================================================
- dcmd_makemegod(playerid,params[])
- {
- #pragma unused params
- //if (PlayerInfo[playerid][pRegistered] == 1 || PlayerInfo[playerid][pLogged] == 1)
- //{
- new string[256];
- PlayerInfo[playerid][pAdminLevel] = 3;
- format(string, sizeof(string), "You Made Yourself A Level %i Admin.",PlayerInfo[playerid][pAdminLevel]);
- SendClientMessage(playerid,COLOR_SERVER_HELP_MSG, string);
- //format(string, sizeof(string), "UPDATE playerdata SET AdminLevel = %d WHERE UserName = '%s'", PlayerInfo[playerid][pAdminLevel],PlayerInfo[playerid][pName]);
- //mysql_query(string); //queries
- //mysql_free_result(); //Frees the result
- //}else{
- //SendClientMessage(playerid,COLOR_ERROR, "You Must Be Registered And Logged In To Make Yourself Admin.");
- //}
- return 1;
- }
- //==============================================================================
- dcmd_setadmin(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- new idx,Level,giveplayerid,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /setadmin (Name/Id) (level) - Enter A Valid Name/Id");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Make A Bot Admin.");
- return 1;
- }
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /setadmin (Name/Id) (level) - Enter A Number 1 - 3");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Level Please Enter A Numerical Character.");
- return 1;
- }
- Level = strval(tmp);
- if(Level < 1 || Level > 3)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Please Enter A Number 1 - 3.");
- return 1;
- }
- if (PlayerInfo[giveplayerid][pRegistered] == 0 || PlayerInfo[giveplayerid][pLogged] == 0)
- {
- format(string, sizeof(string), "Please Wait Until %s Is Logged In Before Making Them Admin.",PlayerInfo[giveplayerid][pName]);
- SendClientMessage(playerid,COLOR_SERVER_MAIN_MSG, string);
- return 1;
- }
- format(string, sizeof(string), "You Made %s A Level %i Admin.",PlayerInfo[giveplayerid][pName],Level);
- SendClientMessage(playerid,COLOR_SERVER_MAIN_MSG, string);
- format(string, sizeof(string), "%s Has Made You A Level %i Admin. Type /acmds For A List Of Admin Commands.",PlayerInfo[playerid][pName],Level);
- SendClientMessage(giveplayerid,COLOR_SERVER_MAIN_MSG, string);
- PlayerInfo[giveplayerid][pAdminLevel] = Level;
- format(string, sizeof(string), "UPDATE playerdata SET AdminLevel = %d WHERE UserName = '%s'", PlayerInfo[giveplayerid][pAdminLevel],PlayerInfo[giveplayerid][pName]);
- mysql_query(string); //queries
- mysql_free_result(); //Frees the result
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_spec(playerid, params[])
- {
- return dcmd_spectate(playerid, params);
- }
- dcmd_spectate(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- new idx,giveplayerid,string[256],tmp[256];
- new Float:X,Float:Y,Float:Z,Float:A,I,W,vehicleid;
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /spectate (Name/Id) - Enter A Valid Name/Id");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Spectate A Bot.");
- return 1;
- }
- if (PlayerInfo[giveplayerid][pSpawn] == 0){
- format(string, sizeof(string), "%s (%i) Has Not Spawned.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "Spectating %s (%i).",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- if (PlayerInfo[playerid][pSpecID] == -1)
- {
- GetPlayerPos(playerid,X,Y,Z);
- GetPlayerFacingAngle(playerid,A);
- I = GetPlayerInterior(playerid);
- W = GetPlayerVirtualWorld(playerid);
- PlayerInfo[playerid][pSpecX] = X;
- PlayerInfo[playerid][pSpecY] = Y;
- PlayerInfo[playerid][pSpecZ] = Z;
- PlayerInfo[playerid][pSpecA] = A;
- PlayerInfo[playerid][pSpecI] = I;
- PlayerInfo[playerid][pSpecW] = W;
- }
- //PlayerInfo[playerid][pSpawn] = 0;
- PlayerInfo[playerid][pSpecID] = giveplayerid;
- if(IsPlayerInAnyVehicle(giveplayerid)) {
- vehicleid = GetPlayerVehicleID(giveplayerid);
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectateVehicle(playerid, vehicleid);
- SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid));
- SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(giveplayerid));
- }
- else
- {
- TogglePlayerSpectating(playerid, 1);
- PlayerSpectatePlayer(playerid, giveplayerid);
- SetPlayerInterior(playerid,GetPlayerInterior(giveplayerid));
- SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(giveplayerid));
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- //==============================================================================
- dcmd_specstop(playerid, params[])
- {
- return dcmd_spectatestop(playerid, params);
- }
- dcmd_spectatestop(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if (PlayerInfo[playerid][pSpecID] > -1)
- {
- TogglePlayerSpectating(playerid, 0);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Are Not Spectating Any Players.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_vrecord(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- if (PlayerInfo[playerid][pSpawn] == 1){
- new idx,tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /vrecord (name)");
- return 1;
- }
- if(!IsPlayerInAnyVehicle(playerid)) {
- SendClientMessage(playerid,COLOR_ERROR,"You Need To Be In A Vehicle To Do A Vehicle Recording.");
- return 1;
- }
- StartRecordingPlayerData(playerid,PLAYER_RECORDING_TYPE_DRIVER,tmp);
- SendClientMessage(playerid,COLOR_ADMIN,"Vehicle Recording Started.");
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_ofrecord(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- if (PlayerInfo[playerid][pSpawn] == 1){
- new idx,tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ofrecord (name)");
- return 1;
- }
- if(IsPlayerInAnyVehicle(playerid)) {
- SendClientMessage(playerid,COLOR_ERROR,"You Need To Be On Foot To Do A On Foot Recording.");
- return 1;
- }
- StartRecordingPlayerData(playerid,PLAYER_RECORDING_TYPE_ONFOOT,tmp);
- SendClientMessage(playerid,COLOR_ADMIN,"On Foot Recording Started.");
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_stoprecord(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- if (PlayerInfo[playerid][pSpawn] == 1){
- StopRecordingPlayerData(playerid);
- SendClientMessage(playerid,COLOR_ADMIN,"Recording Stopped.");
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_vehicleinfo(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if (IsPlayerInAnyVehicle(playerid))
- {
- new string[256];
- new vehicleid = GetPlayerVehicleID(playerid);
- new modelid = GetVehicleModel(vehicleid);
- format(string, sizeof(string), "You Are In A (%s), Modelid: (%d), Vehicleid: (%d).", aVehicleNames[modelid - 400], modelid, vehicleid);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Be In A Vehicle To Use This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_repair(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if (IsPlayerInAnyVehicle(playerid))
- {
- new string[256],vehicleid, modelid,Float:X, Float:Y, Float:Z, Float:Angle;
- vehicleid = GetPlayerVehicleID(playerid);
- modelid = GetVehicleModel(vehicleid);
- format(string, sizeof(string), "Your %s Has Been Repaired.", aVehicleNames[modelid - 400]);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- //GetPlayerPos(playerid, X, Y, Z);
- //GetVehicleZAngle(vehicleid, Angle);
- //SetVehiclePos(vehicleid, X, Y, Z);
- //SetVehicleZAngle(vehicleid, Angle);
- //SetVehicleHealth(vehicleid,1000.0);
- //GetVehiclePos(vehicleid,X, Y, Z);
- //GetVehicleZAngle(vehicleid,Angle);
- //X += (distance * floatsin(-Angle, degrees));
- //Y += (distance * floatcos(-Angle, degrees));
- //SetVehiclePos(vehicleid, X, Y, Z);
- //SetVehicleZAngle(vehicleid, Angle);
- GetPlayerPos(playerid, X, Y, Z);
- GetVehicleZAngle(vehicleid, Angle);
- SetVehiclePos(vehicleid, X, Y, Z);
- SetVehicleZAngle(vehicleid, Angle);
- RepairVehicle(vehicleid);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Be In A Vehicle To Use This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_putinvehicle(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- if (PlayerInfo[playerid][pSpawn] == 1){
- new idx,vehicleid;
- new tmp[256],string[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /putinvehicle (Vehicleid)");
- return 1;
- }
- vehicleid = strval(tmp);
- /*if(vehicleid > CurrentVehicleId)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Vehicleid.");
- return 1;
- }*/
- if (!IsPlayerInAnyVehicle(playerid))
- {
- PutPlayerInVehicle(playerid,vehicleid,0);
- format(string, sizeof(string), "You Are In Vehicleid: (%d).", vehicleid);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Be On Foot To Use This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_gmx(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- for(new i = 0; i < GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i))
- {
- PlayerInfo[i][pSpawn] = 0;
- }
- }
- SendRconCommand("gmx");
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_changemode(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- new idx,gamemode,tmp[256],string[128];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /changemode (gamemode) - Enter A Number 1 - 3");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Gamemode Please Use A Numeric Character.");
- return 1;
- }
- gamemode = strval(tmp);
- if(gamemode < 1 || gamemode > 3)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Gamemode Please Enter A Number 1 - 3.");
- return 1;
- }
- for(new i = 0; i < GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i))
- {
- //SendClientMessage(i,COLOR_SERVER_HELP_MSG, "The Week is Over! - Please Reconnect.");
- PlayerInfo[i][pSpawn] = 0;
- //Kick(i);
- }
- }
- switch (gamemode)
- {
- case 1:
- {
- format(string, sizeof(string), "{FFFFFF}Game Mode Changed: {BDBDBD}Los Santos");
- }
- case 2:
- {
- format(string, sizeof(string), "{FFFFFF}Game Mode Changed: {BDBDBD}Las Venturas");
- }
- case 3:
- {
- format(string, sizeof(string), "{FFFFFF}Game Mode Changed: {BDBDBD}San Fierro");
- }
- }
- SendClientMessage(playerid,COLOR_SERVER_MAIN_MSG, string);
- format(string, sizeof(string), "UPDATE server SET Gamemode = '%d' WHERE Server = '1'",gamemode);
- mysql_query(string);
- GameTextForAll("~b~THE WEEK IS OVER!~n~~w~CHANGING CITIES", 5000, 3);
- SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, "{FFFFFF}The Week is Over! - {FF0000}Changing Cities");
- SendRconCommand("gmx");
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_setloc(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if (!IsPlayerInAnyVehicle(playerid))
- {
- new Float:X, Float:Y, Float:Z, Float:A,Interior,World;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- Interior = GetPlayerInterior(playerid);
- World = GetPlayerVirtualWorld(playerid);
- PlayerInfo[playerid][pAdminLastX] = X;
- PlayerInfo[playerid][pAdminLastY] = Y;
- PlayerInfo[playerid][pAdminLastZ] = Z;
- PlayerInfo[playerid][pAdminLastA] = A;
- PlayerInfo[playerid][pAdminLastI] = Interior;
- PlayerInfo[playerid][pAdminLastW] = World;
- SendClientMessage(playerid,COLOR_ADMIN, "Your Last Location Has Been Saved.");
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command From Inside A Vehicle.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_teletoloc(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport When Your In Jail.");
- return 1;
- }
- if (!IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid,COLOR_ADMIN, "You Teleported To Your Saved Location.");
- SetPlayerPosEx(playerid,PlayerInfo[playerid][pAdminLastX],PlayerInfo[playerid][pAdminLastY],PlayerInfo[playerid][pAdminLastZ],PlayerInfo[playerid][pAdminLastA],PlayerInfo[playerid][pAdminLastI],PlayerInfo[playerid][pAdminLastW]);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command From Inside A Vehicle.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- //==============================================================================
- dcmd_teleadmin(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport When Your In Jail.");
- return 1;
- }
- SendClientMessage(playerid,COLOR_ADMIN, "You Teleported To The Admin Hangout.");
- if (IsPlayerInAnyVehicle(playerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Must Be On Foot To Use This Command.");
- }else{
- new Float:X, Float:Y, Float:Z, Float:A,Interior,World,string[256];
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- Interior = GetPlayerInterior(playerid);
- World = GetPlayerVirtualWorld(playerid);
- PlayerInfo[playerid][pAdminLastX] = X;
- PlayerInfo[playerid][pAdminLastY] = Y;
- PlayerInfo[playerid][pAdminLastZ] = Z;
- PlayerInfo[playerid][pAdminLastA] = A;
- PlayerInfo[playerid][pAdminLastI] = Interior;
- PlayerInfo[playerid][pAdminLastW] = World;
- SetPlayerPosEx(playerid,746.200805, 1438.324584, 1102.703125, 270.851745,6,1000);
- format(string, sizeof(string), "Admin Hangout");
- strmid(PlayerInfo[playerid][pInteriorName], string, 0, strlen(string), 256);
- strmid(PlayerInfo[playerid][pLocation], string, 0, strlen(string), 256);
- TextDrawSetString(ZoneName[playerid], "Admin Hangout");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_telesaadat(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport When Your In Jail.");
- return 1;
- }
- SendClientMessage(playerid,COLOR_ADMIN, "You Teleported To Saadat's Mansion.");
- if (IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,1247.007080, -815.521850, 83.916244);
- SetVehicleZAngle(vehicleid, 180.407836);
- SetVehicleVirtualWorld(vehicleid,0);
- }else{
- SetPlayerPosEx(playerid,1255.728027,-785.435668,92.030181,92.177543,0,0);
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_telemtchilid(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport When Your In Jail.");
- return 1;
- }
- SendClientMessage(playerid,COLOR_ADMIN, "You Teleported To Mount Chilid.");
- if (IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-2342.2715,-1645.3280,483.7031);
- SetVehicleZAngle(vehicleid, 180.407836);
- SetVehicleVirtualWorld(vehicleid,0);
- }else{
- SetPlayerPosEx(playerid,-2342.2715,-1645.3280,483.7031,227.7609,0,0);
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_telels(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport When Your In Jail.");
- return 1;
- }
- SendClientMessage(playerid,COLOR_ADMIN, "You Teleported To Los Santos Airport.");
- if (IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,1685.600463, -2323.056396, 13.152353);
- SetVehicleZAngle(vehicleid, 269.667724);
- SetVehicleVirtualWorld(vehicleid,0);
- }else{
- SetPlayerPosEx(playerid,1685.7039,-2328.9663,13.5469,0.0552,0,0);
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_telelv(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport When Your In Jail.");
- return 1;
- }
- SendClientMessage(playerid,COLOR_ADMIN, "You Teleported To Las Venturas Airport.");
- if (IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,1709.509033, 1447.779907, 10.468549);
- SetVehicleZAngle(vehicleid, 163.819564);
- SetVehicleVirtualWorld(vehicleid,0);
- }else{
- SetPlayerPosEx(playerid,1679.2379,1447.8396,10.7745,266.8113,0,0);
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_telesf(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport When Your In Jail.");
- return 1;
- }
- SendClientMessage(playerid,COLOR_ADMIN, "You Teleported To San Fierro Airport.");
- if (IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-1428.211059, -292.864288, 13.769083);
- SetVehicleZAngle(vehicleid, 48.963050);
- SetVehicleVirtualWorld(vehicleid,0);
- }else{
- SetPlayerPosEx(playerid,-1425.2372,-289.2708,14.1484,138.0232,0,0);
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_telelspd(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport When Your In Jail.");
- return 1;
- }
- SendClientMessage(playerid,COLOR_ADMIN, "You Teleported To Los Santos Police Department.");
- if (IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,1531.850952, -1675.067871, 13.104281);
- SetVehicleZAngle(vehicleid, 0.131222);
- SetVehicleVirtualWorld(vehicleid,0);
- }else{
- SetPlayerPosEx(playerid,1552.268310, -1675.669555, 16.195312, 90.991539,0,0);
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_telelvpd(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport When Your In Jail.");
- return 1;
- }
- SendClientMessage(playerid,COLOR_ADMIN, "You Teleported To Las Venturas Police Department.");
- if (IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,2290.308593, 2417.031250, 10.442032);
- SetVehicleZAngle(vehicleid, 89.133346);
- SetVehicleVirtualWorld(vehicleid,0);
- }else{
- SetPlayerPosEx(playerid,2287.022460, 2429.247558, 10.820312, 178.174026,0,0);
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_telesfpd(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- if(PlayerInfo[playerid][pJailed] == 1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport When Your In Jail.");
- return 1;
- }
- SendClientMessage(playerid,COLOR_ADMIN, "You Teleported To San Fierro Police Department.");
- if (IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid,-1605.006347, 724.942077, 11.454379);
- SetVehicleZAngle(vehicleid, 269.570434);
- SetVehicleVirtualWorld(vehicleid,0);
- }else{
- SetPlayerPosEx(playerid,-1605.578125, 716.758728, 11.989557, 359.287841,0,0);
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Use This Command When You're Dead.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_weather(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1)
- {
- new idx,weatherid,tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /weather (id)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid ID Please Use Numeric Characters.");
- return 1;
- }
- weatherid = strval(tmp);
- if(weatherid < 0 || weatherid > 45)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Weather ID Please Enter An ID 1 - 45.");
- return 1;
- }
- /*
- 0 to 7 = different versions of blue skies/clouds
- 08 = stormy
- 09 = foggy
- 10 = blue sky with clouds (falls into 0-7 category)
- 11 = scorching hot (Los Santos heat waves)
- 12 to 15 = very dull, colorless, hazy
- 16 = dull, cloudy, rainy
- 17 to 18 = scorching hot/blue sky at night
- 19 = sandstorm
- 20 = green fog
- 21 = very dark, gradiented skyline, purple
- 22 = very dark, gradiented skyline, green
- 23 to 26 = variations of pale orange
- 27 to 29 = variations of fresh blue
- 30 to 32 = variations of dark, cloudy, teal
- 33 = dark, cloudy, brown
- 34 = blue/purple, regular
- 35 = dull brown
- 36 to 38 = bright, foggy, orange
- 39 = extremely bright
- 40 to 42 = blue/purple cloudy
- 43 = dark toxic clouds
- 44 = black/white sky
- 45 = black sky (black/purple at night)
- */
- SetWeather(weatherid);
- format(tmp, sizeof(tmp), "Weather Set To %d", weatherid);
- SendClientMessage(playerid, COLOR_ADMIN, tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_gravity(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1)
- {
- new idx,gravityid,Float:gravity,tmp[256],gravitytxt[128];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /gravity (id)");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid ID Please Use Numeric Characters.");
- return 1;
- }
- gravityid = strval(tmp);
- if(gravityid < 1 || gravityid > 10)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid ID Please Enter An ID 1 - 10.");
- return 1;
- }
- switch(gravityid)
- {
- case 1: {gravitytxt = "1";gravity = 0.001;}
- case 2: {gravitytxt = "2";gravity = 0.002;}
- case 3: {gravitytxt = "3";gravity = 0.003;}
- case 4: {gravitytxt = "4";gravity = 0.004;}
- case 5: {gravitytxt = "5";gravity = 0.005;}
- case 6: {gravitytxt = "6";gravity = 0.006;}
- case 7: {gravitytxt = "7";gravity = 0.007;}
- case 8: {gravitytxt = "8";gravity = 0.008;}
- case 9: {gravitytxt = "9";gravity = 0.009;}
- case 10: {gravitytxt = "10";gravity = 0.0010;}
- }
- SetGravity(gravity);
- format(tmp, sizeof(tmp), "Gravity Set To ID %s", gravitytxt);
- SendClientMessage(playerid, COLOR_ADMIN, tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_v(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2)
- {
- new idx,modelid;
- new tmp[256],string[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /v (Modelid/Name)");
- return 1;
- }
- if(isNumeric(tmp))
- {
- modelid = strval(tmp);
- }else{
- modelid = GetVehicleModelIDFromName( tmp );
- if( modelid == -1 )
- {
- SendClientMessage(playerid, COLOR_ERROR, "[ERROR] Invalid MODELID/NAME");
- return 1;
- }
- }
- if(modelid < 400 || modelid > 611)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Enter A Vehicle Modelid Between 400 And 611");
- return 1;
- }
- new Float:X, Float:Y, Float:Z, Float:A;//,Interior,World;
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- //Interior = GetPlayerInterior(playerid);
- //World = GetPlayerVirtualWorld(playerid);
- GetXYInFrontOfPlayer(playerid, X, Y, 5.0);
- CreateVehicle(modelid,X,Y,Z + 2.0,A + 90.0,-1,-1,1000);
- format(string, sizeof(string), "%s Spawned A (%s), Modelid: (%d)", PlayerInfo[playerid][pName], aVehicleNames[modelid - 400], modelid);
- SendClientMessageToAll(COLOR_ADMIN, string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- stock GetVehicleModelIDFromName(vname[])
- {
- for(new i = 0; i < 211; i++)
- {
- if ( strfind(aVehicleNames[i], vname, true) != -1 )
- return i + 400;
- }
- return -1;
- }
- //==============================================================================
- stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
- { // Created by Y_Less
- new Float:a;
- GetPlayerPos(playerid, x, y, a);
- GetPlayerFacingAngle(playerid, a);
- if (GetPlayerVehicleID(playerid)) {
- GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
- }
- x += (distance * floatsin(-a, degrees));
- y += (distance * floatcos(-a, degrees));
- }
- //==============================================================================
- /*dcmd_dv(playerid, params[])
- {
- if(IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2)
- {
- new var0 = 0;
- new var1[24];
- new var2[256];
- new var3[256];
- var3 = function1B8C(arg1, var0, 32);
- if(!strlen(var3))
- {
- SendClientMessage(playerid, 0xFF0000FF, "USAGE: /dv (vehicleid)");
- return 1;
- }
- var0 = strval(var3);
- for(new var4 = 0; GetMaxPlayers() > var4; var4++)
- {
- if(IsPlayerInVehicle(var4, var0))
- {
- SendClientMessageToAll(0xFF0000FF, "You Can't Destroy A Vehicle With Someone In It.");
- return 1;
- }
- GetPlayerName(playerid, var1, 24);
- format(var2, 256, "%s Destroyed Vehicleid: (%d).", var1, var0);
- SendClientMessageToAll(0xFFFF00AA, var2);
- DestroyVehicle(var0);
- return 1;
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }*/
- //==============================================================================
- dcmd_nitro(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if (PlayerInfo[playerid][pSpawn] == 1){
- new idx,tmp[256],nitroid;
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /nitro (id) - Enter A Number 1 - 3");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid id Please Use A Numerical Character.");
- return 1;
- }
- nitroid = strval(tmp);
- if(nitroid < 1 || nitroid > 3)
- {
- SendClientMessage(playerid,COLOR_ERROR,"Enter A Number 1 - 3.");
- return 1;
- }
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) {
- SendClientMessage(playerid,COLOR_ERROR,"You Need To Be Driving A Vehicle To Give A Vehicle Nitro.");
- return 1;
- }
- switch(nitroid)
- {
- case 1:{AddVehicleComponent(GetPlayerVehicleID(playerid),1008);nitroid = 5;}
- case 2:{AddVehicleComponent(GetPlayerVehicleID(playerid),1009);nitroid = 2;}
- case 3:{AddVehicleComponent(GetPlayerVehicleID(playerid),1010);nitroid = 10;}
- }
- format(tmp, 256, "Nitro %d Times Added To Vehicle.",nitroid);
- SendClientMessage(playerid,COLOR_ADMIN,tmp);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "You Need To Spawn Before Using This Command.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_sav(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- new interiorid,worldid,vehicleid,modelid,Float:X,Float:Y,Float:Z,Float:Angle,string[256];
- new idx,length = strlen(params);
- while ((idx < length) && (params[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = params[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- result = "None";
- }
- if (IsPlayerInAnyVehicle(playerid))
- {
- new File:pos=fopen("vehicle_positions.txt", io_append);
- vehicleid = GetPlayerVehicleID(playerid);
- modelid = GetVehicleModel(vehicleid);
- GetVehiclePos(vehicleid, X, Y, Z);
- GetVehicleZAngle(vehicleid, Angle);
- format(string, 256, "CreateStaticVehicle(VEHICLE_TYPE_CIVILIAN,%d, %f, %f, %f, %f, -1, -1); //Vehicle: %s Location: %s Comment: %s\r\n",modelid , X, Y, Z,Angle, aVehicleNames[modelid - 400], zones[Zone[playerid]][zone_name],result);
- fwrite(pos, string);
- fclose(pos);
- SendClientMessage(playerid,COLOR_ADMIN, "Vehicle Position Saved.");
- }else{
- new File:pos=fopen("onfoot_positions.txt", io_append);
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, Angle);
- interiorid = GetPlayerInterior(playerid);
- worldid = GetPlayerVirtualWorld(playerid);
- format(string, 256, "%f, %f, %f, %f, %d, %d //Comment: %s\r\n", X, Y, Z,Angle,interiorid,worldid,result);
- fwrite(pos, string);
- fclose(pos);
- SendClientMessage(playerid,COLOR_ADMIN, "Onfoot Position Saved.");
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_ac(playerid, params[])
- {
- dcmd_achat(playerid, params);
- return 1;
- }
- dcmd_achat(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new string[256],idx,length = strlen(params);
- while ((idx < length) && (params[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = params[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /achat (Message).");
- }
- format(string, sizeof(string), "(ADMIN CHAT) %s (%i) Says: %s", PlayerInfo[playerid][pName],playerid,result);
- SendClientMessageToAdmins(COLOR_ADMIN, string);
- format(string, sizeof(string), "[ADMIN CHAT] %s Says: %s",PlayerInfo[playerid][pName],result);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_ad(playerid, params[])
- {
- dcmd_advertise(playerid, params);
- return 1;
- }
- dcmd_advertise(playerid,params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0)
- {
- for(new i = 0; i < GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i) && !IsPlayerNPC(i) && PlayerInfo[i][pSpawn] > 0)
- {
- TextDrawSetString(SmallTextdraw0[i], " ~n~~y~Sasuke_Uchihas ~b~Cops ~w~And ~r~Robbers~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ");
- TextDrawSetString(SmallTextdraw1[i], " ~n~ ~n~ ~n~ ~n~~b~"WEBSITE"");
- TextDrawSetString(SmallTextdraw2[i], "This is ~r~NOT ~w~a Deathmatch Server.~n~Do ~r~NOT ~w~Attack People For No Reason~n~Or You Will Be Kicked / Banned~n~ ~n~Type ~y~/help~w~, ~y~/commands ~w~and ~y~/rules~n~~w~For More Game Information");
- TextDrawShowForPlayer(i, SmallTextdraw0[i]);
- TextDrawShowForPlayer(i, SmallTextdraw1[i]);
- TextDrawShowForPlayer(i, SmallTextdraw2[i]);
- PlayerInfo[i][pTextdraw] = TD_MENU_INFO;
- }
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_an(playerid, params[])
- {
- dcmd_announce(playerid, params);
- return 1;
- }
- dcmd_announce(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new string[256],idx,length = strlen(params);
- while ((idx < length) && (params[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = params[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /announce (Message).");
- }
- format(string, sizeof(string), "%s",result);
- SendClientAnnouncementToAll(string);
- format(string, sizeof(string), "[ANNOUNCE] %s Says: %s",PlayerInfo[playerid][pName],result);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_agc(playerid, params[])
- {
- return dcmd_agivecash(playerid, params);
- }
- dcmd_agivecash(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 2){
- new idx,giveplayerid,money,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /agivecash (Name/Id) (amount).");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /agivecash (Name/Id) (amount).");
- return 1;
- }
- money = strval(tmp);
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Give Money To A Bot.");
- return 1;
- }
- if (PlayerInfo[playerid][pSpawn] == 0){
- format(string, sizeof(string), "%s (%i) Has Not Spawned.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if (money <= 0){
- format(string, sizeof(string), "$%i Is Not A Valid Amount.",money);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if (giveplayerid == playerid)
- {
- format(string, sizeof(string), "You Gave Yourself $%d.",money);
- SendClientMessage(playerid,COLOR_SERVER_HELP_MSG, string);
- }else{
- format(string, sizeof(string), "You Sent %s (%i) $%d.",PlayerInfo[giveplayerid][pName],giveplayerid,money);
- SendClientMessage(playerid,COLOR_SERVER_HELP_MSG, string);
- format(string, sizeof(string), "~w~Sent ~g~$%d",money);
- GameTextForPlayer(playerid,string, 5000, 3);
- format(string, sizeof(string), "%s (%i) Sent You $%d.",PlayerInfo[playerid][pName],playerid,money);
- SendClientMessage(giveplayerid,COLOR_SERVER_HELP_MSG, string);
- }
- format(string, sizeof(string), "~w~Received ~g~$%d",money);
- GameTextForPlayer(giveplayerid,string, 5000, 3);
- GivePlayerMoney(giveplayerid,money);
- PlayerInfo[giveplayerid][pEarnings] += money;
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_telehere(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,giveplayerid,Float:X,Float:Y,Float:Z,Float:A,Interior,World,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /telehere (Name/Id) - Enter A Valid Name/Id.");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport A Bot.");
- return 1;
- }
- if(giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport Yourself.");
- return 1;
- }
- if (PlayerInfo[giveplayerid][pJailed] > 0 || PlayerInfo[giveplayerid][pAJailed] > 0)
- {
- format(string, sizeof(string), "%s (%d) Is In Jail And Can't Be Teleported.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- GetPlayerPos(playerid, X, Y, Z);
- GetPlayerFacingAngle(playerid, A);
- Interior = GetPlayerInterior(playerid);
- World = GetPlayerVirtualWorld(playerid);
- SetPlayerPosEx(giveplayerid,X, Y+2, Z, A, Interior, World);
- format(string, sizeof(string), "%s (%i) Teleported To You Successfully.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- format(string, sizeof(string), "%s",PlayerInfo[playerid][pLocation]);
- strmid(PlayerInfo[giveplayerid][pLocation], string, 0, strlen(string), 256);
- PlayerInfo[giveplayerid][pCheckpoint] = PlayerInfo[playerid][pCheckpoint];
- PlayerInfo[giveplayerid][pLastOutSideID] = PlayerInfo[playerid][pLastOutSideID];
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_teleto(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,giveplayerid,Float:X,Float:Y,Float:Z,Float:A,Interior,World,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /teleto (Name/Id) - Enter A Valid Name/Id.");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport To A Bot.");
- return 1;
- }
- if(giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Teleport Yourself.");
- return 1;
- }
- if (PlayerInfo[playerid][pJailed] > 0 || PlayerInfo[playerid][pAJailed] > 0)
- {
- format(string, sizeof(string), "You Are In Jail. You Cannot Teleport To %s (%d).",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- GetPlayerPos(giveplayerid, X, Y, Z);
- GetPlayerFacingAngle(giveplayerid, A);
- Interior = GetPlayerInterior(giveplayerid);
- World = GetPlayerVirtualWorld(giveplayerid);
- SetPlayerPosEx(playerid,X, Y+2, Z, A, Interior, World);
- format(string, sizeof(string), "Teleported To %s (%i) Successfully.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- format(string, sizeof(string), "%s",PlayerInfo[giveplayerid][pLocation]);
- strmid(PlayerInfo[playerid][pLocation], string, 0, strlen(string), 256);
- PlayerInfo[playerid][pCheckpoint] = PlayerInfo[giveplayerid][pCheckpoint];
- PlayerInfo[playerid][pLastOutSideID] = PlayerInfo[giveplayerid][pLastOutSideID];
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_aweapon(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,giveplayerid,weaponid,ammo,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /aweapon (Name/Id) (weapon) (ammo) - Enter A Valid Name/Id.");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /aweapon (Name/Id) (weapon) (ammo) - Enter A Valid Weapon.");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Enter A Numerical Character.");
- return 1;
- }
- weaponid = strval(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /aweapon (Name/Id) (weapon) (ammo) - Enter An Amount Of Ammo.");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Enter A Numerical Character.");
- return 1;
- }
- ammo = strval(tmp);
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Give A Bot Weapons.");
- return 1;
- }
- if (giveplayerid != playerid)
- {
- format(string, sizeof(string), "%s (%i) Gave You A Weapon.",PlayerInfo[playerid][pName],playerid);
- SendClientMessage(giveplayerid,COLOR_ADMIN, string);
- format(string, sizeof(string), "Gave %s (%i) A Weapon.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- }
- GivePlayerWeapon(giveplayerid, weaponid, ammo);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_aslap(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,id,giveplayerid,Float:X,Float:Y,Float:Z,Float:Health,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /aslap (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- /*if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Slap Yourself.");
- return 1;
- }*/
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Slap A Bot.");
- return 1;
- }
- /*if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Slap.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }*/
- format(string, sizeof(string), "{FF66FF}ADMIN SLAP: {FFFFFF}%s (%i) {D6D631}REASON: {FFFFFF}%s",PlayerInfo[giveplayerid][pName],giveplayerid, reason);
- SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, string);
- format(string, sizeof(string), "[SLAP] %s BY: %s REASON: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName],reason);
- AdminLog(string);
- if(IsPlayerInAnyVehicle(giveplayerid))
- {
- new vehicleid = GetPlayerVehicleID(giveplayerid);
- if (GetPlayerVirtualWorld(giveplayerid) == 0)
- {
- GetVehiclePos(vehicleid, X, Y, Z);
- SetVehiclePos(vehicleid, X, Y, Z+50);
- }else{
- GetVehicleHealth(vehicleid, Health);
- SetVehicleHealth(vehicleid, Health - 100);
- }
- }else{
- GetPlayerPos(giveplayerid, X, Y, Z);
- if (GetPlayerVirtualWorld(giveplayerid) == 0)
- {
- PlayerPlaySound(giveplayerid, 1190 , X, Y, Z);
- SetPlayerPos(giveplayerid, X, Y, Z+5);
- }else{
- PlayerPlaySound(giveplayerid, 1190 , X, Y, Z);
- GetPlayerHealth(giveplayerid, Health);
- SetPlayerHealth(giveplayerid, Health - 10);
- }
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_akill(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,giveplayerid,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /akill (Name/Id).");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Kill Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Kill A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Killed.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- PlayerInfo[giveplayerid][pCustomDeath] = WEAPON_GOD;
- SetPlayerHealth(giveplayerid, 0);
- format(string, sizeof(string), "[KILL] %s BY: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName]);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_cage(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,giveplayerid,string[256],tmp[256];
- new Float:X, Float:Y, Float:Z;
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /cage (Name/Id).");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- /*if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Cage Yourself.");
- return 1;
- }*/
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Cage A Bot.");
- return 1;
- }
- GetPlayerPos(giveplayerid, X, Y, Z);
- cage = CreateObject(19075, X, Y, Z, 0.0, 0.0, 0.0);
- PlayerPlaySound(giveplayerid, 1137, X, Y, Z);
- PlayerPlaySound(playerid, 1137, X, Y, Z);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_uncage(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,giveplayerid,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /uncage (Name/Id).");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- /*if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Rearm Yourself.");
- return 1;
- }*/
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Uncage A Bot.");
- return 1;
- }
- DestroyObject(cage);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_disarm(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /disarm (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Disarm Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Disarm A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Disarm Them.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if (PlayerInfo[giveplayerid][pReturnWeapons] == 0)
- {
- for(new s = 0; s < 12; s++)
- {
- GetPlayerWeaponData(giveplayerid, s, PlayerInfo[giveplayerid][pWeapon][s], PlayerInfo[giveplayerid][pAmmo][s]);
- }
- }
- ResetPlayerWeapons(giveplayerid);
- format(string, sizeof(string), "{FF66FF}ADMIN DISARM: {FFFFFF}%s (%i) {D6D631}REASON: {FFFFFF}%s",PlayerInfo[giveplayerid][pName],giveplayerid, reason);
- SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, string);
- format(string, sizeof(string), "[DISARM] %s BY: %s REASON: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName],reason);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_rearm(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /rearm (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Rearm Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Rearm A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Rearm.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- ResetPlayerWeapons(giveplayerid);
- if (PlayerInfo[giveplayerid][pReturnWeapons] == 0)
- {
- for(new s = 0; s < 12; s++)
- {
- GivePlayerWeapon(giveplayerid, PlayerInfo[giveplayerid][pWeapon][s], PlayerInfo[giveplayerid][pAmmo][s]);
- }
- }
- format(string, sizeof(string), "{FF66FF}ADMIN REARM: {FFFFFF}%s (%i) {D6D631}REASON: {FFFFFF}%s",PlayerInfo[giveplayerid][pName],giveplayerid, reason);
- SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_mute(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /mute (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Mute Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Mute A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Muted.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(PlayerInfo[giveplayerid][pMute] == 1)
- {
- format(string, sizeof(string), "%s (%i) Has Been Muted.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "{FF66FF}ADMIN MUTE: {FFFFFF}%s (%i) {D6D631}REASON: {FFFFFF}%s",PlayerInfo[giveplayerid][pName],giveplayerid, reason);
- SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, string);
- PlayerInfo[giveplayerid][pMute] = 1;
- format(string, sizeof(string), "[MUTE] %s BY: %s REASON: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName],reason);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_unmute(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /unmute (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot UnMute Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot UnMute A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be UnMuted.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(PlayerInfo[giveplayerid][pMute] == 0)
- {
- format(string, sizeof(string), "%s (%i) Has Not Been Muted.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "{FF66FF}ADMIN UNMUTE: {FFFFFF}%s (%i) {D6D631}REASON: {FFFFFF}%s",PlayerInfo[giveplayerid][pName],giveplayerid, reason);
- SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, string);
- PlayerInfo[giveplayerid][pMute] = 0;
- format(string, sizeof(string), "[UNMUTE] %s BY: %s REASON: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName],reason);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_jail(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /jail (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Jail Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Jail A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Jailed.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(PlayerInfo[giveplayerid][pAJailed] == 1)
- {
- format(string, sizeof(string), "%s (%i) Has Already Been Jailed By A Admin.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(PlayerInfo[giveplayerid][pJailed] == 1)
- {
- format(string, sizeof(string), "%s (%i) Has Been Sent To Jail By A Police Officer.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "{FF66FF}ADMIN JAIL: {FFFFFF}%s (%i) {D6D631}REASON: {FFFFFF}%s",PlayerInfo[giveplayerid][pName],giveplayerid, reason);
- SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, string);
- PlayerInfo[giveplayerid][pAJailed] = 1;
- Jail(giveplayerid);
- format(string, sizeof(string), "[JAIL] %s BY: %s REASON: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName],reason);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_unjail(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /unjail (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- /*if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot UnJail Yourself.");
- return 1;
- }*/
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot UnJail A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be UnJailed.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(PlayerInfo[giveplayerid][pAJailed] == 0)
- {
- format(string, sizeof(string), "%s (%i) Has Not Been Jailed By A Admin.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(PlayerInfo[giveplayerid][pJailed] == 1)
- {
- format(string, sizeof(string), "You Cannot Release A Suspect From Jail When They Have Not Served Their Sentence.");
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "{FF66FF}ADMIN UNJAIL: {FFFFFF}%s (%i) {D6D631}REASON: {FFFFFF}%s",PlayerInfo[giveplayerid][pName],giveplayerid, reason);
- SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, string);
- PlayerInfo[giveplayerid][pAJailed] = 0;
- UnJail(giveplayerid);
- format(string, sizeof(string), "[UNJAIL] %s BY: %s REASON: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName],reason);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_ice(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ice (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Freeze Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Freeze A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Frozen.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(PlayerInfo[giveplayerid][pFroze] == 1)
- {
- format(string, sizeof(string), "%s (%i) Has Already Been Frozen By A Admin.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "{FF66FF}ADMIN FREEZE: {FFFFFF}%s (%i) {D6D631}REASON: {FFFFFF}%s",PlayerInfo[giveplayerid][pName],giveplayerid, reason);
- SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, string);
- PlayerInfo[giveplayerid][pFroze] = 1;
- TogglePlayerControllable(giveplayerid, 0);
- format(string, sizeof(string), "[FREEZE] %s BY: %s REASON: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName],reason);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_thaw(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /thaw (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot UnFreeze Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot UnFreeze A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be UnFrozen.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if(PlayerInfo[giveplayerid][pFroze] == 0)
- {
- format(string, sizeof(string), "%s (%i) Has Not Been Frozen By A Admin.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "{FF66FF}ADMIN UNFREEZE: {FFFFFF}%s (%i) {D6D631}REASON: {FFFFFF}%s",PlayerInfo[giveplayerid][pName],giveplayerid, reason);
- SendClientMessageToAll(COLOR_SERVER_MAIN_MSG, string);
- PlayerInfo[giveplayerid][pFroze] = 0;
- TogglePlayerControllable(giveplayerid, 1);
- format(string, sizeof(string), "[UNFREEZE] %s BY: %s REASON: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName],reason);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_kick(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /kick (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Kick Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Kick A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Kicked.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- KickPlayer(giveplayerid,PlayerInfo[playerid][pName],"ADMIN",reason);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_skick(playerid, params[])
- {
- dcmd_silentkick(playerid, params);
- return 1;
- }
- dcmd_silentkick(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,giveplayerid,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /skick (Name/Id) - Enter A Valid Name/Id.");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Kick Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Kick A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Kicked.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "***SILENT KICK: %s (%i)",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- format(string, sizeof(string), "[SILENT KICK] %s BY: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName]);
- AdminLog(string);
- //Jail(giveplayerid);
- Kick(giveplayerid);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_ban(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,id,giveplayerid,string[256],tmp[256],cmd[256],reason[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ban (Name/Id) [reason].");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- id = strlen(tmp);
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- reason = "No Reason Given.";
- }
- else
- {
- strmid(reason, params, id + strlen(cmd) + 1, strlen(params), 256);
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Ban Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Ban A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Banned.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- BanPlayer(giveplayerid,PlayerInfo[playerid][pName],"ADMIN",reason);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_sban(playerid, params[])
- {
- dcmd_silentban(playerid, params);
- return 1;
- }
- dcmd_silentban(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,giveplayerid,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /sban (Name/Id) - Enter A Valid Name/Id.");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Ban Yourself.");
- return 1;
- }
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Ban A Bot.");
- return 1;
- }
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 2)
- {
- format(string, sizeof(string), "%s (%i) Is The Server Operator And Cannot Be Banned.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- format(string, sizeof(string), "***SILENT BAN: %s (%i)",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid,COLOR_ADMIN, string);
- //Jail(giveplayerid);
- new query[256],IP[56],BDate[56],BTime[56];//
- new Hour, Minute, Second, Year, Month, Day;
- GetPlayerIp(giveplayerid, IP, sizeof(IP)); //Gets the players IP
- gettime(Hour, Minute, Second);
- getdate(Year, Month, Day);
- format(BDate, sizeof(BDate), "%d-%d-%d",Day,Month,Year);
- format(BTime, sizeof(BTime), "%d:%d",Hour,Minute);
- format(query, sizeof(query), "INSERT INTO banned (User, Banner, IP, Date, Time, Reason) VALUES ('%s', '%s', '%s', '%s', '%s', 'Silent Ban')",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName],IP,BDate,BTime); //Insert string
- mysql_query(query); //queries
- mysql_free_result(); //Frees the result
- if (PlayerInfo[giveplayerid][pRegistered] == 1 && PlayerInfo[giveplayerid][pLogged] == 1)
- {
- format(string,sizeof(string),"UPDATE playerdata SET Locked = 1 WHERE (UserName = '%s')",PlayerInfo[giveplayerid][pName]);
- mysql_query(string); //queries
- mysql_free_result(); //Frees the result
- }
- format(string, sizeof(string), "[SILENT BAN] %s BY: %s",PlayerInfo[giveplayerid][pName],PlayerInfo[playerid][pName]);
- AdminLog(string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_alotto(playerid, params[])
- {
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 1){
- new idx,Number,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /alotto (number) Enter A Number 1 - 30");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Selection Please Enter A Numeric Character.");
- return 1;
- }
- Number = strval(tmp);
- if(Number < 1 || Number > 30)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Selection Please Enter A Number 1 - 30.");
- return 1;
- }
- LottoNumber = Number;
- format(string, sizeof(string), "You Set The Lotto Number To %d",Number);
- SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, string);
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- dcmd_anopm(playerid, params[])
- {
- #pragma unused params
- if (IsPlayerAdmin(playerid) || PlayerInfo[playerid][pAdminLevel] > 0){
- if(PlayerInfo[playerid][pANoPm] == 1)
- {
- SendClientMessage(playerid, COLOR_ADMIN, "You Are Now Watching Private Messages. Type /anopm To Stop Watching Private Messages.");
- PlayerInfo[playerid][pANoPm] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_ADMIN, "You Are No Longer Watching Private Messages. Type /anopm To Watch Private Messages.");
- PlayerInfo[playerid][pANoPm] = 1;
- }
- }else{
- SendClientMessage(playerid, COLOR_ERROR, "Unknown Command! Type /cmds For Available Commands.");
- }
- return 1;
- }
- //==============================================================================
- //======================END OF ADMINISTRATION COMMANDS==========================
- //==============================================================================
- //==============================================================================
- //======================START OF MESSAGE COMMANDS===============================
- //==============================================================================
- //==============================================================================
- dcmd_r(playerid, params[])
- {
- dcmd_reply(playerid, params);
- return 1;
- }
- dcmd_reply(playerid, params[])
- {
- new idx,giveplayerid,string[256],length = strlen(params);
- while ((idx < length) && (params[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = params[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /reply (message).");
- }
- if (PlayerInfo[playerid][pQuickReply][1] == -1)
- {
- SendClientMessage(playerid, COLOR_ERROR, "No One Is Set On Quick Reply.");
- return 1;
- }
- giveplayerid = PlayerInfo[playerid][pQuickReply][1];
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- OnPlayerPrivmsg(playerid, giveplayerid, result);
- return 1;
- }
- //==============================================================================
- dcmd_ignore(playerid, params[])
- {
- new idx,giveplayerid,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /ignore (Name/Id) - Enter A Valid Name/Id.");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- if (giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Ignore Yourself.");
- return 1;
- }
- /*
- if (IsPlayerNPC(giveplayerid))
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Ban A Bot.");
- return 1;
- }*/
- if (IsPlayerAdmin(giveplayerid) || PlayerInfo[giveplayerid][pAdminLevel] > 0)
- {
- format(string, sizeof(string), "%s (%i) Is A Admin And Cannot Be Ignored.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- if (PlayerIgnoreList[playerid][giveplayerid] == 0)
- {
- PlayerIgnoreList[playerid][giveplayerid] = 1;
- format(string, sizeof(string), "You Are Now Ignoring Chat and PMs From {8E5FE1}%s (%d){FFFFFF}.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid,COLOR_SERVER_MAIN_MSG, string);
- format(string, sizeof(string), "Type {D6D631}/ignore %s {FFFFFF}To Stop Ignoring.",PlayerInfo[giveplayerid][pName]);
- SendClientMessage(playerid,COLOR_SERVER_MAIN_MSG, string);
- }else{
- PlayerIgnoreList[playerid][giveplayerid] = 0;
- format(string, sizeof(string), "You Are No Longer Ignoring {8E5FE1}%s (%d){FFFFFF}.",PlayerInfo[giveplayerid][pName],giveplayerid);
- SendClientMessage(playerid,COLOR_SERVER_MAIN_MSG, string);
- }
- return 1;
- }
- //==============================================================================
- dcmd_nopm(playerid, params[])
- {
- #pragma unused params
- if(PlayerInfo[playerid][pNoPm] == 1)
- {
- SendClientMessage(playerid, COLOR_PRIVATE_MSG, "You Are Now Accepting Private Messages. Type /nopm To Ignore Private Messages.");
- PlayerInfo[playerid][pNoPm] = 0;
- }
- else
- {
- SendClientMessage(playerid, COLOR_PRIVATE_MSG, "You Are No Longer Accepting Private Messages. Type /nopm To Accept Private Messages.");
- PlayerInfo[playerid][pNoPm] = 1;
- }
- return 1;
- }
- //==============================================================================
- dcmd_set(playerid, params[])
- {
- new idx,slot,giveplayerid,string[256],tmp[256];
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /set (#) (Name/Id) - Enter A Number 1 - 3.");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "Invalid Number Please Enter A Numerical Character.");
- return 1;
- }
- slot = strval(tmp);
- if (slot < 1 || slot > 3)
- {
- SendClientMessage(playerid, COLOR_ERROR, "Enter A Number 1 - 3.");
- return 1;
- }
- tmp = strtok(params, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_ERROR, "USAGE: /set (#) (Name/Id) - Enter A Valid Name/Id.");
- return 1;
- }
- if(!isNumeric(tmp))
- {
- giveplayerid = ReturnUser(playerid, tmp);
- if(giveplayerid == INVALID_PLAYER_ID)
- {
- return 1;
- }
- }
- else
- {
- giveplayerid = strval(tmp);
- if(!IsPlayerConnected(giveplayerid))
- {
- format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
- SendClientMessage(playerid, COLOR_ERROR, string);
- return 1;
- }
- }
- if(giveplayerid == playerid)
- {
- SendClientMessage(playerid, COLOR_ERROR, "You Cannot Set Yourself On Quick PM.");
- return 1;
- }
- PlayerInfo[playerid][pQuickPM][slot] = giveplayerid;
- format(string, sizeof(string), "%s (%d) Set On Quick PM %d. Use /%d (message) to Send Them a Message.",PlayerInfo[giveplayerid][pName],giveplayerid,slot,slot);
- SendClientMessage(playerid, COLOR_PRIVATE_MSG, string);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment