Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 39.44 KB | None | 0 0
  1. #include <a_samp>
  2. #include <core>
  3. #include <float>
  4. #include <JunkBuster>
  5. #define ADMINFS_MESSAGE_COLOR 0xFF444499
  6. #define PM_INCOMING_COLOR     0xFFFF22AA
  7. #define PM_OUTGOING_COLOR     0xFFCC2299
  8. #pragma tabsize 0
  9. #define COLOR_GREY 0xAFAFAFAA
  10. #define COLOR_GREEN 0x33AA33AA
  11. #define COLOR_RED 0xAA3333AA
  12. #define COLOR_ULTRARED 0xAA3333AA
  13. #define COLOR_YELLOW 0xFFFF00AA
  14. #define COLOR_WHITE 0xFFFFFFAA
  15. #define COLOR_BLUE 0x0000FFAA
  16. #define COLOR_BROWN 0x993300AA
  17. #define COLOR_ORANGE 0xFF9933AA
  18. #define COLOR_CYAN 0x99FFFFAA
  19. #define COLOR_PINK 0xFF66FFAA
  20. #define COLOR_BLACK 0x2C2727AA
  21. #define COLOR_LIGHTCYAN 0xAAFFCC33
  22. #define COLOR_LEMON 0xDDDD2357
  23. #define COLOR_AQUA 0x7CFC00AA
  24. #define COLOR_WHITEYELLOW 0xFFE87DFF
  25. #define COLOR_BLUEAQUA 0x7E60FFFF
  26. #define COLOR_DARKBLUE 0x15005EFF
  27. #define COLOR_ALIEN 0x90FF87FF
  28.  
  29. #define COLOR_GREY 0xAFAFAFAA
  30. #define COLOR_GREEN 0x33AA33AA
  31. #define COLOR_YELLOW 0xFFFF00AA
  32. #define COLOR_LIGHTBLUE 0x00D0F6AA
  33. #define COLOR_PURPLE 0xA600F6AA
  34. #define COLOR_TUT 0xF6C861AA
  35. #define COLOR_ROYAL 0x00C1F6AA
  36. #define COLOR_CWHITE 0xE0FFFFAA
  37.  
  38. #define COLOR_GOLD 0xB8860BAA
  39. #define COLOR_IRAN 0x15005EFF
  40. #define COLOR_America 0x90FF87FF
  41. #define COLOR_JAPAN 0xB8860BAA
  42. #define KICK_COLOR 0xFF0000FF
  43. #define COLOR_GANGGREEN 0x00FF0096
  44. #define COLOR_BLACK 0x2C2727AA
  45. #define COLOR_SBLUE 0x00BFFFAA
  46. #define INACTIVE_PLAYER_ID 255
  47. #define GIVECASH_DELAY 5000
  48. #define NUMVALUES 4
  49. #define TEAM_IRAN 1
  50. #define TEAM_America 2
  51. #define TEAM_JAPAN 3
  52. #define WELCOME                   2011
  53. new KillerID[MAX_PLAYERS];
  54. new bool: PlayerDied[MAX_PLAYERS];
  55. forward MoneyGrubScoreUpdate();
  56. forward Givecashdelaytimer(playerid);
  57. forward GameModeExitFunc();
  58. forward SendPlayerFormattedText(playerid, const str[], define);
  59. forward public SendAllFormattedText(playerid, const str[], define);
  60. enum SavePosENUM { Float:sX, Float:sY, Float:sZ, Float:sA, SavedPos };
  61. new SavePos[MAX_PLAYERS][SavePosENUM];
  62. new SeTSpaWns[MAX_PLAYERS];
  63. new gTeam[MAX_PLAYERS];
  64. new gActivePlayers[MAX_PLAYERS];
  65. new gLastGaveCash[MAX_PLAYERS];
  66. forward Nupdate ();
  67. new Ntimer;
  68. new Text:NEWS_TEXTDRAW;
  69. new news[][] =
  70. {
  71. "~y~/Help",
  72. "~y~/Commands",
  73. "~y~/Rules",
  74. "~y~/Credits"
  75. };
  76.  
  77. #define RANK_NEWBIE 0
  78. #define RANK_BABY_KILLA 1
  79. #define RANK_SOLDIER 2
  80. #define RANK_GANGSTA 3
  81. #define RANK_UNDERBOSS 4
  82. #define RANK_BOSS 5
  83.  
  84. new Text:Newbie;
  85. new Text:BabyKilla;
  86. new Text:Soldier;
  87. new Text:Gangsta;
  88. new Text:Underboss;
  89. new Text:Boss;
  90. new gPlayerLogged[MAX_PLAYERS];
  91. new pRank[MAX_PLAYERS];
  92. main()
  93. {
  94.     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
  95.     print("          Air Force Wars           ");
  96.     print("         by xlVENGEANCElx          ");
  97.     print("                                   ");
  98.     print("          Next GameMode:           ");
  99.     print("   .: Gang War Deathmatch 6.0 :.   ");
  100.     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
  101. }
  102. public OnPlayerConnect(playerid)
  103. {
  104.     new player[MAX_PLAYER_NAME];
  105.     GetPlayerName(playerid, player, sizeof(player));
  106.     new string[50];
  107.     format(string, sizeof(string), "Welcome '%s', enjoy your stay !", player);
  108.     SendClientMessage(playerid, COLOR_GREEN, string);
  109.     SendPlayerFormattedText(playerid, "Type /help to get started", 0);
  110.     SendPlayerFormattedText(playerid, "Don't forgot login and register", 0);
  111.     SendPlayerFormattedText(playerid, "Please enjoy yourself!", 0);
  112.     pRank[playerid] = 0;
  113.     gPlayerLogged[playerid] = 1;
  114.     TextDrawShowForPlayer(playerid, NEWS_TEXTDRAW);
  115.     gActivePlayers[playerid]++;
  116.     gLastGaveCash[playerid] = GetTickCount();
  117.     SetPlayerMapIcon( playerid, 0, 214.194396,1863.726440,13.140625, 58, 0 );
  118.     SetPlayerMapIcon( playerid, 1, -228.306442,2729.432861,62.687500, 59, 0 );
  119.     SetPlayerMapIcon( playerid, 2, -1309.324707,2494.259033,89.867187, 60, 0 );
  120.     SetPlayerMapIcon( playerid, 3, 384.733917,2458.126708,16.500000, 6, 0 );
  121.     return 1;
  122. }
  123. public Nupdate (){static Number = 0;TextDrawSetString(NEWS_TEXTDRAW, news[Number++]);TextDrawShowForAll(NEWS_TEXTDRAW);if(Number == sizeof(news)) Number = 0;return 1;}
  124. public OnPlayerDisconnect(playerid)
  125. {
  126.     gActivePlayers[playerid]--;
  127. }
  128. public OnPlayerDeath(playerid, killerid, reason)
  129. {
  130.     if(PlayerDied[playerid] == true)
  131.     {
  132.         PlayerDied[playerid] = false;
  133.          if(KillerID[playerid] != INVALID_PLAYER_ID)
  134.          SendDeathMessage(INVALID_PLAYER_ID,playerid,reason);
  135.         ResetPlayerWeapons(playerid);
  136.         TogglePlayerSpectating(playerid,1);
  137.         SendDeathMessage(killerid,playerid,reason);
  138.         SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
  139.         SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
  140.         GivePlayerMoney(killerid, 1000);
  141.         GivePlayerMoney(playerid, -1000);
  142.         PlayerSpectatePlayer(playerid,killerid);
  143.         SetTimerEx("spawn",10000,1, "i", playerid);
  144.      }
  145.     else
  146.     {
  147.         TogglePlayerSpectating(playerid, 0);
  148.     }
  149.      new string[256];
  150.  
  151.     if(GetPlayerScore(killerid) == 25) // Amount of required kills to get rank 1 *Baby Killa'*
  152.     {
  153.         GetPlayerName(killerid, string, sizeof(string) );
  154.         format(string, sizeof(string), ">> %s advanced to rank *Baby Killa'* by killing %d players", string, GetPlayerScore(killerid) );
  155.         SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  156.         pRank[playerid] = 1;
  157.     }
  158.     else if(GetPlayerScore(killerid) == 50) // Amount of required kills to get rank 2 *Soldier*
  159.     {
  160.         GetPlayerName(killerid, string, sizeof(string) );
  161.         format(string, sizeof(string), ">> %s advanced to rank *Soldier* by killing %d players", string, GetPlayerScore(killerid));
  162.         SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  163.         pRank[playerid] = 2;
  164.     }
  165.     else if(GetPlayerScore(killerid) == 100) // Amount of required kills to get rank 3 *Gangsta'*
  166.     {
  167.         GetPlayerName(killerid, string, sizeof(string) );
  168.         format(string, sizeof(string), ">> %s advanced to rank *Gangsta'* by killing %d players", string, GetPlayerScore(killerid));
  169.         SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  170.         pRank[playerid] = 3;
  171.     }
  172.     else if(GetPlayerScore(killerid) == 200) // Amount of required kills to get rank 4 *Underboss*
  173.     {
  174.         GetPlayerName(killerid, string, sizeof(string) );
  175.         format(string, sizeof(string), ">> %s advanced to rank *UnderBoss* by killing %d players", string, GetPlayerScore(killerid));
  176.         SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  177.         pRank[playerid] = 4;
  178.     }
  179.     else if(GetPlayerScore(killerid) == 500) // Amount of required kills to get rank 5 *Tha' Boss*
  180.     {
  181.         GetPlayerName(killerid, string, sizeof(string) );
  182.         format(string, sizeof(string), ">> %s advanced to rank *The Boss* by killing %d players", string, GetPlayerScore(killerid));
  183.         SendClientMessageToAll(COLOR_LIGHTBLUE, string);
  184.         pRank[playerid] = 5;
  185.     }
  186.     return 1;
  187. }
  188. forward spawn(playerid);
  189. public spawn(playerid)
  190. {
  191. TogglePlayerSpectating(playerid, 0);
  192. }
  193. public OnPlayerCommandText(playerid, cmdtext[])
  194. {
  195.     new string[256];
  196.     new playermoney;
  197.     new sendername[MAX_PLAYER_NAME];
  198.     new giveplayer[MAX_PLAYER_NAME];
  199.     new cmd[256];
  200.     new giveplayerid, moneys, idx;
  201.     new    tmp[256];
  202.     new Message[256];
  203.     new gMessage[256];
  204.     new pName[MAX_PLAYER_NAME+1];
  205.     new iName[MAX_PLAYER_NAME+1];
  206.  
  207.  
  208.     cmd = strtok(cmdtext, idx);
  209.  
  210.  
  211.     if(strcmp(cmdtext, "/rankinfo", true)==0)
  212.     {
  213.         SendClientMessage(playerid,COLOR_TUT, ".........:::: Rank Info Centre ::::........");
  214.         SendClientMessage(playerid,COLOR_WHITE, "Rank 0 -  *Newbie*  (0 kills required)");
  215.         SendClientMessage(playerid,COLOR_WHITE, "Rank 1 -  *Baby Killa'*  (25 kills required)");
  216.         SendClientMessage(playerid,COLOR_WHITE, "Rank 2 -  *Soldier*  (50 kills required)");
  217.         SendClientMessage(playerid,COLOR_WHITE, "Rank 3 -  *Gangsta'*  (100 kills required)");
  218.         SendClientMessage(playerid,COLOR_WHITE, "Rank 4 -  *UnderBoss*  (200 kills required)");
  219.         SendClientMessage(playerid,COLOR_WHITE, "Rank 5 -  *The Boss*  (500 kills required)");
  220.         return 1;
  221. }
  222.  
  223.     if (strcmp("/myrank", cmdtext, true) == 0)
  224.     {
  225.         if(IsPlayerConnected(playerid))
  226.         {
  227.             new rankid = pRank[playerid];
  228.             GetPlayerName(playerid, pName, sizeof(pName));
  229.             new rank[20];
  230.             if(pRank[playerid] == 0) { rank = "Newbie"; }
  231.             else if(pRank[playerid] == 1) { rank = "Baby Killa'"; }
  232.             else if(pRank[playerid] == 2) { rank = "Soldier"; }
  233.             else if(pRank[playerid] == 3) { rank = "Gangsta'"; }
  234.             else if(pRank[playerid] == 4) { rank = "Underboss"; }
  235.             else if(pRank[playerid] == 5) { rank = "The Boss"; }
  236.  
  237.             format(string, sizeof(string), "*** %s's Rank Info ***",pName);
  238.             SendClientMessage(playerid, COLOR_ROYAL,string);
  239.                format(string, sizeof(string), "Your curent rank is %d (%s) with %d score",rankid,rank,GetPlayerScore(playerid));
  240.             SendClientMessage(playerid, COLOR_CWHITE,string);
  241.         }
  242.         return 1;
  243. }
  244.     if (strcmp("/help", cmdtext, true, 10) == 0)
  245.     {
  246.         ShowPlayerDialog(playerid,WELCOME,DIALOG_STYLE_MSGBOX,"Help Menu","/Commands\n/Rules\n/Objective\n/Credits","OK","Cancel");
  247.         return 1;
  248.     }
  249.     if (strcmp("/objective", cmdtext, true, 10) == 0)
  250.     {
  251.         ShowPlayerDialog(playerid,WELCOME,DIALOG_STYLE_MSGBOX,"Objectiv's","Objective:\nThis Server is DM!\nHere 3 Teams\nWho Will Fight\nPlayers have to fight the opponent to get score and money.","OK","Cancel");
  252.         return 1;
  253.     }
  254.     if(strcmp(cmd, "/Rules", true) == 0)
  255.     {
  256.         ShowPlayerDialog(playerid,WELCOME,DIALOG_STYLE_MSGBOX,"Server Rules!","Don't use hacks\nRespect all (admins) n player\nDon't kill your team\nDon't car jacking","OK","Cancel");
  257.         return 1;
  258.     }
  259.     if(strcmp(cmd, "/Commands", true) == 0)
  260.     {
  261.         ShowPlayerDialog(playerid,WELCOME,DIALOG_STYLE_MSGBOX,"Player Commands","/Report\n/Kill\n/pm\n/class\n/getid\n/nrg\n/sp\n/lp\n/(un)lock\n/parachute\n/bombme\n/me\n/rankinfo\n/myrank\n/anims","OK","Cancel");
  262.         return 1;
  263.     }
  264.      if(strcmp(cmdtext, "/class",true)==0)
  265.         {
  266.             ForceClassSelection(playerid);
  267.             SendClientMessage(playerid, COLOR_ULTRARED,"[CLASS]> You have been forced to the class selection");
  268.             SetPlayerHealth(playerid, 0.00);
  269.             return 1;
  270.         }
  271.     if(strcmp(cmdtext, "/kill",true)==0)
  272.     {
  273.         SetPlayerHealth(playerid, 0.00);
  274.         return 1;
  275.     }
  276.       if(!strcmp(cmd, "/me",true) || !strcmp(cmd, "/im",true))
  277.     {
  278.         new dir[256];
  279.         dir = strtok(cmdtext, idx);
  280.         strmid(tmp, cmdtext, 4, strlen(cmdtext));
  281.         if(!strlen(dir))
  282.         {
  283.             SendClientMessage(playerid,COLOR_PINK,"[USAGE]> /me [Message/Action]");
  284.             return 1;
  285.         }
  286.             dir = strtok(cmdtext, idx);
  287.             GetPlayerName(playerid, sendername, sizeof(sendername));
  288.             format(string, sizeof(string), "==> %s %s", sendername, tmp);
  289.             SendClientMessageToAll(COLOR_RED,string);
  290.             print(string);
  291.             return 1;
  292.       }
  293.     //------------------------------------------------------------------------------
  294.     if(strcmp(cmd,"/getid",true) == 0 || strcmp(cmd, "/id", true) == 0)
  295.     {
  296.         tmp = strtok(cmdtext, idx);
  297.         if(!strlen(tmp))
  298.         {
  299.             SendClientMessage(playerid,COLOR_RED,"Correct Usage: /getid [part from the nick]");
  300.             return 1;
  301.         }
  302.         format(string,sizeof(string),"Searched for: \"%s\": ",tmp);
  303.         SendClientMessage(playerid,COLOR_RED,string);
  304.         new found=0;
  305.         for(new i=0; i <= MAX_PLAYERS; i++)
  306.         {
  307.             if(IsPlayerConnected(i))
  308.             {
  309.                   new foundname[MAX_PLAYER_NAME];
  310.                   GetPlayerName(i, foundname, MAX_PLAYER_NAME);
  311.                 new namelen = strlen(foundname);
  312.                 new bool:searched=false;
  313.                 for(new pos=0; pos <= namelen; pos++)
  314.                 {
  315.                     if(searched != true)
  316.                     {
  317.                         if(strfind(foundname,tmp,true) == pos)
  318.                         {
  319.                             found++;
  320.                             format(string,sizeof(string),"%d. %s (ID %d)",found,foundname,i);
  321.                             SendClientMessage(playerid, COLOR_GREEN ,string);
  322.                             searched = true;
  323.                         }
  324.                     }
  325.                 }
  326.             }
  327.         }
  328.         return 1;
  329.     }
  330.      if (strcmp(cmdtext, "/bombme", true)==0)
  331.         {
  332.             new Float:X, Float:Y, Float:Z;
  333.             GetPlayerPos(playerid, X, Y, Z);
  334.             CreateExplosion(X,Y,Z-3,7,100);
  335.             CreateExplosion(X,Y,Z-3,7,100);
  336.             CreateExplosion(X,Y,Z-3,7,100);
  337.             CreateExplosion(X,Y,Z-3,7,100);
  338.             SendClientMessage(playerid, COLOR_ULTRARED, "[LOL]> You have exploded yourself.");
  339.             SetPlayerHealth(playerid, 50.0);
  340.             GameTextForPlayer(playerid, "~r~Zbom",1200,5);
  341.         return 1;
  342.         }
  343.      if (!strcmp(cmdtext, "/chute", true) || !strcmp(cmdtext, "/parachute", true) || !strcmp(cmdtext, "/pc", true))
  344.       {
  345.         GivePlayerWeapon(playerid, 46, 1);
  346.         return 1;
  347.        }
  348.      if(strcmp(cmd, "/givecash", true) == 0) {
  349.        
  350.         tmp = strtok(cmdtext, idx);
  351.  
  352.         if(!strlen(tmp)) {
  353.             SendClientMessage(playerid, COLOR_WHITE, "AmericaGE: /givecash [playerid] [amount]");
  354.             return 1;
  355.         }
  356.         giveplayerid = strval(tmp);
  357.        
  358.         tmp = strtok(cmdtext, idx);
  359.         if(!strlen(tmp)) {
  360.             SendClientMessage(playerid, COLOR_WHITE, "AmericaGE: /givecash [playerid] [amount]");
  361.             return 1;
  362.         }
  363.          moneys = strval(tmp);
  364.        
  365.         //printf("givecash_command: %d %d",giveplayerid,moneys);
  366.  
  367.        
  368.         if (IsPlayerConnected(giveplayerid)) {
  369.             GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  370.             GetPlayerName(playerid, sendername, sizeof(sendername));
  371.             playermoney = GetPlayerMoney(playerid);
  372.             if (moneys > 0 && playermoney >= moneys) {
  373.                 GivePlayerMoney(playerid, (0 - moneys));
  374.                 GivePlayerMoney(giveplayerid, moneys);
  375.                 format(string, sizeof(string), "You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
  376.                 SendClientMessage(playerid, COLOR_YELLOW, string);
  377.                 format(string, sizeof(string), "You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);
  378.                 SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  379.                 printf("%s(playerid:%d) has transfered %d to %s(playerid:%d)",sendername, playerid, moneys, giveplayer, giveplayerid);
  380.             }
  381.             else {
  382.                 SendClientMessage(playerid, COLOR_YELLOW, "Invalid transaction amount.");
  383.             }
  384.         }
  385.         else {
  386.                 format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  387.                 SendClientMessage(playerid, COLOR_YELLOW, string);
  388.             }
  389.         return 1;
  390.     }
  391.    
  392.     // PROCESS OTHER COMMANDS
  393.     if(strcmp("/pm", cmd, true) == 0)
  394.     {
  395.         tmp = strtok(cmdtext,idx);
  396.  
  397.         if(!strlen(tmp) || strlen(tmp) > 5) {
  398.             SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"Usage: /pm (id) (message)");
  399.             return 1;
  400.         }
  401.  
  402.         new id = strval(tmp);
  403.        
  404.  
  405.         if(!strlen(gMessage)) {
  406.             SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"Usage: /pm (id) (message)");
  407.             return 1;
  408.         }
  409.  
  410.         if(!IsPlayerConnected(id)) {
  411.             SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"/pm : Bad player ID");
  412.             return 1;
  413.         }
  414.  
  415.         if(playerid != id) {
  416.             GetPlayerName(id,iName,sizeof(iName));
  417.             GetPlayerName(playerid,pName,sizeof(pName));
  418.             format(Message,sizeof(Message),">> %s(%d): %s",iName,id,gMessage);
  419.             SendClientMessage(playerid,PM_OUTGOING_COLOR,Message);
  420.             format(Message,sizeof(Message),"** %s(%d): %s",pName,playerid,gMessage);
  421.             SendClientMessage(id,PM_INCOMING_COLOR,Message);
  422.             PlayerPlaySound(id,1085,0.0,0.0,0.0);
  423.  
  424.             printf("PM: %s",Message);
  425.  
  426.         }
  427.         else {
  428.             SendClientMessage(playerid,ADMINFS_MESSAGE_COLOR,"You cannot PM yourself");
  429.         }
  430.         return 1;
  431.     }
  432.         if(strcmp(cmdtext, "/nrg", true) == 0)
  433.         {
  434.             new Float:X, Float:Y, Float:Z;
  435.             GetPlayerPos(playerid, X, Y, Z);
  436.             if(GetPlayerMoney(playerid) >= 30000)
  437.             {
  438.                 new mnrg[MAX_PLAYERS];
  439.                 GivePlayerMoney(playerid, -60000);
  440.                 mnrg[playerid] = CreateVehicle(522, X, Y, Z + 1, 90.0, -1, -1, 100000000);
  441.                 PutPlayerInVehicle(playerid, mnrg[playerid], 0);
  442.                 AddVehicleComponent(mnrg[playerid], 1079);
  443.                 SendClientMessage(playerid, 0xFFFF00AA, "Modded NRG-500, bought for 30000$ !");
  444.             }
  445.             else if(GetPlayerMoney(playerid) < 60000)
  446.             {
  447.                 SendClientMessage(playerid, 0xEB000FFF, "ERROR: Not enought Moneys, 30000$ needed !");
  448.             }
  449.             return 1;
  450.   }
  451. //sp lp
  452. //------------------------------------------------------------------------------
  453.         if(!strcmp(cmdtext, "/spos",true) || !strcmp(cmdtext,"/sp",true))
  454.         {
  455.         if (IsPlayerInAnyVehicle(playerid))
  456.         {
  457.         GetVehiclePos(GetPlayerVehicleID(playerid), SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
  458.         GetVehicleZAngle(GetPlayerVehicleID(playerid), SavePos[playerid][sA]);
  459.         }else {
  460.         GetPlayerPos(playerid, SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
  461.         GetPlayerFacingAngle(playerid, SavePos[playerid][sA]);
  462.         }SavePos[playerid][SavedPos] = 1;
  463.         return SendClientMessage(playerid, COLOR_WHITE,"Position saved, use /lp to go back.");
  464.         }
  465.  
  466. //------------------------------------------------------------------------------
  467.         if(!strcmp(cmdtext, "/lp",true) || !strcmp(cmdtext,"/lpos",true))
  468.         {
  469.         SetCameraBehindPlayer(playerid);
  470.         if (SavePos[playerid][SavedPos] == 0) return SendClientMessage(playerid, COLOR_WHITE, "[SERVER]> Use /sp First.");
  471.         if (IsPlayerInAnyVehicle(playerid))
  472.         {
  473.         SetVehiclePos(GetPlayerVehicleID(playerid), SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
  474.         SetVehicleZAngle(GetPlayerVehicleID(playerid), SavePos[playerid][sA]);
  475.         } else {
  476.         SetPlayerPos(playerid, SavePos[playerid][sX], SavePos[playerid][sY], SavePos[playerid][sZ]);
  477.         SetPlayerFacingAngle(playerid, SavePos[playerid][sA]);
  478.         }
  479.         return SendClientMessage(playerid, COLOR_WHITE, "Position restored");
  480.         }
  481. //car lock unlock
  482. //------------------------------------------------------------------------------
  483.         if (strcmp(cmdtext, "/lock", true)==0)
  484.         {
  485.             if(IsPlayerInAnyVehicle(playerid))
  486.             {
  487.                 new State=GetPlayerState(playerid);
  488.                 if(State!=PLAYER_STATE_DRIVER)
  489.                 {
  490.                     SendClientMessage(playerid,0xFFFF00AA,"You can only lock the doors as the driver.");
  491.                     return 1;
  492.                 }
  493.                 new i;
  494.                 for(i=0;i<MAX_PLAYERS;i++)
  495.                 {
  496.                     if(i != playerid)
  497.                     {
  498.                         SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
  499.                     }
  500.                 }
  501.                 SendClientMessage(playerid, 0xFFFF00AA, "Vehicle locked!");
  502.                 new Float:pX, Float:pY, Float:pZ;
  503.                 GetPlayerPos(playerid,pX,pY,pZ);
  504.                 PlayerPlaySound(playerid,1056,pX,pY,pZ);
  505.             }
  506.             else
  507.             {
  508.                 SendClientMessage(playerid, 0xFFFF00AA, "You're not in a vehicle!");
  509.             }
  510.             return 1;
  511.             }
  512.  
  513. //------------------------------------------------------------------------------
  514.         if (strcmp(cmdtext, "/unlock", true)==0)
  515.         {
  516.         if(IsPlayerInAnyVehicle(playerid))
  517.         {
  518.             new State=GetPlayerState(playerid);
  519.             if(State!=PLAYER_STATE_DRIVER)
  520.             {
  521.                 SendClientMessage(playerid,0xFFFF00AA,"You can only unlock the doors as the driver.");
  522.                 return 1;
  523.             }
  524.             new i;
  525.             for(i=0;i<MAX_PLAYERS;i++)
  526.             {
  527.                 SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
  528.             }
  529.             SendClientMessage(playerid, 0xFFFF00AA, "Vehicle unlocked!");
  530.             new Float:pX, Float:pY, Float:pZ;
  531.             GetPlayerPos(playerid,pX,pY,pZ);
  532.             PlayerPlaySound(playerid,1057,pX,pY,pZ);
  533.         }
  534.         else
  535.         {
  536.             SendClientMessage(playerid, 0xFFFF00AA, "You're not in a vehicle!");
  537.         }
  538.         return 1;
  539.         }
  540. /////////
  541.  
  542.     return 0;
  543. }
  544.  
  545.  
  546.  
  547. public OnPlayerSpawn(playerid)
  548. {
  549.     SetPlayerInterior(playerid,0);
  550.     TogglePlayerClock(playerid,0);
  551.     SetPlayerToTeamColor(playerid);
  552.     SetWeather(32);
  553.    
  554.        TextDrawShowForPlayer(playerid, Newbie);
  555.     TextDrawShowForPlayer(playerid, BabyKilla);
  556.     TextDrawShowForPlayer(playerid, Soldier);
  557.     TextDrawShowForPlayer(playerid, Gangsta);
  558.     TextDrawShowForPlayer(playerid, Underboss);
  559.     TextDrawShowForPlayer(playerid, Boss);
  560.  
  561.     if(gPlayerLogged[playerid] == 0) { // If not logged in
  562.     TextDrawHideForPlayer(playerid, Newbie);
  563.     TextDrawHideForPlayer(playerid, BabyKilla);
  564.     TextDrawHideForPlayer(playerid, Soldier);
  565.     TextDrawHideForPlayer(playerid, Gangsta);
  566.     TextDrawHideForPlayer(playerid, Underboss);
  567.     TextDrawHideForPlayer(playerid, Boss);
  568.     }
  569.  
  570.     if(pRank[playerid] == 0) { // Newbie
  571.     SetPlayerHealth(playerid, 50.0);
  572.     GivePlayerWeapon(playerid, 22, 300);
  573.     GivePlayerWeapon(playerid, 17, 500);
  574.     TextDrawHideForPlayer(playerid, BabyKilla);
  575.     TextDrawHideForPlayer(playerid, Soldier);
  576.     TextDrawHideForPlayer(playerid, Gangsta);
  577.     TextDrawHideForPlayer(playerid, Underboss);
  578.     TextDrawHideForPlayer(playerid, Boss);
  579.     }
  580.  
  581.     else if(pRank[playerid] == 1) { // Baby Killa
  582.     SetPlayerHealth(playerid, 60.0);
  583.     SetPlayerArmour(playerid, 15.0);
  584.     GivePlayerWeapon(playerid, 23, 300);
  585.     GivePlayerWeapon(playerid, 17, 500);
  586.     GivePlayerWeapon(playerid, 5, 1);
  587.     TextDrawHideForPlayer(playerid, Newbie);
  588.     TextDrawHideForPlayer(playerid, Soldier);
  589.     TextDrawHideForPlayer(playerid, Gangsta);
  590.     TextDrawHideForPlayer(playerid, Underboss);
  591.     TextDrawHideForPlayer(playerid, Boss);
  592.     }
  593.  
  594.     else if(pRank[playerid] == 2) { // Soldier
  595.     SetPlayerHealth(playerid, 70.0);
  596.     SetPlayerArmour(playerid, 25.0);
  597.     GivePlayerWeapon(playerid, 24, 150);
  598.     GivePlayerWeapon(playerid, 5, 1);
  599.     TextDrawHideForPlayer(playerid, BabyKilla);
  600.     TextDrawHideForPlayer(playerid, Newbie);
  601.     TextDrawHideForPlayer(playerid, Gangsta);
  602.     TextDrawHideForPlayer(playerid, Underboss);
  603.     TextDrawHideForPlayer(playerid, Boss);
  604.     }
  605.  
  606.     else if(pRank[playerid] == 3) { // Gangsta
  607.     SetPlayerHealth(playerid, 80.0);
  608.     SetPlayerArmour(playerid, 50.0);
  609.     GivePlayerWeapon(playerid, 29, 200);
  610.     GivePlayerWeapon(playerid, 24, 150);
  611.     TextDrawHideForPlayer(playerid, BabyKilla);
  612.     TextDrawHideForPlayer(playerid, Soldier);
  613.     TextDrawHideForPlayer(playerid, Newbie);
  614.     TextDrawHideForPlayer(playerid, Underboss);
  615.     TextDrawHideForPlayer(playerid, Boss);
  616.     }
  617.  
  618.     else if(pRank[playerid] == 4) { // Underboss
  619.     SetPlayerHealth(playerid, 90.0);
  620.     SetPlayerArmour(playerid, 75.0);
  621.     GivePlayerWeapon(playerid, 34, 100);
  622.     GivePlayerWeapon(playerid, 24, 300);
  623.     TextDrawHideForPlayer(playerid, BabyKilla);
  624.     TextDrawHideForPlayer(playerid, Soldier);
  625.     TextDrawHideForPlayer(playerid, Gangsta);
  626.     TextDrawHideForPlayer(playerid, Newbie);
  627.     TextDrawHideForPlayer(playerid, Boss);
  628.     }
  629.  
  630.     else if(pRank[playerid] == 5) { // Tha' Boss
  631.     SetPlayerHealth(playerid, 100);
  632.     SetPlayerArmour(playerid, 100);
  633.     GivePlayerWeapon(playerid, 27, 100);
  634.     GivePlayerWeapon(playerid, 24, 500);
  635.     GivePlayerWeapon(playerid, 31, 500);
  636.     TextDrawHideForPlayer(playerid, BabyKilla);
  637.     TextDrawHideForPlayer(playerid, Soldier);
  638.     TextDrawHideForPlayer(playerid, Gangsta);
  639.     TextDrawHideForPlayer(playerid, Underboss);
  640.     TextDrawHideForPlayer(playerid, Newbie);
  641.     }
  642.     return 1;
  643. }
  644. forward SetPlayerToTeamColor(playerid);
  645. public SetPlayerToTeamColor(playerid)
  646. {
  647.     if (gTeam[playerid] == TEAM_IRAN)
  648.     {
  649.         SetPlayerColor(playerid, COLOR_IRAN);
  650.         SetPlayerInterior(playerid,0);
  651.         SetPlayerArmour(playerid,100);
  652.     }
  653.     else if (gTeam[playerid] == TEAM_America)
  654.     {
  655.         SetPlayerColor(playerid, COLOR_America);
  656.         SetPlayerInterior(playerid,0);
  657.         SetPlayerArmour(playerid,100);
  658.     }
  659.     else if (gTeam[playerid] == TEAM_JAPAN)
  660.     {
  661.         SetPlayerColor(playerid, COLOR_JAPAN);
  662.         SetPlayerInterior(playerid,0);
  663.         SetPlayerArmour(playerid,100);
  664.     }
  665. }
  666.  
  667.  
  668. public OnPlayerRequestClass(playerid, classid)
  669. {
  670.     SeTSpaWns[playerid] = 0;
  671.     SetPlayerTeamFromClass(playerid, classid);
  672.     SetPlayerInterior(playerid,0);
  673.     SetPlayerPos(playerid, -2476.72, 1544.59, 55.46);
  674.     SetPlayerFacingAngle(playerid, 1.304757);
  675.     SetPlayerCameraPos(playerid, -2480.61, 1552.29, 55.43);
  676.     SetPlayerCameraLookAt(playerid, -2476.72, 1544.59, 55.46);
  677.     return 1;
  678. }
  679.  
  680. public OnGameModeExit(){KillTimer(Ntimer);TextDrawDestroy(NEWS_TEXTDRAW);return 1;}
  681.  
  682. public GameModeExitFunc(){GameModeExit();}
  683.  
  684. public OnGameModeInit()
  685. {
  686.  
  687.     Newbie = TextDrawCreate(500, 100, "Rank: Newbie");
  688.     TextDrawAlignment(Newbie, 1);
  689.     TextDrawFont(Newbie, 2);
  690.     TextDrawLetterSize(Newbie, 0.400, 1.000);
  691.     TextDrawColor(Newbie, COLOR_WHITE);
  692.     TextDrawSetOutline(Newbie, 1);
  693.  
  694.     BabyKilla = TextDrawCreate(486, 100, "Rank: Baby Killa'");
  695.     TextDrawAlignment(BabyKilla, 1);
  696.     TextDrawFont(BabyKilla, 2);
  697.     TextDrawLetterSize(BabyKilla, 0.400, 1.000);
  698.     TextDrawColor(BabyKilla, COLOR_YELLOW);
  699.     TextDrawSetOutline(BabyKilla, 1);
  700.  
  701.     Soldier = TextDrawCreate(500, 100, "Rank: Soldier");
  702.     TextDrawAlignment(Soldier, 1);
  703.     TextDrawFont(Soldier, 2);
  704.     TextDrawLetterSize(Soldier, 0.400, 1.000);
  705.     TextDrawColor(Soldier, COLOR_GREEN);
  706.     TextDrawSetOutline(Soldier, 1);
  707.  
  708.     Gangsta = TextDrawCreate(500, 100, "Rank: Gangsta'");
  709.     TextDrawAlignment(Gangsta, 1);
  710.     TextDrawFont(Gangsta, 2);
  711.     TextDrawLetterSize(Gangsta, 0.400, 1.000);
  712.     TextDrawColor(Gangsta, COLOR_ROYAL);
  713.     TextDrawSetOutline(Gangsta, 1);
  714.  
  715.     Underboss = TextDrawCreate(483, 100, "Rank: Underboss");
  716.     TextDrawAlignment(Underboss, 1);
  717.     TextDrawFont(Underboss, 2);
  718.     TextDrawLetterSize(Underboss, 0.400, 1.000);
  719.     TextDrawColor(Underboss, COLOR_PURPLE);
  720.     TextDrawSetOutline(Underboss, 1);
  721.  
  722.     Boss = TextDrawCreate(490, 100, "Rank: Tha' Boss");
  723.     TextDrawAlignment(Boss, 1);
  724.     TextDrawFont(Boss, 2);
  725.     TextDrawLetterSize(Boss, 0.400, 1.000);
  726.     TextDrawColor(Boss, COLOR_TUT);
  727.     TextDrawSetOutline(Boss, 1);
  728.  
  729.     Ntimer = SetTimer("Nupdate", 5000, 1);
  730.     NEWS_TEXTDRAW = TextDrawCreate(321.000000,420.000000,"~y~/Commands");
  731.     TextDrawUseBox(NEWS_TEXTDRAW,0);
  732.     TextDrawBoxColor(NEWS_TEXTDRAW,0x00000099);
  733.     TextDrawTextSize(NEWS_TEXTDRAW,0.000000,631.000000);
  734.     TextDrawAlignment(NEWS_TEXTDRAW,2);
  735.     TextDrawBackgroundColor(NEWS_TEXTDRAW,0x000000ff);
  736.     TextDrawFont(NEWS_TEXTDRAW,1);
  737.     TextDrawLetterSize(NEWS_TEXTDRAW,0.399999,1.100000);
  738.     TextDrawColor(NEWS_TEXTDRAW,0xffffffff);
  739.     TextDrawSetOutline(NEWS_TEXTDRAW,1);
  740.     TextDrawSetProportional(NEWS_TEXTDRAW,1);
  741.     TextDrawSetShadow(NEWS_TEXTDRAW,1);
  742.     SetGameModeText("COD BO");
  743.     UsePlayerPedAnims();
  744.     AllowInteriorWeapons(1);
  745.     SetWeather(32);
  746.     ShowPlayerMarkers(1);
  747.     ShowNameTags(1);
  748.     AddPlayerClass(287,214.194396,1863.726440,13.140625,270.1425,31,3121,24,300,16,100);
  749.     AddPlayerClass(285,-228.306442,2729.432861,62.687500,270.1425,31,3120,24,300,16,100);
  750.     AddPlayerClass(277,-1309.324707,2494.259033,89.867187,270.1425,30,3120,24,300,16,100);
  751.     // Car Spawns
  752.     AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
  753.     AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
  754.     AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
  755.     AddStaticVehicle(432,278.9016,1950.7509,17.6532,88.9054,43,0);
  756.     AddStaticVehicle(432,282.3510,1987.1381,17.6535,87.2516,43,0);
  757.     AddStaticVehicle(432,278.2103,2020.6830,17.6535,98.7492,43,0);
  758.     AddStaticVehicle(425,342.1974,1874.3889,18.3136,104.1868,34,0);
  759.     AddStaticVehicle(425,339.5558,1855.1088,18.5525,108.6887,43,0);
  760.     AddStaticVehicle(520,338.5540,1930.7616,18.7074,272.5084,0,0);
  761.     AddStaticVehicle(520,358.0111,1916.5072,18.6420,266.0934,0,0);
  762.     AddStaticVehicle(520,358.7953,1892.7484,18.3639,109.5348,0,0);
  763.     AddStaticVehicle(520,366.4059,1960.9697,18.3639,280.4560,0,0);
  764.     AddStaticVehicle(520,331.8059,1968.1923,18.3639,97.8575,0,0);
  765.     AddStaticVehicle(425,343.2718,1946.3412,18.2241,274.0224,43,0);
  766.     AddStaticVehicle(520,229.651931,1892.521972,17.211687,274.0224,43,0);
  767.     AddStaticVehicle(432,182.544204,1909.152343,17.469060,274.0224,43,0);
  768.     AddStaticVehicle(470,184.454849,1948.658813,17.396722,0.0,43,0);
  769.     AddStaticVehicle(470,184.454849,1953.658813,17.396722,0.0,43,0);
  770.     AddStaticVehicle(470,-224.073669,2751.190185,62.539062,274.0224,43,0);
  771.     AddStaticVehicle(470,-224.073669,2755.190185,62.539062,274.0224,43,0);
  772.     AddStaticVehicle(520,-197.495452,2725.493164,62.687500,280.4560,0,0);
  773.     AddStaticVehicle(432,-257.033142,2701.294189,62.535140,88.2516,43,0);
  774.     AddStaticVehicle(425,-294.516601,2741.593261,61.895484,100.2516,43,0);
  775.     AddStaticVehicle(520,-306.612548,2676.907470,62.599357,60.2516,43,0);
  776.     AddStaticVehicle(470,-1294.959960,2447.247558,88.042465,0.0,43,0);
  777.     AddStaticVehicle(470,-1297.959960,2447.247558,88.042465,0.0,43,0);
  778.     AddStaticVehicle(470,-1291.959960,2447.247558,88.042465,0.0,43,0);
  779.     AddStaticVehicle(520,-1329.691162,2488.202148,87.046875,120.0,43,0);
  780.     AddStaticVehicle(425,-1302.751953,2479.679687,87.278709,0.0,43,0);
  781.     AddStaticVehicle(432,-1298.280273,2504.918212,86.957275,88.2516,43,0);
  782.     AddStaticPickup(371, 15, -320.800262,2742.728759,62.952674);
  783.     AddStaticPickup(370, 15, 384.733917,2474.126708,16.500000);
  784.     AddStaticPickup(355, 15, 384.733917,2472.126708,16.500000);
  785.     AddStaticPickup(352, 15, 384.733917,2470.126708,16.500000);
  786.     AddStaticPickup(351, 15, 384.733917,2468.126708,16.500000);
  787.     AddStaticPickup(350, 15, 384.733917,2466.126708,16.500000);
  788.     AddStaticPickup(349, 15, 384.733917,2464.126708,16.500000);
  789.     AddStaticPickup(348, 15, 384.733917,2462.126708,16.500000);
  790.     AddStaticPickup(344, 15, 384.733917,2460.126708,16.500000);
  791.     AddStaticPickup(342, 15, 384.733917,2458.126708,16.500000);
  792.     AddStaticPickup(359, 15, 384.733917,2456.126708,16.500000);
  793.     AddStaticPickup(358, 15, 384.733917,2454.126708,16.500000);
  794.     AddStaticPickup(357, 15, 384.733917,2452.126708,16.500000);
  795.     AddStaticPickup(356, 15, 384.733917,2450.126708,16.500000);
  796.     AddStaticPickup(366, 15, 384.733917,2448.126708,16.500000);
  797.     AddStaticPickup(367, 15, 384.733917,2446.126708,16.500000);
  798.     AddStaticPickup(365, 15, 384.733917,2444.126708,16.500000);
  799.     AddStaticPickup(364, 15, 384.733917,2442.126708,16.500000);
  800.     AddStaticPickup(363, 15, 384.733917,2440.126708,16.500000);
  801.     SetTimer("MoneyGrubScoreUpdate", 1000, 1);
  802.    
  803.     CreateObject(5005, -254.9398, 2629.4697, 65.4919, 0.0000, 0.0000, 0.0000);
  804.     CreateObject(5005, -171.8070, 2712.8440, 65.4890, 0.0000, 0.0000, 270.0000);
  805.     CreateObject(5005, -176.8703, 2790.9417, 64.4789, 357.4217, 0.8594, 180.0000);
  806.     CreateObject(5001, -307.1126, 2746.8711, 62.5342, 0.0000, 0.0000, 202.5000);
  807.     CreateObject(5005, -360.5526, 2738.1599, 64.0616, 0.0000, 0.0000, 281.2500);
  808.     CreateObject(9482, -349.0363, 2646.9709, 69.9636, 0.0000, 0.0000, 337.5000);
  809.     CreateObject(3279, -339.5167, 2660.0864, 62.9289, 0.0000, 0.0000, 1.7962);
  810.     CreateObject(3279, -351.9811, 2723.3726, 62.4001, 0.0000, 0.0000, 1.7962);
  811.     CreateObject(3279, -179.5017, 2786.7734, 61.6452, 0.0000, 0.0000, 272.4147);
  812.     CreateObject(3279, -177.2514, 2633.9680, 61.9540, 0.0000, 0.0000, 176.1577);
  813.     CreateObject(12911, -176.4954, 2709.1003, 61.6658, 0.0000, 0.0000, 11.2500);
  814.     CreateObject(16093, -320.0561, 2740.5032, 61.5683, 0.0000, 0.0000, 0.0000);
  815.     CreateObject(3268, -221.8601, 2735.1553, 61.6124, 0.0000, 0.0000, 270.0000);
  816.     CreateObject(3277, -294.6788, 2720.3306, 62.1320, 0.0000, 0.0000, 0.0000);
  817.     CreateObject(3277, -246.4207, 2769.7610, 62.3890, 0.0000, 0.0000, 0.0000);
  818.     CreateObject(3277, -220.2349, 2666.4761, 62.3742, 0.0000, 0.0000, 0.0000);
  819.     CreateObject(3267, -220.0240, 2666.2141, 62.4346, 0.0000, 0.0000, 77.9679);
  820.     CreateObject(3267, -246.2458, 2769.9004, 62.3417, 0.0000, 0.0000, 77.9679);
  821.     CreateObject(3267, -294.7077, 2720.5930, 62.0847, 0.0000, 0.0000, 77.9679);
  822.     CreateObject(16779, -221.7522, 2735.5933, 70.1197, 0.0000, 0.0000, 0.0000);
  823.     CreateObject(3386, -207.4938, 2744.3926, 61.6875, 0.0000, 0.0000, 0.0000);
  824.     CreateObject(3387, -207.4999, 2743.3928, 61.6875, 0.0000, 0.0000, 0.0000);
  825.     CreateObject(3387, -207.3986, 2743.7925, 61.6875, 0.0000, 0.0000, 0.0000);
  826.     CreateObject(3387, -207.4974, 2742.4133, 61.6875, 0.0000, 0.0000, 0.0000);
  827.     CreateObject(3386, -207.4666, 2741.4272, 61.6875, 0.0000, 0.0000, 0.0000);
  828.     CreateObject(3390, -212.4124, 2726.7991, 61.6853, 0.0000, 0.0000, 270.0000);
  829.     CreateObject(3391, -215.9368, 2726.8037, 61.6853, 0.0000, 0.0000, 270.0000);
  830.     CreateObject(3393, -235.5252, 2732.9263, 61.6853, 0.0000, 0.0000, 180.0000);
  831.     CreateObject(3786, -223.0990, 2725.8984, 63.0437, 0.0000, 87.6625, 270.0000);
  832.     CreateObject(3786, -223.9230, 2725.8738, 63.0437, 0.0000, 87.6625, 270.0000);
  833.     CreateObject(3786, -224.7999, 2725.9360, 63.0937, 0.0000, 87.6625, 270.0000);
  834.     CreateObject(3788, -209.4488, 2739.1323, 62.2069, 0.0000, 0.0000, 180.0000);
  835.     CreateObject(3788, -209.4458, 2737.6816, 62.2069, 0.0000, 0.0000, 180.0000);
  836.     CreateObject(3788, -209.3231, 2735.9937, 62.2069, 0.0000, 0.0000, 180.0000);
  837.     CreateObject(3788, -209.2553, 2733.9226, 62.2069, 0.0000, 0.0000, 180.0000);
  838.     CreateObject(3790, -209.2686, 2739.1145, 62.3186, 0.0000, 0.0000, 0.0000);
  839.     CreateObject(3795, -209.2949, 2732.0935, 62.0285, 0.0000, 0.0000, 0.0000);
  840.     CreateObject(16782, -228.2192, 2725.5979, 65.3473, 0.0000, 0.0000, 90.0000);
  841.     CreateObject(3390, -218.4553, 2735.3118, 61.6853, 0.0000, 0.0000, 268.2811);
  842.     CreateObject(3390, -225.8240, 2735.4895, 61.6853, 0.0000, 0.0000, 268.2811);
  843.     CreateObject(8263, -1274.3019, 2543.9512, 91.4514, 0.0000, 353.9839, 315.0000);
  844.     CreateObject(8263, -1260.6560, 2500.6094, 89.4559, 0.0000, 0.0000, 255.3896);
  845.     CreateObject(8263, -1346.3373, 2491.7375, 89.1479, 357.4217, 356.5623, 266.5623);
  846.     CreateObject(8262, -1257.6318, 2448.5452, 89.6399, 0.0000, 0.0000, 281.2500);
  847.     CreateObject(9482, -1324.4058, 2434.7969, 94.7742, 0.0000, 0.0000, 281.2500);
  848.     CreateObject(1411, -1337.2031, 2432.9114, 90.2721, 0.0000, 0.0000, 0.0000);
  849.     CreateObject(1411, -1342.5999, 2432.8882, 90.3597, 0.0000, 0.0000, 0.0000);
  850.     CreateObject(1411, -1347.7378, 2432.8120, 90.8788, 0.0000, 0.0000, 0.0000);
  851.     CreateObject(3279, -1336.7545, 2546.3669, 84.3876, 0.0000, 0.0000, 348.7500);
  852.     CreateObject(3279, -1276.2366, 2538.0657, 86.7594, 0.0000, 0.0000, 236.2501);
  853.     CreateObject(3279, -1264.9675, 2529.1968, 88.1707, 0.0000, 0.0000, 236.2501);
  854.     CreateObject(3279, -1279.8213, 2451.6201, 86.3936, 0.0000, 0.0000, 168.7500);
  855.     CreateObject(3279, -1346.1771, 2455.6633, 85.9918, 0.0000, 0.0000, 348.7500);
  856.     CreateObject(12911, -1340.7258, 2485.4453, 86.1911, 0.0000, 0.0000, 0.0000);
  857.     CreateObject(16093, -1283.4213, 2476.8713, 86.2617, 0.0000, 0.0000, 270.0000);
  858.     CreateObject(4853, -1290.9688, 2515.7266, 88.3231, 0.0000, 0.0000, 292.5000);
  859.     CreateObject(1252, -1340.4661, 2472.5381, 88.9848, 0.0000, 0.0000, 225.0000);
  860.     CreateObject(1550, -1309.3625, 2544.3850, 87.1355, 0.0000, 0.0000, 0.0000);
  861.     CreateObject(1550, -1308.8961, 2544.4812, 87.1355, 0.0000, 0.0000, 0.0000);
  862.     CreateObject(1550, -1307.9420, 2543.8079, 87.1355, 0.0000, 0.0000, 0.0000);
  863.     CreateObject(1550, -1309.0991, 2543.3286, 87.1355, 0.0000, 0.0000, 0.0000);
  864.     CreateObject(1550, -1307.9792, 2542.8489, 87.1355, 0.0000, 0.0000, 0.0000);
  865.     CreateObject(1550, -1307.3198, 2542.6135, 87.1355, 0.0000, 0.0000, 0.0000);
  866.     CreateObject(1550, -1307.2151, 2543.5928, 87.1355, 0.0000, 0.0000, 0.0000);
  867.     return 1;
  868. }
  869.  
  870. forward SetPlayerTeamFromClass(playerid,classid);
  871. public SetPlayerTeamFromClass(playerid, classid)
  872. {
  873.     switch(classid)
  874.     {
  875.         case 0:
  876.         {
  877.             GameTextForPlayer(playerid, "~b~IRAN", 1500, 6);
  878.             SetPlayerInterior(playerid,0);
  879.             SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
  880.             SetPlayerFacingAngle(playerid, 270.0);
  881.             SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
  882.             SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
  883.             gTeam[playerid] = TEAM_IRAN;
  884.             SetPlayerTeam(playerid,1);
  885.             ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
  886.          }
  887.          case 1:
  888.          {
  889.             GameTextForPlayer(playerid, "~g~~h~America", 1500, 6);
  890.             SetPlayerInterior(playerid,0);
  891.             SetPlayerPos(playerid,-228.306442,2729.432861,62.687500);
  892.             SetPlayerFacingAngle(playerid, 270.0);
  893.             SetPlayerCameraPos(playerid,-226.306442,2729.432861,62.687500);
  894.             SetPlayerCameraLookAt(playerid,-228.306442,2729.432861,62.687500);
  895.             gTeam[playerid] = TEAM_America;
  896.             SetPlayerTeam(playerid,2);
  897.             ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
  898.         }
  899.         case 2:
  900.         {
  901.               GameTextForPlayer(playerid, "~b~JAPAN", 1500, 6);
  902.             SetPlayerInterior(playerid,0);
  903.             SetPlayerPos(playerid,-1309.324707,2494.259033,89.867187);
  904.             SetPlayerFacingAngle(playerid, 357.1708);
  905.             SetPlayerCameraPos(playerid, -1306.324707,2494.259033,89.867187);
  906.             SetPlayerCameraLookAt(playerid, -1309.324707,2494.259033,89.867187);
  907.             gTeam[playerid] = TEAM_JAPAN;
  908.             SetPlayerTeam(playerid,3);
  909.             ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
  910.                      }
  911.  
  912.         }
  913.  
  914. }
  915. public SendPlayerFormattedText(playerid, const str[], define)
  916. {
  917.     new tmpbuf[256];
  918.     format(tmpbuf, sizeof(tmpbuf), str, define);
  919.     SendClientMessage(playerid, 0xFF004040, tmpbuf);
  920. }
  921.  
  922. public SendAllFormattedText(playerid, const str[], define)
  923. {
  924.     new tmpbuf[256];
  925.     format(tmpbuf, sizeof(tmpbuf), str, define);
  926.     SendClientMessageToAll(0xFFFF00AA, tmpbuf);
  927. }
  928.  
  929. strtok(const string[], &index)
  930. {
  931.     new length = strlen(string);
  932.     while ((index < length) && (string[index] <= ' '))
  933.     {
  934.         index++;
  935.     }
  936.  
  937.     new offset = index;
  938.     new result[20];
  939.     while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  940.     {
  941.         result[index - offset] = string[index];
  942.         index++;
  943.     }
  944.     result[index - offset] = EOS;
  945.     return result;
  946. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement