Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2010
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 19.16 KB | None | 0 0
  1. #include <a_samp>
  2. #include <core>
  3. #include <float>
  4. #include <a_Objects>
  5.  
  6.  
  7. new Text:info;
  8.  
  9. #pragma tabsize 0
  10.  
  11. #define COLOR_GREY 0xAFAFAFAA
  12. #define COLOR_Spain 0x33AA33AA
  13. #define COLOR_RED 0xAA3333AA
  14. #define COLOR_YELLOW 0xFFFF00AA
  15. #define COLOR_WHITE 0xFFFFFFAA
  16. #define COLOR_BLUE 0x0000FFAA
  17. #define COLOR_BROWN 0x993300AA
  18. #define COLOR_ORANGE 0xFF9933AA
  19. #define COLOR_CYAN 0x99FFFFAA
  20. #define COLOR_PINK 0xFF66FFAA
  21. #define COLOR_BLACK 0x2C2727AA
  22. #define COLOR_LIGHTCYAN 0xAAFFCC33
  23. #define COLOR_LEMON 0xDDDD2357
  24. #define COLOR_AQUA 0x7CFC00AA
  25. #define COLOR_WHITEYELLOW 0xFFE87DFF
  26. #define COLOR_BLUEAQUA 0x7E60FFFF
  27. #define COLOR_DARKBLUE 0x15005EFF
  28. #define COLOR_ALIEN 0x90FF87FF
  29. #define COLOR_GOLD 0xB8860BAA
  30. #define COLOR_Netherlands 0x15005EFF
  31. #define COLOR_USA 0x90FF87FF
  32. #define COLOR_Germany 0xB8860BAA
  33. #define KICK_COLOR 0xFF0000FF
  34. #define COLOR_GANGGREEN 0x00FF0096
  35. #define COLOR_BLACK 0x2C2727AA
  36. #define COLOR_SBLUE 0x00BFFFAA
  37. #define INACTIVE_PLAYER_ID 255
  38. #define GIVECASH_DELAY 5000 // Time in ms between /givecash commands.
  39.  
  40. #define NUMVALUES 4
  41. #define TEAM_Netherlands 1
  42. #define TEAM_USA 2
  43. #define TEAM_Germany 3
  44. #define TEAM_Spain 4
  45.  
  46. forward MoneyGrubScoreUpdate();
  47. forward Givecashdelaytimer(playerid);
  48. forward SetupPlayerForClassSelection(playerid);
  49. forward GameModeExitFunc();
  50. forward SendPlayerFormattedText(playerid, const str[], define);
  51. forward public SendAllFormattedText(playerid, const str[], define);
  52.  
  53. //------------------------------------------------------------------------------------------------------
  54.  
  55. new iSpawnSet[MAX_PLAYERS];
  56. new gTeam[MAX_PLAYERS];
  57.  
  58.  
  59. //Round code stolen from mike's Manhunt Tongue
  60. //new gRoundTime = 3600000;                   // Round time - 1 hour
  61. //new gRoundTime = 1200000;               // Round time - 20 mins
  62. //new gRoundTime = 900000;               // Round time - 15 mins
  63. //new gRoundTime = 600000;               // Round time - 10 mins
  64. //new gRoundTime = 300000;               // Round time - 5 mins
  65. //new gRoundTime = 120000;               // Round time - 2 mins
  66. //new gRoundTime = 60000;               // Round time - 1 min
  67.  
  68. new gActivePlayers[MAX_PLAYERS];
  69. new gLastGaveCash[MAX_PLAYERS];
  70.  
  71. //------------------------------------------------------------------------------------------------------
  72.  
  73. main()
  74. {
  75.       print("\n----------------------------------");
  76.       print("         WORLD WAR 6");
  77.       print("          BY DutchAndGangs");
  78.       print("           World War 6 The Best Game");
  79.       print("----------------------------------\n");
  80. }
  81.  
  82. //------------------------------------------------------------------------------------------------------
  83.  
  84. //------------------------------------------------------------------------------------------------------
  85.  
  86. /*public GrubModeReset()
  87. {
  88.    for(new i=0; i<MAX_PLAYERS; i++)
  89.    {
  90.       if (IsPlayerConnected(i))
  91.       {
  92.          SetPlayerScore(i, PocketMoney);
  93.          SetPlayerRandomSpawn(i, classid);
  94.       }
  95.    }
  96.  
  97. }*/
  98.  
  99. //------------------------------------------------------------------------------------------------------
  100.  
  101. public OnPlayerConnect(playerid)
  102. {
  103.    GameTextForPlayer(playerid,"~w~World War 6: ~rWelcome to Your WAR",5000,5);
  104.    SendPlayerFormattedText(playerid, "Welcome to DutchAndGangs WORLD WAR 6!", 0);
  105.    gActivePlayers[playerid]++;
  106.    gLastGaveCash[playerid] = GetTickCount();
  107.     SetPlayerMapIcon( playerid, 0, 214.194396,1863.726440,13.140625, 58, 0 );
  108.    SetPlayerMapIcon( playerid, 1, -228.306442,2729.432861,62.687500, 59, 0 );
  109.    SetPlayerMapIcon( playerid, 2, -1309.324707,2494.259033,89.867187, 60, 0 );
  110.    SetPlayerMapIcon( playerid, 3, 384.733917,2458.126708,16.500000, 6, 0 );
  111.    SetPlayerMapIcon( playerid, 4, 384.733917,2458.126708,16.500000, 6, 0 );
  112.    return 1;
  113. }
  114.  
  115. //------------------------------------------------------------------------------------------------------
  116. public OnPlayerDisconnect(playerid)
  117. {
  118.    gActivePlayers[playerid]--;
  119. }
  120. //------------------------------------------------------------------------------------------------------
  121.  
  122. public OnPlayerCommandText(playerid, cmdtext[])
  123. {
  124.    new string[256];
  125.    new playermoney;
  126.    new sendername[MAX_PLAYER_NAME];
  127.    new giveplayer[MAX_PLAYER_NAME];
  128.    new cmd[256];
  129.    new giveplayerid, moneys, idx;
  130.  
  131.    cmd = strtok(cmdtext, idx);
  132.  
  133.    if(strcmp(cmd, "/help", true) == 0) {
  134.       SendPlayerFormattedText(playerid,"***********Server support***********",0);
  135.       SendPlayerFormattedText(playerid," /Commands",0);
  136.       SendPlayerFormattedText(playerid," /Rules",0);
  137.       SendPlayerFormattedText(playerid," /objective", 0);
  138.     return 1;
  139.    }
  140.    if(strcmp(cmd, "/objective", true) == 0) {
  141.       SendPlayerFormattedText(playerid," WORLD WAR 6 Menu",0);
  142.       SendPlayerFormattedText(playerid," /WeatherMenu",0);
  143.       SendPlayerFormattedText(playerid," /WeaponMenu",0);
  144.       SendPlayerFormattedText(playerid," Voor Rcon Admins»", 0);
  145.       SendPlayerFormattedText(playerid," /Rcon Login [password]", 0);
  146.     return 1;
  147.    }
  148.    if(strcmp(cmd, "/Rules", true) == 0) {
  149.       SendPlayerFormattedText(playerid," No Cheat Or Ban. Geen Gecheat Of Gebang",0);
  150.       SendPlayerFormattedText(playerid," No Kill Team Or Jail/Kick. Geen Team Leden Vermoorden, Kicken En Gevangen Houden",0);
  151.       SendPlayerFormattedText(playerid," Listen Team. Luister Naar Je Team Genoten",0);
  152.       SendPlayerFormattedText(playerid," Respect Al Admins. Respecteer Alle Admins", 0);
  153.         SendPlayerFormattedText(playerid," Many Fun Game. Veel Speel Plezier", 0);
  154.    return 1;
  155.    }
  156.    if(strcmp(cmd, "/Commands", true) == 0) {
  157.       SendClientMessage(playerid, COLOR_BLUE," /givecash [playerid] [amount] ");
  158.       SendClientMessage(playerid, COLOR_BLUE," /STATS ");
  159.       SendClientMessage(playerid, COLOR_BLUE," /Report id reasoS ");
  160.       SendClientMessage(playerid, COLOR_BLUE," /kill ");
  161.     return 1;
  162.    }
  163.    
  164.     if(strcmp(cmd, "/givecash", true) == 0) {
  165.        new tmp[256];
  166.       tmp = strtok(cmdtext, idx);
  167.  
  168.       if(!strlen(tmp)) {
  169.          SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givecash [playerid] [amount]");
  170.          return 1;
  171.       }
  172.       giveplayerid = strval(tmp);
  173.      
  174.       tmp = strtok(cmdtext, idx);
  175.       if(!strlen(tmp)) {
  176.          SendClientMessage(playerid, COLOR_WHITE, "USAGE: /givecash [playerid] [amount]");
  177.          return 1;
  178.       }
  179.        moneys = strval(tmp);
  180.      
  181.       //printf("givecash_command: %d %d",giveplayerid,moneys);
  182.  
  183.      
  184.       if (IsPlayerConnected(giveplayerid)) {
  185.          GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
  186.          GetPlayerName(playerid, sendername, sizeof(sendername));
  187.          playermoney = GetPlayerMoney(playerid);
  188.          if (moneys > 0 && playermoney >= moneys) {
  189.             GivePlayerMoney(playerid, (0 - moneys));
  190.             GivePlayerMoney(giveplayerid, moneys);
  191.             format(string, sizeof(string), "You have sent %s(player: %d), $%d.", giveplayer,giveplayerid, moneys);
  192.             SendClientMessage(playerid, COLOR_YELLOW, string);
  193.             format(string, sizeof(string), "You have recieved $%d from %s(player: %d).", moneys, sendername, playerid);
  194.             SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  195.             printf("%s(playerid:%d) has transfered %d to %s(playerid:%d)",sendername, playerid, moneys, giveplayer, giveplayerid);
  196.          }
  197.          else {
  198.             SendClientMessage(playerid, COLOR_YELLOW, "Invalid transaction amount.");
  199.          }
  200.       }
  201.       else {
  202.             format(string, sizeof(string), "%d is not an active player.", giveplayerid);
  203.             SendClientMessage(playerid, COLOR_YELLOW, string);
  204.          }
  205.       return 1;
  206.    }
  207.    
  208.    // PROCESS OTHER COMMANDS
  209.    
  210.    
  211.    return 0;
  212. }
  213.  
  214. //------------------------------------------------------------------------------------------------------
  215.  
  216. public OnPlayerSpawn(playerid)
  217. {
  218.    SetPlayerInterior(playerid,0);
  219.    TogglePlayerClock(playerid,0);
  220.     SetPlayerToTeamColor(playerid);
  221.     SetWeather(12);
  222.    return 1;
  223. }
  224. forward SetPlayerToTeamColor(playerid);
  225. public SetPlayerToTeamColor(playerid)
  226. {
  227.     if (gTeam[playerid] == TEAM_Netherlands) //|| GetPlayerTeam(playerid) == 1)
  228.     {
  229.         SetPlayerColor(playerid, COLOR_Netherlands);
  230.         SetPlayerInterior(playerid,0);
  231.       SetPlayerArmour(playerid,1000);
  232.     }
  233.     else if (gTeam[playerid] == TEAM_USA) //|| GetPlayerTeam(playerid) == 2)
  234.     {
  235.         SetPlayerColor(playerid, COLOR_USA);
  236.         SetPlayerInterior(playerid,0);
  237.         SetPlayerArmour(playerid,1000);
  238.     }
  239.     else if (gTeam[playerid] == TEAM_Germany) //|| GetPlayerTeam(playerid) == 3)
  240.     {
  241.         SetPlayerColor(playerid, COLOR_Germany);
  242.         SetPlayerInterior(playerid,0);
  243.         SetPlayerArmour(playerid,1000);
  244.     }
  245.      else if (gTeam[playerid] == TEAM_Spain) //|| GetPlayerTeam(playerid) == 4)
  246.     {
  247.         SetPlayerColor(playerid, COLOR_Spain);
  248.         SetPlayerInterior(playerid,0);
  249.         SetPlayerArmour(playerid,1000);
  250.     }
  251. }
  252.  
  253. //------------------------------------------------------------------------------------------------------
  254. /* public OnPlayerDeath(playerid, killerid, reason)
  255. {   haxed by teh mike
  256.    new name[MAX_PLAYER_NAME];
  257.    new string[256];
  258.    new deathreason[20];
  259.    new playercash;
  260.    GetPlayerName(playerid, name, sizeof(name));
  261.    GetWeaponName(reason, deathreason, 20);
  262.    if (killerid == INVALID_PLAYER_ID) {
  263.        switch (reason) {
  264.          case WEAPON_DROWN:
  265.          {
  266.                 format(string, sizeof(string), "*** %s drowned.)", name);
  267.          }
  268.          default:
  269.          {
  270.              if (strlen(deathreason) > 0) {
  271.                format(string, sizeof(string), "*** %s died. (%s)", name, deathreason);
  272.             } else {
  273.                 format(string, sizeof(string), "*** %s died.", name);
  274.             }
  275.          }
  276.       }
  277.    }
  278.    else {
  279.    new killer[MAX_PLAYER_NAME];
  280.    GetPlayerName(killerid, killer, sizeof(killer));
  281.    if (strlen(deathreason) > 0) {
  282.       format(string, sizeof(string), "*** %s killed %s. (%s)", killer, name, deathreason);
  283.       } else {
  284.             format(string, sizeof(string), "*** %s killed %s.", killer, name);
  285.          }
  286.       }
  287.    SendClientMessageToAll(COLOR_RED, string);
  288.       {
  289.       playercash = GetPlayerMoney(playerid);
  290.       if (playercash > 0)
  291.       {
  292.          GivePlayerMoney(killerid, playercash);
  293.          ResetPlayerMoney(playerid);
  294.       }
  295.       else
  296.       {
  297.       }
  298.    }
  299.     return 1;
  300. }*/
  301.  
  302. //------------------------------------------------------------------------------------------------------
  303.  
  304. public OnPlayerRequestClass(playerid, classid)
  305. {
  306.    iSpawnSet[playerid] = 0;
  307.    SetupPlayerForClassSelection(playerid);
  308.    SetPlayerTeamFromClass(playerid, classid);
  309.    return 1;
  310. }
  311.  
  312. public SetupPlayerForClassSelection(playerid)
  313. {
  314.     SetPlayerInterior(playerid,0);
  315.    SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
  316.    SetPlayerFacingAngle(playerid, 270.0);
  317.    SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
  318.    SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
  319. }
  320.  
  321. public GameModeExitFunc()
  322. {
  323.    GameModeExit();
  324. }
  325.  
  326. public OnGameModeInit()
  327. {
  328.  
  329.    SetGameModeText("WORLD WAR 6");
  330.    UsePlayerPedAnims();
  331.     AllowInteriorWeapons(1);
  332.     SetWeather(32);
  333.  
  334.    ShowPlayerMarkers(1);
  335.     ShowNameTags(1);
  336.    
  337.     info = TextDrawCreate(0.0, 434.0,"WORLD WAR 6: DutchAndGangs.tk");
  338.     TextDrawFont(info,0);
  339.     TextDrawLetterSize(info,1,1);
  340.     TextDrawColor(info,0xF600FF);
  341.     TextDrawSetShadow(info,1);
  342.     TextDrawSetOutline(info,1);
  343.     TextDrawBackgroundColor(info,0x000FF);
  344.     TextDrawUseBox(info,0);
  345.  
  346.    // Player Class's
  347.    AddPlayerClass(287,214.194396,1863.726440,13.140625,270.1425,31,3121,24,300,16,100);
  348.    AddPlayerClass(285,-228.306442,2729.432861,62.687500,270.1425,31,3120,24,300,16,100);
  349.    AddPlayerClass(277,-1309.324707,2494.259033,89.867187,270.1425,30,3120,24,300,16,100);
  350.    // Car Spawns
  351.  
  352.    AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
  353.    AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
  354.    AddStaticVehicle(451,2040.0520,1319.2799,10.3779,183.2439,16,16);
  355.    //ROMANIA
  356.    AddStaticVehicle(432,278.9016,1950.7509,17.6532,88.9054,43,0); // Hunter
  357.    AddStaticVehicle(432,282.3510,1987.1381,17.6535,87.2516,43,0); // Hunter
  358.    AddStaticVehicle(432,278.2103,2020.6830,17.6535,98.7492,43,0); // Hunter
  359.    AddStaticVehicle(425,342.1974,1874.3889,18.3136,104.1868,34,0); // Hunter
  360.    AddStaticVehicle(425,339.5558,1855.1088,18.5525,108.6887,43,0); // Hunter
  361.    AddStaticVehicle(520,338.5540,1930.7616,18.7074,272.5084,0,0); // Hydra
  362.    AddStaticVehicle(520,358.0111,1916.5072,18.6420,266.0934,0,0); // Hydra
  363.    AddStaticVehicle(520,358.7953,1892.7484,18.3639,109.5348,0,0); // Hydra
  364.    AddStaticVehicle(520,366.4059,1960.9697,18.3639,280.4560,0,0); // Hydra
  365.    AddStaticVehicle(520,331.8059,1968.1923,18.3639,97.8575,0,0); // Hydra
  366.    AddStaticVehicle(425,343.2718,1946.3412,18.2241,274.0224,43,0); // Hunter
  367.    AddStaticVehicle(520,229.651931,1892.521972,17.211687,274.0224,43,0); // Hydra
  368.    AddStaticVehicle(432,182.544204,1909.152343,17.469060,274.0224,43,0); // Rhino
  369.    AddStaticVehicle(470,184.454849,1948.658813,17.396722,0.0,43,0); // Patriot
  370.    AddStaticVehicle(470,184.454849,1953.658813,17.396722,0.0,43,0); // Patriot
  371.    //USA
  372.    AddStaticVehicle(470,-224.073669,2751.190185,62.539062,274.0224,43,0); // Patriot
  373.    AddStaticVehicle(470,-224.073669,2755.190185,62.539062,274.0224,43,0); // Patriot
  374.    AddStaticVehicle(520,-197.495452,2725.493164,62.687500,280.4560,0,0); // Hydra
  375.    AddStaticVehicle(432,-257.033142,2701.294189,62.535140,88.2516,43,0); // Rhino
  376.    AddStaticVehicle(425,-294.516601,2741.593261,61.895484,100.2516,43,0); // Hunter
  377.    AddStaticVehicle(520,-306.612548,2676.907470,62.599357,60.2516,43,0); // Hydra
  378.    
  379.    //Rusia
  380.    AddStaticVehicle(470,-1294.959960,2447.247558,88.042465,0.0,43,0); // Patriot
  381.    AddStaticVehicle(470,-1297.959960,2447.247558,88.042465,0.0,43,0); // Patriot
  382.    AddStaticVehicle(470,-1291.959960,2447.247558,88.042465,0.0,43,0); // Patriot
  383.    AddStaticVehicle(520,-1329.691162,2488.202148,87.046875,120.0,43,0); // Hydra
  384.    AddStaticVehicle(425,-1302.751953,2479.679687,87.278709,0.0,43,0); // Hunter
  385.    AddStaticVehicle(432,-1298.280273,2504.918212,86.957275,88.2516,43,0); // Rhino
  386.  
  387.    AddStaticPickup(371, 15, -320.800262,2742.728759,62.952674); //para
  388.    AddStaticPickup(370, 15, 384.733917,2474.126708,16.500000); //para
  389.    AddStaticPickup(355, 15, 384.733917,2472.126708,16.500000); //para
  390.    AddStaticPickup(352, 15, 384.733917,2470.126708,16.500000); //para
  391.    AddStaticPickup(351, 15, 384.733917,2468.126708,16.500000); //para
  392.    AddStaticPickup(350, 15, 384.733917,2466.126708,16.500000); //para
  393.    AddStaticPickup(349, 15, 384.733917,2464.126708,16.500000); //para
  394.    AddStaticPickup(348, 15, 384.733917,2462.126708,16.500000); //para
  395.    AddStaticPickup(344, 15, 384.733917,2460.126708,16.500000); //para
  396.    AddStaticPickup(342, 15, 384.733917,2458.126708,16.500000); //para
  397.    AddStaticPickup(359, 15, 384.733917,2456.126708,16.500000); //para
  398.    AddStaticPickup(358, 15, 384.733917,2454.126708,16.500000); //para
  399.    AddStaticPickup(357, 15, 384.733917,2452.126708,16.500000); //para
  400.    AddStaticPickup(356, 15, 384.733917,2450.126708,16.500000); //para
  401.    AddStaticPickup(366, 15, 384.733917,2448.126708,16.500000); //para
  402.    AddStaticPickup(367, 15, 384.733917,2446.126708,16.500000); //para
  403.    AddStaticPickup(365, 15, 384.733917,2444.126708,16.500000); //para
  404.    AddStaticPickup(364, 15, 384.733917,2442.126708,16.500000); //para
  405.    AddStaticPickup(363, 15, 384.733917,2440.126708,16.500000); //para
  406.    
  407.    //objects
  408.    CreateObject (3819, 2495,4912109375, -1657,5728759766, 13.356578826904, 0, 0, 0);//bank
  409.    CreateObject (3819, 2495,5092773438, -1666,2803955078, 13.341507911682, 0, 0, 0);//bank
  410.    CreateObject (3819, 2495,2939453125, -1679,7937011719, 13.336633682251, 0, 0 , 0);//bank
  411.    CreateObject (13630, 2502,5231933594, -1669,6782226563, 25.025682449341, 0, 0, 0);//score bord
  412.  
  413.    SetTimer("MoneyGrubScoreUpdate", 1000, 1);
  414.    //SetTimer("GameModeExitFunc", gRoundTime, 0);
  415.    
  416.    return 1;
  417. }
  418.  
  419. forward SetPlayerTeamFromClass(playerid,classid);
  420. public SetPlayerTeamFromClass(playerid, classid)
  421. {
  422.    switch(classid)
  423.    {
  424.        case 0:
  425.        {
  426.           GameTextForPlayer(playerid, "~b~Netherlands", 1500, 6);
  427.           SetPlayerInterior(playerid,0);
  428.           SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
  429.            SetPlayerFacingAngle(playerid, 270.0);
  430.            SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
  431.            SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
  432.           gTeam[playerid] = TEAM_Netherlands;
  433.           SetPlayerTeam(playerid,1);
  434.            ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
  435.        }
  436.        case 1:
  437.        {
  438.           GameTextForPlayer(playerid, "~g~~h~USA", 1500, 6);
  439.           SetPlayerInterior(playerid,0);
  440.           SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
  441.            SetPlayerFacingAngle(playerid, 270.0);
  442.            SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
  443.            SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
  444.           gTeam[playerid] = TEAM_USA;
  445.           SetPlayerTeam(playerid,2);
  446.           ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
  447.       }
  448.       case 2:
  449.       {
  450.             GameTextForPlayer(playerid, "~b~Germany", 1500, 6);
  451.           SetPlayerInterior(playerid,0);
  452.           SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
  453.           SetPlayerFacingAngle(playerid, 357.1708);
  454.           SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
  455.           SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
  456.           gTeam[playerid] = TEAM_Germany;
  457.           SetPlayerTeam(playerid,3);
  458.           ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
  459.         }
  460.         case 3:
  461.       {
  462.             GameTextForPlayer(playerid, "~b~Spain", 1500, 6);
  463.           SetPlayerInterior(playerid,0);
  464.           SetPlayerPos(playerid,222.472366,1822.878784,6.414062);
  465.           SetPlayerFacingAngle(playerid, 280.0);
  466.           SetPlayerCameraPos(playerid,224.472366,1822.878784,7.414062);
  467.           SetPlayerCameraLookAt(playerid,222.472366,1822.878784,6.414062);
  468.           gTeam[playerid] = TEAM_Spain;
  469.           SetPlayerTeam(playerid,3);
  470.           ApplyAnimation(playerid,"PED","fucku",4.0,0,0,0,0,0);
  471.                      }
  472.  
  473.  
  474.  
  475.  
  476.       }
  477.  
  478.       }
  479.  
  480. public SendPlayerFormattedText(playerid, const str[], define)
  481. {
  482.    new tmpbuf[256];
  483.    format(tmpbuf, sizeof(tmpbuf), str, define);
  484.    SendClientMessage(playerid, 0xFF004040, tmpbuf);
  485. }
  486.  
  487. public SendAllFormattedText(playerid, const str[], define)
  488. {
  489.    new tmpbuf[256];
  490.    format(tmpbuf, sizeof(tmpbuf), str, define);
  491.    SendClientMessageToAll(0xFFFF00AA, tmpbuf);
  492. }
  493.  
  494. strtok(const string[], &index)
  495. {
  496.    new length = strlen(string);
  497.    while ((index < length) && (string[index] <= ' '))
  498.    {
  499.       index++;
  500.    }
  501.  
  502.    new offset = index;
  503.    new result[20];
  504.    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  505.    {
  506.       result[index - offset] = string[index];
  507.       index++;
  508.    }
  509.    result[index - offset] = EOS;
  510.    return result;
  511. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement