Advertisement
Guest User

Untitled

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