Guest
Public paste!

CopBot

By: a guest | Aug 26th, 2009 | Syntax: None | Size: 22.06 KB | Hits: 225 | Expires: Never
Copy text to clipboard
  1. /*  CopBot´s Fun Santos Script
  2.  *
  3.  *  (c) Copyright 2008-2009, CopBot
  4.  *
  5.  */
  6.  
  7. #include <a_samp>
  8.  
  9. AntiDeAMX()
  10. {
  11.         new a[][] =
  12.         {
  13.                 "Unarmed (Fist)",
  14.                 "Brass K"
  15.         };
  16.         #pragma unused a
  17. }
  18.  
  19. #pragma tabsize 0
  20.  
  21. // =================DEFINES====================
  22.  
  23. // =================DEFINES====================
  24.  
  25. // =================NEW========================
  26. new PlayerFlara[200];
  27. new GodTimer;
  28. new God[MAX_PLAYERS];
  29. new Weapons[MAX_PLAYERS];
  30. new WeaponSet[4][5] =
  31. {
  32.     {9, 24, 26, 32, 38},
  33.     {8, 23, 25, 30, 37},
  34.     {2, 10, 22, 28, 41},
  35.     {5, 14, 23, 29, 42}
  36. };
  37. new Farben[100] = {
  38. 0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,0xEE82EEFF,0xFFD720FF,
  39. 0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,
  40. 0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,
  41. 0x275222FF,0xF09F5BFF,0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,
  42. 0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,0x4B8987FF,
  43. 0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF,
  44. 0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,
  45. 0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,
  46. 0x9F945CFF,0xDCDE3DFF,0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF,
  47. 0x3FE65CFF
  48. };
  49.  
  50. // =================NEW========================
  51.  
  52. // =================FORWARD====================
  53. forward uLeben();
  54. forward SetupPlayerForClassSelection(playerid);
  55. forward autocarrep();
  56. // =================FORWARD====================
  57.  
  58. main()
  59. {
  60.         print("\n----------------------------------");
  61.         print(" Fun Santos");
  62.         print("----------------------------------\n");
  63. }
  64.  
  65. public OnGameModeInit()
  66. {
  67.         // ================WICHTIGES====================
  68.         ShowPlayerMarkers(1);
  69.         ShowNameTags(1);
  70.         SetGameModeText("Fun Santos");
  71.         UsePlayerPedAnims();
  72.         // ================WICHTIGES====================
  73.        
  74.         // ================ Skins ======================
  75.         AddPlayerClass(0, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  76.         AddPlayerClass(105,1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  77.         AddPlayerClass(106, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  78.         AddPlayerClass(107, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  79.         AddPlayerClass(102, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  80.         AddPlayerClass(103, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  81.         AddPlayerClass(104, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  82.         AddPlayerClass(114, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  83.         AddPlayerClass(115, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  84.         AddPlayerClass(116, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  85.         AddPlayerClass(108, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  86.         AddPlayerClass(109, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  87.         AddPlayerClass(110, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  88.         AddPlayerClass(121, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  89.         AddPlayerClass(122, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  90.         AddPlayerClass(123, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  91.         AddPlayerClass(173, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  92.         AddPlayerClass(174, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  93.         AddPlayerClass(175, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  94.         AddPlayerClass(117, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  95.         AddPlayerClass(118, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  96.         AddPlayerClass(120, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  97.         AddPlayerClass(100, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  98.         AddPlayerClass(247, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  99.         AddPlayerClass(248, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  100.         AddPlayerClass(254, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  101.         AddPlayerClass(110, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  102.         AddPlayerClass(111, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  103.         AddPlayerClass(112, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  104.         AddPlayerClass(113, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  105.         AddPlayerClass(114, 1333.5206,-876.6409,39.5781, 269.1425, 0, 0, 0, 0, 0, 0);
  106.         AddPlayerClass(127, 1333.5206,-876.6409,39.5781,88.3617, 0, 0, 0, 0, 0, 0);
  107.         // ================ Skins ======================
  108.        
  109.        
  110.         // ================Fahrzeuge========================
  111.         AddStaticVehicle(560,1307.0844,-875.6241,39.2829,269.7332,9,39); // sultan
  112.         AddStaticVehicle(560,1307.0488,-871.8948,39.2835,269.3981,17,1); // Sultan
  113.         AddStaticVehicle(560,1307.0936,-868.2235,39.2830,269.9884,21,1); // Sultan
  114.         AddStaticVehicle(411,1307.2502,-864.3741,39.3052,268.9280,64,1); // Infernus
  115.         AddStaticVehicle(411,1307.3704,-860.1829,39.3052,267.6555,123,1); // Infernus
  116.         AddStaticVehicle(411,1307.5551,-856.4960,39.3052,267.7245,116,1); // Infernus
  117.         AddStaticVehicle(541,1307.2222,-852.8265,39.2031,264.1539,58,8); // Bullet
  118.         AddStaticVehicle(541,1317.1100,-853.6406,39.2031,264.6028,60,1); // Bullet
  119.         AddStaticVehicle(541,1325.8672,-854.5356,39.2029,265.3128,68,8); // Bullet
  120.         AddStaticVehicle(522,1326.7155,-877.8867,39.1466,359.9636,3,8); // NRG
  121.         AddStaticVehicle(522,1326.7291,-881.4808,39.1461,359.9821,6,25); // NRG
  122.         AddStaticVehicle(522,1326.7440,-884.8809,39.1433,1.3506,7,79); // NRG
  123.         AddStaticVehicle(522,1272.3826,-942.1257,41.9465,204.0180,3,8); // NRG VERSTECKT
  124.         AddStaticVehicle(522,1267.4858,-894.4556,42.4386,7.9140,3,8); // NRG VERSTECKT
  125.         AddStaticVehicle(522,1125.1238,-931.2557,42.6234,91.4166,3,8); // NRG VERSTECKT
  126.         AddStaticVehicle(522,1045.9019,-918.2383,42.1707,98.4215,3,8); // NRG VERSTECKT
  127.         AddStaticVehicle(522,1263.9409,-868.7991,42.4493,8.5405,3,8); // NRG VERSTECKT
  128.         AddStaticVehicle(522,1280.8527,-854.4664,42.5177,278.6292,3,8); // NRG VERSTECKT
  129.         AddStaticVehicle(411,1227.5471,-919.0209,42.6296,100.6038,123,1); // Infernus
  130.         // ================Fahrzeuge========================
  131.        
  132.         // ================OBJEKTE==========================
  133.         // SPAWN - 14
  134.         CreateObject(3578, 1337.408081, -912.044739, 34.382195, 0.0000, 3.4377, 0.0000);
  135.         CreateObject(1248, 1326.354370, -879.540222, 41.183651, 0.0000, 0.0000, 90.0001);
  136.         CreateObject(1277, 1326.354248, -879.508362, 40.462135, 0.0000, 0.0000, 90.0000);
  137.         CreateObject(3461, 1334.192261, -915.230408, 36.844746, 0.0000, 0.0000, 0.0000);
  138.         CreateObject(3461, 1342.699463, -918.695435, 36.064903, 0.0000, 0.0000, 0.0000);
  139.         CreateObject(3515, 1334.044556, -876.216125, 37.423309, 0.0000, 0.0000, 0.0000);
  140.         CreateObject(3525, 1326.452393, -878.918091, 40.921383, 0.0000, 0.0000, 90.0000);
  141.         CreateObject(3525, 1326.456543, -880.175903, 40.923759, 0.0000, 0.0000, 90.0000);
  142.         CreateObject(3864, 1331.008667, -899.999329, 44.675152, 0.0000, 0.0000, 247.5001);
  143.         CreateObject(3877, 1311.508789, -910.670532, 39.141338, 0.0000, 0.0000, 0.0000);
  144.         CreateObject(3877, 1319.813965, -911.400757, 38.330421, 0.0000, 0.0000, 0.0000);
  145.         CreateObject(1215, 1342.366577, -912.104309, 35.446205, 0.0000, 0.0000, 0.0000);
  146.         CreateObject(1215, 1334.202148, -912.135315, 35.921764, 0.0000, 0.0000, 0.0000);
  147.        
  148.         // MonsterTruck - 18
  149.         CreateObject(4867, 2444.707031, -1578.289185, 154.984985, 0.0000, 0.0000, 0.0000);
  150.         CreateObject(16121, 2338.307617, -1508.930786, 153.941879, 0.0000, 0.0000, 0.0000);
  151.         CreateObject(16121, 2377.401855, -1492.840088, 154.941757, 0.0000, 0.0000, 251.0151);
  152.         CreateObject(16121, 2343.392334, -1549.988037, 154.741806, 0.0000, 0.0000, 337.4999);
  153.         CreateObject(16122, 2349.555908, -1639.331177, 155.444107, 0.0000, 0.0000, 22.5000);
  154.         CreateObject(16122, 2430.261719, -1667.750366, 151.869186, 0.0000, 0.0000, 112.5001);
  155.         CreateObject(16123, 2351.696777, -1575.572510, 166.006500, 0.0000, 0.8594, 351.9558);
  156.         CreateObject(16122, 2414.830811, -1491.041504, 152.893997, 0.0000, 0.0000, 292.5000);
  157.         CreateObject(16122, 2516.532471, -1655.823120, 154.643997, 0.0000, 0.0000, 112.5001);
  158.         CreateObject(16122, 2469.851807, -1497.627930, 155.082321, 0.0000, 0.0000, 292.5000);
  159.         CreateObject(16122, 2541.419434, -1525.980957, 153.893997, 0.0000, 0.0000, 202.5000);
  160.         CreateObject(16122, 2539.899414, -1610.197021, 155.519089, 0.0000, 0.0000, 202.5000);
  161.         CreateObject(3578, 2497.647461, -1567.499878, 155.763016, 0.0000, 0.0000, 0.0000);
  162.         CreateObject(3578, 2480.086914, -1567.538086, 155.763016, 0.0000, 0.0000, 0.0000);
  163.         CreateObject(3578, 2462.694824, -1567.508911, 155.763016, 0.0000, 0.0000, 0.0000);
  164.         CreateObject(3578, 2422.474121, -1567.425659, 155.763016, 0.0000, 0.0000, 0.0000);
  165.         CreateObject(3578, 2402.119873, -1567.520752, 155.763016, 0.0000, 0.0000, 0.0000);
  166.         CreateObject(3578, 2384.914795, -1567.497925, 155.763016, 0.0000, 0.0000, 0.0000);
  167.         // ================OBJEKTE==========================
  168.        
  169.        
  170.         // ================TIMER========================
  171.         GodTimer = SetTimer("uLeben",50,1);
  172.         SetTimer("autocarrep", 750, 1);
  173.         // ================TIMER========================
  174.         return 1;
  175. }
  176.  
  177. public OnGameModeExit()
  178. {
  179.     KillTimer(GodTimer);
  180.         return 1;
  181. }
  182.  
  183. public OnPlayerRequestClass(playerid, classid)
  184. {
  185.         SetupPlayerForClassSelection(playerid);
  186.         return 1;
  187. }
  188.  
  189. public OnPlayerRequestSpawn(playerid)
  190. {
  191.         return 1;
  192. }
  193.  
  194. public OnPlayerConnect(playerid)
  195. {
  196.         SendClientMessage(playerid, 0xAA3333AA, "Wilkommen auf dem Fun Santos Server");
  197.     SendClientMessage(playerid, 0xAA3333AA, "==========Script Version: 0.1==========");
  198.         return 1;
  199. }
  200.  
  201. public OnPlayerDisconnect(playerid, reason)
  202. {
  203.     SendClientMessage(playerid, 0xAA3333AA, "Bye Bye");
  204.         return 1;
  205. }
  206.  
  207. public OnPlayerSpawn(playerid)
  208. {
  209.     SetPlayerArmour(playerid,100);
  210.         SetPlayerHealth(playerid,100);
  211.         SendClientMessage(playerid, 0xAA3333AA, "/cmds");
  212.         AntiDeAMX();
  213.         return 1;
  214. }
  215.  
  216. public OnPlayerDeath(playerid, killerid, reason)
  217. {
  218.     SendDeathMessage(killerid, playerid, reason);
  219.         SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
  220.         SetPlayerScore(playerid, GetPlayerScore(playerid)+-1);
  221.         ResetPlayerWeapons(playerid);
  222.         new Float:health;
  223.         GetPlayerHealth(killerid, health);
  224.         SetPlayerHealth(killerid, health+25);
  225.         return 1;
  226. }
  227.  
  228. public OnVehicleSpawn(vehicleid)
  229. {
  230.         return 1;
  231. }
  232.  
  233. public OnVehicleDeath(vehicleid, killerid)
  234. {
  235.         return 1;
  236. }
  237.  
  238. public OnPlayerText(playerid, text[])
  239. {
  240.         return 1;
  241. }
  242.  
  243. public OnPlayerPrivmsg(playerid, recieverid, text[])
  244. {
  245.         return 1;
  246. }
  247.  
  248. public OnPlayerCommandText(playerid, cmdtext[])
  249. {
  250.         new string[200];
  251. //      new cmd[256];
  252.         new Ang;
  253. // ======================PORTS=======================================
  254.         if (strcmp("/spawn", cmdtext, true, 10) == 0)
  255.             {
  256.             SetPlayerPos(playerid, 1333.5206,-876.6409,39.5781);
  257.             return 1;
  258.             }
  259. // ======================AB/AUF SCHLIEßEN ===========================
  260.         if (strcmp(cmdtext, "/abschließen", true)==0)
  261.                 {
  262.                         if(IsPlayerInAnyVehicle(playerid))
  263.                         {
  264.                                 new State=GetPlayerState(playerid);
  265.                                 if(State!=PLAYER_STATE_DRIVER)
  266.                                 {
  267.                                         SendClientMessage(playerid,0xFFFF00AA,"Du bist nicht der Fahrer!");
  268.                                         return 1;
  269.                                 }
  270.                                 new i;
  271.                                 for(i=0;i<MAX_PLAYERS;i++)
  272.                                 {
  273.                                         if(i != playerid)
  274.                                         {
  275.                                                 SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
  276.                                         }
  277.                                 }
  278.                                 SendClientMessage(playerid, 0xFFFF00AA, "Fahrzeug abgeschlossen!");
  279.                         new Float:pX, Float:pY, Float:pZ;
  280.                                 GetPlayerPos(playerid,pX,pY,pZ);
  281.                                 PlayerPlaySound(playerid,1056,pX,pY,pZ);
  282.                         }
  283.                         else
  284.                         {
  285.                                 SendClientMessage(playerid, 0xFFFF00AA, "Du bist in keinem Fahrzeug!");
  286.                         }
  287.                         return 1;
  288.                 }
  289.  
  290.  
  291.         if (strcmp(cmdtext, "/aufschließen", true)==0)
  292.                 {
  293.                         if(IsPlayerInAnyVehicle(playerid))
  294.                         {
  295.                                 new State=GetPlayerState(playerid);
  296.                                 if(State!=PLAYER_STATE_DRIVER)
  297.                                 {
  298.                                         SendClientMessage(playerid,0xFFFF00AA,"Du bist nicht der Fahrer!");
  299.                                         return 1;
  300.                                 }
  301.                                 new i;
  302.                                 for(i=0;i<MAX_PLAYERS;i++)
  303.                                 {
  304.                                         SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
  305.                                 }
  306.                                 SendClientMessage(playerid, 0xFFFF00AA, "Fahrzeug aufgeschlossen!");
  307.                                 new Float:pX, Float:pY, Float:pZ;
  308.                                 GetPlayerPos(playerid,pX,pY,pZ);
  309.                                 PlayerPlaySound(playerid,1057,pX,pY,pZ);
  310.                         }
  311.                         else
  312.                         {
  313.                                 SendClientMessage(playerid, 0xFFFF00AA, "Du bist in keinem Fahrzeug!");
  314.                         }
  315.                         return 1;
  316.                 }
  317. // ======================AB/AUF SCHLIEßEN ===========================
  318.                
  319. // ======================LEBEN & WAFFEN ===========================
  320.    if((strcmp(cmdtext,"/god",true)==0)||(strcmp(cmdtext,"/godmode",true)==0))
  321.         {
  322.             if(God[playerid] == 0)
  323.             {
  324.                 God[playerid] = 1;
  325.                 SendClientMessage(playerid,0x33AA33AA,"GODMODE AN");
  326.             }
  327.             else
  328.             {
  329.                 God[playerid] = 0;
  330.                 SendClientMessage(playerid,0xAA3333AA,"GODMODE AUS");
  331.                 SetPlayerHealth(playerid, 100);
  332.             }
  333.         return 1;
  334.     }
  335.     if((strcmp(cmdtext,"/waffen",true)==0)||(strcmp(cmdtext,"/weapons",true)==0))
  336.     {
  337.             new setid = random(sizeof(WeaponSet));
  338.             new ammos = 999999999;
  339.             if (Weapons[playerid] == 0)
  340.             {
  341.                 Weapons[playerid] = 1;
  342.                 GivePlayerWeapon(playerid,WeaponSet[setid][0],1);
  343.                 GivePlayerWeapon(playerid,WeaponSet[setid][1],ammos);
  344.                 GivePlayerWeapon(playerid,WeaponSet[setid][2],ammos);
  345.                 GivePlayerWeapon(playerid,WeaponSet[setid][3],ammos);
  346.                 GivePlayerWeapon(playerid,WeaponSet[setid][4],ammos);
  347.             }
  348.             else
  349.             {
  350.                 Weapons[playerid] = 0;
  351.                 ResetPlayerWeapons(playerid);
  352.                 GivePlayerWeapon(playerid,24,507);
  353.         }
  354.         return 1;
  355.     }
  356. // ======================LEBEN & WAFFEN ===========================
  357.                        
  358.                        
  359. // ======================FUN CMDS===========================
  360.         if (strcmp(cmdtext, "/flip", true)==0)
  361.                 {
  362.                   new VehicleID, Float:X, Float:Y, Float:Z;
  363.           GetPlayerPos(playerid, X, Y, Z);
  364.                   VehicleID = GetPlayerVehicleID(playerid);
  365.                   SetVehiclePos(VehicleID, X, Y, Z + 20.55);
  366.                   SetVehicleZAngle(VehicleID, 0);
  367.                     return 1;
  368.                 }
  369.                 if (strcmp(cmdtext, "/neuefarbe", true)==0)
  370.                 {
  371.                 SetPlayerColor(playerid, Farben[playerid]);
  372.                 return 1;
  373.                 }
  374.                 /*      if(strcmp(cmd, "/woho", true)==0)
  375.                                  {
  376.                                 if(IsPlayerInAnyVehicle(playerid))
  377.                                  {
  378.                         new Float:X;
  379.                                 new Float:Y;
  380.                                 new Float:Z;
  381.                             new VehicleID;
  382.                             GetPlayerPos(playerid, X, Y, Z);
  383.                             VehicleID = GetPlayerVehicleID(playerid);
  384.                                 SetVehiclePos(VehicleID, X, Y, Z + 800.00);
  385.                                 SetPlayerFacingAngle(playerid,Ang);
  386.                                 GivePlayerWeapon(playerid,46,1);
  387.                                 }
  388.                                  else
  389.  
  390.                                  {
  391.                                         new Float:X;
  392.                                         new Float:Y;
  393.                                         new Float:Z;
  394.                                         GetPlayerPos(playerid, X, Y, Z);
  395.                                         SetPlayerPos(playerid, X, Y, Z + 800.00);
  396.                                         SetPlayerFacingAngle(playerid,Ang);
  397.                                         GivePlayerWeapon(playerid,46,1);
  398.                                         GameTextForPlayer(playerid, "~w~WOOOHOOOOO!!",8000,5);
  399.                                 }
  400.                                 return 1;
  401.                 }*/
  402.                
  403.                         if (strcmp(cmdtext, "/woho", true)==0)
  404.                         {
  405.                                         new Float:X;
  406.                                         new Float:Y;
  407.                                         new Float:Z;
  408.                                         GetPlayerPos(playerid, X, Y, Z);
  409.                                         SetPlayerPos(playerid, X, Y, Z + 800.00);
  410.                                         SetPlayerFacingAngle(playerid,Ang);
  411.                                         GivePlayerWeapon(playerid,46,1);
  412.                                         GameTextForPlayer(playerid, "~w~WOOOHOOOOO!!",8000,5);
  413.                                         return 1;
  414.                         }
  415.                        
  416.                         if (strcmp(cmdtext, "/monster", true)==0)
  417.                         {
  418.                         SetPlayerPos(playerid, 2467.2461,-1567.5107,157.5443);
  419.                         //SendClientMessage(playerid, 0x33AA33AA, "Tippe /Monstertruck");
  420.                         return 1;
  421.                         }
  422.                        
  423.                 /*      if (strcmp(cmdtext, "/monstertruck", true)==0)
  424.                         {
  425.                         new Float:X1;
  426.                         new Float:Y2;
  427.                         new Float:Z3;
  428.                         GetPlayerPos(playerid, X1, Y2, Z3);
  429.                         AddStaticVehicle(444, X1,Y2,Z3,100.6038,123,1);
  430.                         return 1;
  431.                         }*/
  432. // ======================FUN CMDS ===========================
  433.  
  434. // ======================ADMIN CMD ==========================
  435.     if(strcmp(cmdtext, "/respawn", true)==0)
  436.       {
  437.        if(IsPlayerAdmin(playerid) == 1)//
  438.           {
  439.             new vres;
  440.             for(vres=1;vres<255;vres++)
  441.               {
  442.                 SetVehicleToRespawn(vres);
  443.               }
  444.                 SendClientMessage(playerid, 0xFFFF00AA, "Alle Fahrzeuge wurden Re-Spawnt");
  445.               }
  446.               else
  447.               {
  448.                 SendClientMessage(playerid, 0xAA3333AA, "Error: Du bist kein Admin xDD");
  449.               }
  450.               return 1;
  451.           }
  452.          
  453.            if(strcmp(cmdtext, "/kick", true, 5)==0)
  454.         {
  455.             if(!IsPlayerAdmin(playerid)) return 0;
  456.             if(!strlen(cmdtext[6]))
  457.             {
  458.                 SendClientMessage(playerid, 0xFF0000AA, "Benutze: /kick [id/name]");
  459.                 return 1;
  460.             }
  461.             new ID = strval(cmdtext[6]);
  462.             new pName[24], str[64];
  463.             GetPlayerName(playerid, pName, 24);
  464.             format(str, 64, "%s wurde von einem Admin Gekickt!", pName);
  465.             SendClientMessageToAll(0xA9A9A9AA, str);
  466.             Kick(ID);
  467.             return 1;
  468.         }
  469.  
  470.         if(strcmp(cmdtext, "/Ban", true, 5)==0)
  471.         {
  472.             if(!IsPlayerAdmin(playerid)) return 0;
  473.             if(!strlen(cmdtext[6]))
  474.             {
  475.                 SendClientMessage(playerid, 0xFF0000AA, "Benutze: /Ban [id/name]");
  476.                 return 1;
  477.             }
  478.             new ID = strval(cmdtext[6]);
  479.             new pName[24], str[64];
  480.             GetPlayerName(playerid, pName, 24);
  481.             format(str, 64, "%s wurde von einem Admin Gebannt!", pName);
  482.             SendClientMessageToAll(0xA9A9A9AA, str);
  483.             Ban(ID);
  484.             return 1;
  485.  
  486.           }
  487.                 if(strcmp(cmdtext, "/Slap", true, 5)==0)
  488.                 {
  489.             if(!IsPlayerAdmin(playerid)) return 0;
  490.             if(!strlen(cmdtext[6]))
  491.             {
  492.                 SendClientMessage(playerid, 0xFF0000AA, "Benutze: /Slap [id/name]");
  493.                 return 1;
  494.             }
  495.             new ID = strval(cmdtext[6]);
  496.             new pName[24], str[64];
  497.             new Float:slx, Float:sly, Float:slz;
  498.             GetPlayerName(playerid, pName, 24);
  499.             format(str, 64, "%s wurde von einem Admin Geslapt!", pName);
  500.             SendClientMessageToAll(0xA9A9A9AA, str);
  501.                 GetPlayerPos(ID, slx, sly, slz);
  502.                 SetPlayerPos(ID, slx, sly, slz+5);
  503.                 PlayerPlaySound(ID, 1130, slx, sly, slz+5);
  504.             return 1;
  505.           }
  506.  
  507.  
  508. // ======================Andere =============================
  509.                 if (strcmp("/cmds", cmdtext, true, 10) == 0)
  510.         {
  511.         SendClientMessage(playerid, 0x33AA33AA, "CMD´s: /abschließen /aufschließen");
  512.         SendClientMessage(playerid, 0x33AA33AA, "CMD´s: /spawn /kill /time");
  513.         SendClientMessage(playerid, 0x33AA33AA, "CMD´s: /god /waffen");
  514.         SendClientMessage(playerid, 0x33AA33AA, "CMD´s: /woho /flip");
  515.                 SendClientMessage(playerid, 0x33AA33AA, "Ports: /monster");
  516.                 SendClientMessage(playerid, 0x33AA33AA, "Admin CMD´s: /respawn /kick /ban /slap");
  517.             return 1;
  518.         }
  519.                 if (strcmp("/kill", cmdtext, true, 10) == 0)
  520.         {
  521.         SetPlayerScore(playerid, GetPlayerScore(playerid)+-1);
  522.         SetPlayerHealth(playerid,0);
  523.         SendClientMessage(playerid, 0xAA3333AA, "Du hast Selbstmordbegangen");
  524.             return 1;
  525.         }
  526.        
  527.                 if (strcmp(cmdtext, "/time", true)==0)
  528.         {
  529.             new Stunde;
  530.             new Minute;
  531.             new Sekunden;
  532.             new Tag;
  533.             new Monat;
  534.             new Jahr;
  535.             gettime(Stunde, Minute, Sekunden);
  536.             getdate(Jahr, Monat, Tag);
  537.             format(string, sizeof(string), "Datum: %d/%d/%d, Zeit %d:%d:%d", Tag,Monat,Jahr,Stunde,Minute,Sekunden);
  538.             SendClientMessage(playerid,0x33AA33AA,string);
  539.             return 1;
  540. }
  541. // ======================Andere ===============================
  542.         else
  543.         {
  544.                 SendClientMessage(playerid, 0xAA3333AA, "Diesen CMD gibt es nicht, unter /CMDs kannst du Alle CMD sehen.");
  545.         }
  546.         return 1;
  547. }
  548.  
  549. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  550. {
  551.         return 1;
  552. }
  553.  
  554. public OnPlayerExitVehicle(playerid, vehicleid)
  555. {
  556.         return 1;
  557. }
  558.  
  559. public OnPlayerStateChange(playerid, newstate, oldstate)
  560. {
  561.         return 1;
  562. }
  563.  
  564. public OnPlayerPickUpPickup(playerid, pickupid)
  565. {
  566.         return 1;
  567. }
  568.  
  569. public OnPlayerSelectedMenuRow(playerid, row)
  570. {
  571.         return 1;
  572. }
  573.  
  574. public OnPlayerExitedMenu(playerid)
  575. {
  576.         return 1;
  577. }
  578.  
  579. public uLeben()
  580. {
  581.     for (new i = 0; i < MAX_PLAYERS; i++)
  582.     {
  583.         if (IsPlayerConnected(i) && God[i] == 1)
  584.         {
  585.             SetPlayerHealth(i, 250);
  586.         }
  587.     }
  588. }
  589.  
  590. public autocarrep()
  591. {
  592. for (new i = 0; i < MAX_PLAYERS; i++)
  593. {
  594. if(IsPlayerConnected(i))
  595. {
  596. new Float:health, auto;
  597. if (IsPlayerInAnyVehicle(i))
  598. {
  599. auto = GetPlayerVehicleID(i);
  600. GetVehicleHealth(auto, health);
  601. if (health < 800)
  602. {
  603. SetVehicleHealth(auto, 1000);
  604. }
  605. }
  606. }
  607. }
  608. return 1;
  609. }
  610.  
  611.  
  612. /*
  613. strtok(const string[], &index)
  614. {
  615.         new length = strlen(string);
  616.         while ((index < length) && (string[index] <= ' '))
  617.         {
  618.                 index++;
  619.         }
  620.  
  621.         new offset = index;
  622.         new result[20];
  623.         while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
  624.         {
  625.                 result[index - offset] = string[index];
  626.                 index++;
  627.         }
  628.         result[index - offset] = EOS;
  629.         return result;
  630. }
  631. */
  632. SetupPlayerForClassSelection(playerid)
  633. {
  634.         new w[6];
  635.         if(!PlayerFlara[playerid])PlayerFlara[playerid] = CreatePlayerObject(playerid, 354, 2635.6624,2320.5103,30.9272, 0.0, 0.0, 0.0);
  636.         SetPlayerCameraPos(playerid, 2635.6624,2326.5103,30.9272);
  637.         SetPlayerPos(playerid, 2635.6624,2332.5103,30.9272);
  638.         SetPlayerFacingAngle(playerid, 180.0);
  639.         SetPlayerCameraLookAt(playerid, 2635.6624,2332.5103,30.9272);
  640.         switch (w[playerid]){
  641.                 case 0:ApplyAnimation(playerid,"DANCING","DAN_LOOP_A",4.1,1,1,1,1,1);
  642.                 case 1:ApplyAnimation(playerid,"DANCING","DNCE_M_A",4.1,1,1,1,1,1);
  643.                 case 2:ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.1,1,1,1,1,1);
  644.                 case 3:ApplyAnimation(playerid,"DANCING","DNCE_M_C",4.1,1,1,1,1,1);
  645.                 case 4:ApplyAnimation(playerid,"DANCING","DNCE_M_D",4.1,1,1,1,1,1);
  646.                 case 5:ApplyAnimation(playerid,"DANCING","DNCE_M_E",4.1,1,1,1,1,1);
  647.         }
  648.         w[playerid]++;
  649.         if(w[playerid]>=6) w[playerid]=0;
  650. }