Advertisement
Guest User

Admincheats kurence - eng

a guest
Jul 15th, 2011
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 19.64 KB | None | 0 0
  1. //AdminCheats v1.0 FS by Kurence
  2. #include <a_samp>
  3. #define FAIL 0xFF0000FF
  4. #define EXEC 0x00FF00FF
  5. #define INFO 0x0000FFFF
  6. #define CHEATDIALOGID 7154
  7. #define MEGAJUMP 8456
  8. #define GETMONEY 5642
  9. #define SPEEDCHANGER 9456
  10. #define TELEPORTS 6421
  11. #define CARDIALOG 5642
  12. #define CARSPAWN 9742
  13. #define WEAPONMENU 8264
  14. #define GIVEWEAPON 4712
  15. #define AIRBREAKMENU 6432
  16. new Text:God;
  17. new MAXSPEED[MAX_PLAYERS];
  18. new Text:Airbreak;
  19. new Text:Gigajump;
  20. new Text:GreenGigajump;
  21. new Text:Noreload;
  22. new Text:Speed;
  23. new Text:GreenGod;
  24. new Text:GreenAirbreak;
  25. new Text:GreenNoreload;
  26. new Text:GreenSpeed;
  27. new ghostrider[MAX_PLAYERS];
  28. new playertimer[MAX_PLAYERS];
  29. new active[MAX_PLAYERS];
  30. new keys, updown, leftright;
  31. new airb[MAX_PLAYERS];
  32. new aircar[MAX_PLAYERS];
  33. new road[MAX_PLAYERS];
  34. new speedhax[MAX_PLAYERS];
  35. new Megajump[MAX_PLAYERS];
  36. new Carjump[MAX_PLAYERS];
  37. new Float:X,Float:Y,Float:Z,Float:X2,Float:Y2;
  38. new god[MAX_PLAYERS];
  39. new reload[MAX_PLAYERS];
  40. new car[MAX_PLAYERS];
  41. forward TextCheck();
  42. new timercheck;
  43. forward EXPO(playerid);
  44. stock Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  45. {
  46.     new Float:a;
  47.     GetPlayerPos(playerid, x, y, a);
  48.     if (IsPlayerInAnyVehicle(playerid))
  49.         GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  50.     else
  51.         GetPlayerFacingAngle(playerid, a);
  52.     x += (distance * floatsin(-a, degrees));
  53.     y += (distance * floatcos(-a, degrees));
  54.     return a;
  55. }
  56. public OnFilterScriptInit()
  57. {
  58.     timercheck = SetTimer("TextCheck",3000,1);
  59.     print("Cheat FS v1.0 by Kurence loaded!");
  60.     TextDrawFont(God,2);
  61.     TextDrawUseBox(God,0);
  62.     God = TextDrawCreate(0,0,"GOD MODE");
  63.     TextDrawFont(Airbreak,2);
  64.     TextDrawUseBox(Airbreak,0);
  65.     Airbreak = TextDrawCreate(143,0,"AIRBREAK");
  66.     TextDrawFont(Noreload,2);
  67.     TextDrawUseBox(Noreload,0);
  68.     Noreload = TextDrawCreate(250,0,"NO RELOAD");
  69.     TextDrawFont(Speed,2);
  70.     TextDrawUseBox(Speed,0);
  71.     Speed = TextDrawCreate(400,0,"SPEEDHACK");
  72.     TextDrawFont(Gigajump,2);
  73.     TextDrawUseBox(Gigajump,0);
  74.     Gigajump = TextDrawCreate(500,0,"MEGAJUMP");
  75.     //GREEN-----------------------------------
  76.     TextDrawFont(GreenGod,2);
  77.     TextDrawUseBox(GreenGod,0);
  78.     GreenGod = TextDrawCreate(0,0,"~g~GOD MODE");
  79.     TextDrawFont(GreenAirbreak,2);
  80.     TextDrawUseBox(GreenAirbreak,0);
  81.     GreenAirbreak = TextDrawCreate(143,0,"~g~AIRBREAK");
  82.     TextDrawFont(GreenNoreload,2);
  83.     TextDrawUseBox(GreenNoreload,0);
  84.     GreenNoreload = TextDrawCreate(250,0,"~g~NO RELOAD");
  85.     TextDrawFont(GreenSpeed,2);
  86.     TextDrawUseBox(GreenSpeed,0);
  87.     GreenSpeed = TextDrawCreate(400,0,"~g~SPEEDHACK"); 
  88.     TextDrawFont(GreenGigajump,2);
  89.     TextDrawUseBox(GreenGigajump,0);
  90.     GreenGigajump = TextDrawCreate(500,0,"~g~MEGAJUMP");
  91.     return 1;
  92. }
  93. public OnFilterScriptExit(){
  94. KillTimer(timercheck);
  95. TextDrawDestroy(Airbreak);
  96. TextDrawDestroy(GreenAirbreak);
  97. TextDrawDestroy(God);
  98. TextDrawDestroy(GreenGod);
  99. TextDrawDestroy(Speed);
  100. TextDrawDestroy(GreenSpeed);
  101. TextDrawDestroy(Noreload);
  102. TextDrawDestroy(GreenNoreload);
  103. return 1;
  104. }
  105. public OnPlayerConnect(playerid)
  106. {
  107.     MAXSPEED[playerid] = 2;
  108.     speedhax[playerid] = 0;
  109.     ghostrider[playerid] = 0;
  110.     airb[playerid] = 0;
  111.     god[playerid] = 0;
  112.     reload[playerid] = 0;
  113.     return 1;
  114. }
  115. public OnPlayerDisconnect(playerid, reason)
  116. {
  117.     MAXSPEED[playerid] = 2;
  118.     KillTimer(playertimer[playerid]);
  119.     if(airb[playerid] == 1){
  120.     DestroyVehicle(aircar[playerid]);
  121.     DestroyObject(road[playerid]);
  122.     airb[playerid] = 0;
  123.     speedhax[playerid] = 0;
  124.     ghostrider[playerid] = 0;
  125.     reload[playerid] = 0;
  126.     god[playerid] = 0;
  127.     TextDrawHideForPlayer(playerid,God);
  128.     TextDrawHideForPlayer(playerid,Airbreak);
  129.     TextDrawHideForPlayer(playerid,Noreload);
  130.     TextDrawHideForPlayer(playerid,Speed);
  131.     TextDrawHideForPlayer(playerid,GreenGod);
  132.     TextDrawHideForPlayer(playerid,GreenAirbreak);
  133.     TextDrawHideForPlayer(playerid,GreenNoreload);
  134.     TextDrawHideForPlayer(playerid,GreenSpeed);
  135.     TextDrawHideForPlayer(playerid,Gigajump);
  136.     TextDrawHideForPlayer(playerid,GreenGigajump);
  137.     if(car[playerid] != 0){
  138. DestroyVehicle(car[playerid]);
  139. }
  140.     speedhax[playerid] = 0;
  141.     }
  142.     return 1;
  143. }
  144. public OnPlayerSpawn(playerid)
  145. {
  146.     TextDrawHideForPlayer(playerid,God);
  147.     TextDrawHideForPlayer(playerid,Airbreak);
  148.     TextDrawHideForPlayer(playerid,Noreload);
  149.     TextDrawHideForPlayer(playerid,Speed);
  150.     TextDrawHideForPlayer(playerid,GreenGod);
  151.     TextDrawHideForPlayer(playerid,GreenAirbreak);
  152.     TextDrawHideForPlayer(playerid,GreenNoreload);
  153.     TextDrawHideForPlayer(playerid,GreenSpeed);
  154.     TextDrawHideForPlayer(playerid,Gigajump);
  155.     TextDrawHideForPlayer(playerid,GreenGigajump);
  156.     if(IsPlayerAdmin(playerid)){
  157.     if(god[playerid] == 0)TextDrawShowForPlayer(playerid,God);
  158.     else TextDrawShowForPlayer(playerid,GreenGod);
  159.     if(airb[playerid] == 0 && ghostrider[playerid] == 0)TextDrawShowForPlayer(playerid,Airbreak);
  160.     else TextDrawShowForPlayer(playerid,GreenAirbreak);
  161.     if(reload[playerid] == 0)TextDrawShowForPlayer(playerid,Noreload);
  162.     else TextDrawShowForPlayer(playerid,GreenNoreload);
  163.     if(speedhax[playerid] == 0)TextDrawShowForPlayer(playerid,Speed);
  164.     else TextDrawShowForPlayer(playerid,GreenSpeed);
  165.     if(Megajump[playerid] == 0)TextDrawShowForPlayer(playerid,Gigajump);
  166.     else TextDrawShowForPlayer(playerid,GreenGigajump);
  167.     if(ghostrider[playerid] == 1) SetPlayerHealth(playerid,10000000);
  168.     if(god[playerid] == 1) SetPlayerHealth(playerid,10000000);
  169.     }
  170.     return 1;
  171. }
  172. public OnPlayerDeath(playerid, killerid, reason)
  173. {
  174.     TextDrawHideForPlayer(playerid,God);
  175.     TextDrawHideForPlayer(playerid,Airbreak);
  176.     TextDrawHideForPlayer(playerid,Noreload);
  177.     TextDrawHideForPlayer(playerid,Speed);
  178.     TextDrawHideForPlayer(playerid,GreenGod);
  179.     TextDrawHideForPlayer(playerid,GreenAirbreak);
  180.     TextDrawHideForPlayer(playerid,GreenNoreload);
  181.     TextDrawHideForPlayer(playerid,GreenSpeed);
  182.     TextDrawHideForPlayer(playerid,Gigajump);
  183.     TextDrawHideForPlayer(playerid,GreenGigajump);
  184.     if(airb[playerid] == 1){
  185.     DestroyVehicle(aircar[playerid]);
  186.     DestroyObject(road[playerid]);
  187.     airb[playerid] = 0;
  188.     }
  189.     return 1;
  190. }
  191. public OnPlayerCommandText(playerid, cmdtext[])
  192. {
  193.     if(IsPlayerAdmin(playerid)){
  194.     if (strcmp("/cheats", cmdtext, true, 10) == 0)
  195.     {
  196.         ShowPlayerDialog(playerid,CHEATDIALOGID,DIALOG_STYLE_LIST,"AdminCheats v1.0 FS by Kurence v0.1b","God mode\nSpeedhack\nAirbreak\nWeapons\nCar\nTeleports\nCash\nJetpack\nMegajump\nSpeedhack max speed","OK","Back");
  197.         return 1;
  198.     }
  199.     if (strcmp("/footjump", cmdtext, true, 10) == 0)
  200.     {
  201.         if(Megajump[playerid] == 0){
  202.         Megajump[playerid] = 1;
  203.         TextDrawHideForPlayer(playerid,Gigajump);
  204.         TextDrawHideForPlayer(playerid,GreenGigajump);
  205.         TextDrawShowForPlayer(playerid,GreenGigajump);
  206.         SendClientMessage(playerid,EXEC,"Megajump activated!");
  207.         }
  208.         else{
  209.         Megajump[playerid] = 0;
  210.         TextDrawHideForPlayer(playerid,Gigajump);
  211.         TextDrawHideForPlayer(playerid,GreenGigajump);
  212.         TextDrawShowForPlayer(playerid,Gigajump);
  213.         SendClientMessage(playerid,EXEC,"Megajump deactivated!");
  214.         }
  215.         return 1;
  216.     }
  217.     if (strcmp("/weapons", cmdtext, true, 10) == 0)
  218.     {
  219.         ShowPlayerDialog(playerid,WEAPONMENU,DIALOG_STYLE_LIST,"Weapons","No reload\nGet weapon","OK","Back");
  220.         return 1;
  221.     }
  222.     if (strcmp("/cheatports", cmdtext, true, 10) == 0)
  223.     {
  224.         ShowPlayerDialog(playerid,TELEPORTS,DIALOG_STYLE_LIST,"Teleports","\nLas Venturas(Four dragons)\nLas Venturas(Toreno's cabin)\nSan Fiero(WANG CARS)\nSan Fiero(Mount Chiliad)\nLos Santos(CJ's home)\nLos Santos(Madd dogg's mansion)","OK","Back");
  225.         return 1;
  226.     }
  227.     if (strcmp("/noreload", cmdtext, true, 10) == 0)
  228.     {
  229.         if(reload[playerid] == 0){
  230.         reload[playerid] = 1;
  231.         SendClientMessage(EXEC,0x00FF00FF,"No reload activated!");
  232.         TextDrawHideForPlayer(playerid,Noreload);
  233.         TextDrawShowForPlayer(playerid,GreenNoreload);
  234.         }
  235.         else{
  236.         reload[playerid] = 0;
  237.         SendClientMessage(EXEC,0x00FF00FF,"No reload deactivated!");
  238.         TextDrawHideForPlayer(playerid,GreenNoreload);
  239.         TextDrawShowForPlayer(playerid,Noreload);
  240.         }
  241.         return 1;
  242.     }
  243.     if (strcmp("/jetpack", cmdtext, true, 10) == 0)
  244.     {
  245.         if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,FAIL,"Get out from that car if you want jetpack!");
  246.         SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
  247.         return 1;
  248.     }
  249.     if (strcmp("/god", cmdtext, true, 10) == 0)
  250.     {
  251.         if(god[playerid] == 0){
  252.         god[playerid] = 1;
  253.         SendClientMessage(playerid,EXEC,"God mode activated!");
  254.         SetPlayerHealth(playerid,100000000);
  255.         TextDrawHideForPlayer(playerid,God);
  256.         TextDrawShowForPlayer(playerid,GreenGod);
  257.         if(IsPlayerInAnyVehicle(playerid)) SetVehicleHealth(GetPlayerVehicleID(playerid),1000000000);
  258.         }
  259.         else{
  260.         god[playerid] = 0;
  261.         SendClientMessage(playerid,EXEC,"God mode de-activated!");
  262.         if(ghostrider[playerid] == 0)SetPlayerHealth(playerid,100);
  263.         TextDrawHideForPlayer(playerid,GreenGod);
  264.         TextDrawShowForPlayer(playerid,God);
  265.         if(IsPlayerInAnyVehicle(playerid)) SetVehicleHealth(GetPlayerVehicleID(playerid),1000);
  266.         }
  267.         return 1;
  268.     }
  269.     if (strcmp("/speedhack", cmdtext, true, 10) == 0)
  270.     {
  271.         if(speedhax[playerid] == 0){
  272.         SendClientMessage(playerid,EXEC,"Speedhack activated! Press left mouse button repeadetly for boost");
  273.         speedhax[playerid] = 1;
  274.         TextDrawHideForPlayer(playerid,Speed);
  275.         TextDrawShowForPlayer(playerid,GreenSpeed);
  276.         }
  277.         else{
  278.         SendClientMessage(playerid,EXEC,"Speedhack deactivated!");
  279.         speedhax[playerid] = 0;
  280.         TextDrawHideForPlayer(playerid,GreenSpeed);
  281.         TextDrawShowForPlayer(playerid,Speed);
  282.         }
  283.         return 1;
  284.     }
  285.     if (strcmp("/cheathelp", cmdtext, true, 10) == 0)
  286.     {
  287.         SendClientMessage(playerid,0xFF0000FF,"AdminCheats v1.0 FS by Kurence v1-/cheats if you want to use menu ");
  288.         SendClientMessage(playerid,0xFF0000FF,"To disable cheat, select it in menu again.");
  289.         return 1;
  290.     }
  291.     if (strcmp("/expoflight", cmdtext, true, 10) == 0)
  292.     {
  293.         if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFF0000FF,"Get the hell out from that car!!!");
  294.         if(ghostrider[playerid] == 0){
  295.         ghostrider[playerid] = 1;
  296.         SendClientMessage(playerid,EXEC,"On foot airbreak activated");
  297.         SetPlayerHealth(playerid,5000000);
  298.         playertimer[playerid] = SetTimerEx("EXPO",100,1,"i",playerid);
  299.         TextDrawHideForPlayer(playerid,Airbreak);
  300.         TextDrawHideForPlayer(playerid,GreenAirbreak);
  301.         if(ghostrider[playerid] == 1 || airb[playerid] == 1) TextDrawShowForPlayer(playerid,GreenAirbreak);
  302.         else TextDrawShowForPlayer(playerid,Airbreak);
  303.         }
  304.         else{
  305.         ghostrider[playerid] = 0;
  306.         SendClientMessage(playerid,EXEC,"On foot airbreak deactivated.");
  307.         if(god[playerid] == 0){
  308.         SetPlayerHealth(playerid,100);
  309.         }
  310.         KillTimer(playertimer[playerid]);
  311.         TextDrawHideForPlayer(playerid,Airbreak);
  312.         TextDrawHideForPlayer(playerid,GreenAirbreak);
  313.         if(ghostrider[playerid] == 1 || airb[playerid] == 1) TextDrawShowForPlayer(playerid,Airbreak);
  314.         else TextDrawShowForPlayer(playerid,GreenAirbreak);
  315.         }
  316.         return 1;
  317.     }  
  318.     if (strcmp("/airbreak", cmdtext, true, 10) == 0)
  319.     {
  320.         if(IsPlayerInAnyVehicle(playerid) && airb[playerid] == 0) return SendClientMessage(playerid,FAIL,"Get out from that car, you will get one from server");
  321.         GetPlayerPos(playerid,X,Y,Z);
  322.         if(airb[playerid] == 0){
  323.         aircar[playerid] = CreateVehicle(567,X,Y,Z,0,0,0,500);
  324.         AddVehicleComponent(aircar[playerid],1087);
  325.         SetVehicleHealth(aircar[playerid], 99999999910000);//To make that vehicle invulnerable :)
  326.         PutPlayerInVehicle(playerid,aircar[playerid],0);
  327.         road[playerid] = CreateObject(11111,X,Y,Z,0,0,0);
  328.         AttachObjectToPlayer(road[playerid],playerid,8,0,-0.7,0,0,0);
  329.         airb[playerid] = 1;
  330.         SendClientMessage(playerid,EXEC,"In car airbreak activated");
  331.         TextDrawHideForPlayer(playerid,Airbreak);
  332.         TextDrawHideForPlayer(playerid,GreenAirbreak);
  333.         if(ghostrider[playerid] == 1 || airb[playerid] == 1) TextDrawShowForPlayer(playerid,GreenAirbreak);
  334.         else TextDrawShowForPlayer(playerid,Airbreak);
  335.         }
  336.         else{
  337.         SetPlayerPos(playerid,X,Y,Z);
  338.         DestroyVehicle(aircar[playerid]);
  339.         DestroyObject(road[playerid]);     
  340.         airb[playerid] = 0;
  341.         SendClientMessage(playerid,EXEC,"In car airbreak deactivated");
  342.         TextDrawHideForPlayer(playerid,Airbreak);
  343.         TextDrawHideForPlayer(playerid,GreenAirbreak);
  344.         if(ghostrider[playerid] == 0 || airb[playerid] == 0) TextDrawShowForPlayer(playerid,Airbreak);
  345.         else TextDrawShowForPlayer(playerid,GreenAirbreak);
  346.         }
  347.         return 1;
  348.     }
  349.     if (strcmp("/carhax", cmdtext, true, 10) == 0)
  350.     {
  351.         ShowPlayerDialog(playerid,CARDIALOG,DIALOG_STYLE_LIST,"Car","\nFlip\nNitro\nRepair\nSpawn car\nDestroy car","OK","Cancel");
  352.         return 1;
  353.     }
  354.     }
  355.     return 0;
  356. }
  357. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  358. {
  359.     if(god[playerid] == 1)SetVehicleHealth(vehicleid,10000000);
  360.     return 1;
  361. }
  362. public OnPlayerExitVehicle(playerid,vehicleid){
  363. if(airb[playerid] == 1 && vehicleid == aircar[playerid]){
  364. DestroyObject(road[playerid]);
  365. GetPlayerPos(playerid,X,Y,Z);
  366. SetPlayerPos(playerid,X,Y,Z);
  367. DestroyVehicle(aircar[playerid]);
  368. SendClientMessage(playerid,FAIL,"Airbreak deactivated");
  369. airb[playerid] = 0;
  370. if(god[playerid] == 1) SetVehicleHealth(vehicleid,1000);
  371. }
  372. return 1;
  373. }
  374. public OnPlayerKeyStateChange(playerid,newkeys,oldkeys){
  375. if(newkeys & KEY_JUMP && (Megajump[playerid] == 1 || Carjump[playerid] == 1)){
  376. if(Megajump[playerid] == 1){
  377. GetPlayerVelocity(playerid,X,Y,Z);
  378. SetPlayerVelocity(playerid,X,Y,1);
  379. if(X < 0.3 && X > -0.3 && Y < 0.3 && Y > 0.3 && Z < 0.1 && Z > -0.1){
  380. SetPlayerVelocity(playerid,X*2,Y*2,1);
  381. }
  382. }
  383. return 1;
  384. }
  385. if((newkeys & KEY_FIRE) && reload[playerid] == 1){
  386. GivePlayerWeapon(playerid,GetPlayerWeapon(playerid),10000);
  387. }
  388. if((oldkeys & KEY_FIRE) && speedhax[playerid] == 1){
  389. new Float:VX,Float:VY,Float:VZ;
  390. GetVehicleVelocity(GetPlayerVehicleID(playerid),VX,VY,VZ);
  391. if(VX<-MAXSPEED[playerid] || VX>MAXSPEED[playerid] || VY<-MAXSPEED[playerid] || VY>MAXSPEED[playerid]) return 0;
  392. SetVehicleVelocity(GetPlayerVehicleID(playerid),VX*1.3,VY*1.3,VZ);
  393. }
  394. if((newkeys & KEY_FIRE) && speedhax[playerid] == 1){
  395. new Float:VX,Float:VY,Float:VZ;
  396. GetVehicleVelocity(GetPlayerVehicleID(playerid),VX,VY,VZ);
  397. if(VX<-MAXSPEED[playerid] || VX>MAXSPEED[playerid] || VY<-MAXSPEED[playerid] || VY>MAXSPEED[playerid]) return 0;
  398. SetVehicleVelocity(GetPlayerVehicleID(playerid),VX*1.3,VY*1.3,VZ);
  399. }
  400. if (newkeys & KEY_JUMP && active[playerid] == 1 && ghostrider[playerid] == 1){
  401. GetPlayerPos(playerid,X,Y,Z);
  402. CreateExplosion(X,Y,Z-5,6,10);
  403. }
  404. if (newkeys & KEY_WALK){
  405. if(active[playerid] == 0)active[playerid] = 1;
  406. else active[playerid] = 0;
  407. }
  408. return 1;
  409. }
  410. public EXPO(playerid){
  411. GetPlayerKeys(playerid, keys, updown, leftright);
  412. GetPlayerPos(playerid,X,Y,Z);
  413. GetXYInFrontOfPlayer(playerid, X2, Y2, -0.25);
  414. if(updown == KEY_UP && active[playerid] == 1 && ghostrider[playerid] == 1) CreateExplosion(X, Y, Z-1, 12, 0);
  415. if(updown == KEY_DOWN && active[playerid] == 1 && ghostrider[playerid] == 1) CreateExplosion(X2, Y2, Z-0.5, 12, 0);          
  416. }
  417. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  418. {
  419. if(dialogid == CHEATDIALOGID)
  420. {
  421. if(response)
  422. {
  423. switch(listitem)
  424. {
  425. case 0:OnPlayerCommandText(playerid,"/god");
  426. case 1:OnPlayerCommandText(playerid,"/speedhack");
  427. case 2:ShowPlayerDialog(playerid,AIRBREAKMENU,DIALOG_STYLE_LIST,"Airbreak","On foot\nIn car","OK","Back");
  428. case 3:OnPlayerCommandText(playerid,"/weapons");
  429. case 4:OnPlayerCommandText(playerid,"/carhax");
  430. case 5:OnPlayerCommandText(playerid,"/cheatports");
  431. case 6:OnPlayerCommandText(playerid,"/money");
  432. case 7:OnPlayerCommandText(playerid,"/jetpack");
  433. case 8:OnPlayerCommandText(playerid,"/footjump");
  434. case 9:ShowPlayerDialog(playerid,SPEEDCHANGER,DIALOG_STYLE_INPUT,"Speed change","Max speed:\n","Change!","Back");
  435. }
  436. return 1;
  437. }
  438. }
  439. if(dialogid == AIRBREAKMENU)
  440. {
  441. if(response)
  442. {
  443. switch(listitem)
  444. {
  445. case 0:OnPlayerCommandText(playerid,"/expoflight");
  446. case 1:OnPlayerCommandText(playerid,"/airbreak");
  447. }
  448. return 1;
  449. }
  450. }
  451. if(dialogid == WEAPONMENU)
  452. {
  453. if(response)
  454. {
  455. switch(listitem)
  456. {
  457. case 0:OnPlayerCommandText(playerid,"/noreload");
  458. case 1:ShowPlayerDialog(playerid,GIVEWEAPON,DIALOG_STYLE_INPUT,"Get weapon","WeaponID:\n","Get","Back");
  459. }
  460. return 1;
  461. }
  462. }
  463. if(dialogid == GIVEWEAPON)
  464. {
  465. if(response)
  466. {
  467. if(strval(inputtext)<0 || strval(inputtext)>46) return SendClientMessage(playerid,FAIL,"Wrong ID! [0-46]");
  468. GivePlayerWeapon(playerid,strval(inputtext),10000);
  469. }
  470. return 1;
  471. }
  472. if(dialogid == CARDIALOG)
  473. {
  474. if(response)
  475. {
  476. switch(listitem)
  477. {
  478. case 0:{
  479. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,FAIL,"You have to be in car");
  480. new Float:Angle;
  481. GetPlayerPos(playerid, X, Y, Z);
  482. GetVehicleZAngle(GetPlayerVehicleID(playerid), Angle);
  483. SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z+1);
  484. SetVehicleZAngle(GetPlayerVehicleID(playerid), Angle);
  485. }
  486. case 1:{
  487. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,FAIL,"You have to be in car");
  488. AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
  489. }
  490. case 2:{
  491. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,FAIL,"You have to be in car");
  492. if(god[playerid] == 1){
  493. RepairVehicle(GetPlayerVehicleID(playerid));
  494. SetVehicleHealth(GetPlayerVehicleID(playerid),1000000000);
  495. }
  496. else RepairVehicle(GetPlayerVehicleID(playerid));
  497. }
  498. case 3:ShowPlayerDialog(playerid,CARSPAWN,DIALOG_STYLE_INPUT,"Spawn Car","Model ID:\n","Spawn!","Back");
  499. case 4:{
  500. if(car[playerid] != 0){
  501. DestroyVehicle(car[playerid]);
  502. }
  503. else SendClientMessage(playerid,0xFF0000FF,"Your car is destroyed");
  504. }
  505. }
  506. return 1;
  507. }
  508. }
  509. if(dialogid == CARSPAWN)
  510. {
  511. if(response)
  512. {
  513. if(strval(inputtext)<400 || strval(inputtext)>611) return SendClientMessage(playerid,0xFF0000FF,"Wrong vehicle ID (400-611)");
  514. GetPlayerPos(playerid,X,Y,Z);
  515. GetXYInFrontOfPlayer(playerid,X2,Y2,5);
  516. if(car[playerid] != 0){
  517. DestroyVehicle(car[playerid]);
  518. car[playerid] = CreateVehicle(strval(inputtext),X2,Y2,Z,0,random(125),random(125),5000);
  519. }
  520. else car[playerid] = CreateVehicle(strval(inputtext),X2,Y2,Z,0,random(125),random(125),5000);
  521. }
  522. return 1;
  523. }
  524. if(dialogid == SPEEDCHANGER)
  525. {
  526. if(response)
  527. {
  528. if(strval(inputtext)<2 || strval(inputtext)>20) return SendClientMessage(playerid,0xFF0000FF,"Value must be between 2 and 20");
  529. MAXSPEED[playerid] = strval(inputtext);
  530. new string[64];
  531. format(string,sizeof(string),"New max speed in speedhack value:%d",MAXSPEED[playerid]);
  532. SendClientMessage(playerid,FAIL,string);
  533. }
  534. return 1;
  535. }
  536. if(dialogid == TELEPORTS)
  537. {
  538. if(response)
  539. {
  540. switch(listitem)
  541. {
  542. case 0:SetPlayerPos(playerid,2027.1660,1007.6899,10.8203);
  543. case 1:SetPlayerPos(playerid,-687.9135,942.0928,16.8293);
  544. case 2:SetPlayerPos(playerid,-1953.8247,257.5798,41.0471);
  545. case 3:SetPlayerPos(playerid,-2239.6311,-1750.2775,480.8851);
  546. case 4:SetPlayerPos(playerid,2495.0762,-1687.0260,13.5143);
  547. case 5:SetPlayerPos(playerid,1299.0095,-801.3270,84.1406);
  548. }
  549. return 1;
  550. }
  551. }
  552. return 1;
  553. }
  554. public TextCheck(){
  555. for(new playerid;playerid<MAX_PLAYERS;playerid++){
  556. if(GetPlayerState(playerid) == PLAYER_STATE_SPAWNED){
  557. TextDrawHideForPlayer(playerid,God);
  558. TextDrawHideForPlayer(playerid,Airbreak);
  559. TextDrawHideForPlayer(playerid,Noreload);
  560. TextDrawHideForPlayer(playerid,Speed);
  561. TextDrawHideForPlayer(playerid,GreenGod);
  562. TextDrawHideForPlayer(playerid,GreenAirbreak);
  563. TextDrawHideForPlayer(playerid,GreenNoreload);
  564. TextDrawHideForPlayer(playerid,GreenSpeed);
  565. TextDrawHideForPlayer(playerid,Gigajump);
  566. TextDrawHideForPlayer(playerid,GreenGigajump);
  567. if(god[playerid] == 0)TextDrawShowForPlayer(playerid,God);
  568. else TextDrawShowForPlayer(playerid,GreenGod);
  569. if(airb[playerid] == 0 && ghostrider[playerid] == 0)TextDrawShowForPlayer(playerid,Airbreak);
  570. else TextDrawShowForPlayer(playerid,GreenAirbreak);
  571. if(reload[playerid] == 0)TextDrawShowForPlayer(playerid,Noreload);
  572. else TextDrawShowForPlayer(playerid,GreenNoreload);
  573. if(speedhax[playerid] == 0)TextDrawShowForPlayer(playerid,Speed);
  574. else TextDrawShowForPlayer(playerid,GreenSpeed);
  575. if(Megajump[playerid] == 0)TextDrawShowForPlayer(playerid,Gigajump);
  576.     else TextDrawShowForPlayer(playerid,GreenGigajump);
  577. }
  578. }
  579. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement