DJ_Dany

La intamplare

Aug 15th, 2011
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.21 KB | None | 0 0
  1. //====================================FS====================================//
  2. //====================================BY====================================//
  3. //==================================DJ_DANY=================================//
  4. #include <a_samp>
  5. #define COLOR_GREY 0xAFAFAFAA
  6. #define COLOR_GREEN 0x33AA33AA
  7. #define COLOR_BRIGHTRED 0xFF0000AA
  8. #define COLOR_YELLOW 0xFFFF00AA
  9. #define COLOR_PINK 0xFF66FFAA
  10. #define COLOR_BLUE 0x3A47DEFF
  11. #define COLOR_TAN 0xBDB76BAA
  12. #define COLOR_PURPLE 0x800080AA
  13. #define COLOR_WHITE 0xFFFFFFAA
  14. #define COLOR_LIGHTBLUE 0x33CCFFAA
  15. #define COLOR_ORANGE 0xFF9900AA
  16. #define COLOR_INDIGO 0x4B00B0AA
  17. #define COLOR_BLACK 0x00000000
  18. #define COLOR_DARKGREY 0x696969FF
  19. #include "../include/gl_common.inc"
  20. #if defined FILTERSCRIPT
  21.  
  22.  
  23. public OnFilterScriptInit()
  24. {
  25.     print("\n--------------------------------------");
  26.     print(" FS DANY");
  27.     print("--------------------------------------\n");
  28.     return 1;
  29. }
  30.  
  31. public OnFilterScriptExit()
  32. {
  33.     return 1;
  34. }
  35.  
  36. #else
  37.  
  38. main()
  39. {
  40.     print("\n----------------------------------");
  41.     print(" FS DANY");
  42.     print("----------------------------------\n");
  43. }
  44.  
  45. #endif
  46. public OnPlayerCommandText(playerid, cmdtext[])
  47. {
  48.     new cmd[256];
  49.     new idx;
  50.     cmd = strtok(cmdtext, idx);
  51.     //=======================PRIMA VERSIUNE=================================//
  52.     if (strcmp("/bani", cmdtext, true, 10) == 0)
  53.     {
  54.     new money = randomEx(0,1000);
  55.     new string[128];
  56.     format(string, sizeof(string),"Ai primit %d$.",money);
  57.     SendClientMessage(playerid,COLOR_GREEN,string);
  58.     GivePlayerMoney(playerid,money);
  59.     return 1;
  60.     }
  61.     if (strcmp("/viata", cmdtext, true, 10) == 0)
  62.     {
  63.     new heal = randomEx(0,100);
  64.     new string[128];
  65.     format(string, sizeof(string),"Ai primit %d viata.",heal);
  66.     SendClientMessage(playerid,COLOR_GREEN,string);
  67.     SetPlayerHealth(playerid,heal);
  68.     return 1;
  69.     }
  70.     if (strcmp("/armura", cmdtext, true, 10) == 0)
  71.     {
  72.     new armura = randomEx(0,100);
  73.     new string[128];
  74.     format(string, sizeof(string),"Ai primit %d armura.",armura);
  75.     SendClientMessage(playerid,COLOR_GREEN,string);
  76.     SetPlayerArmour(playerid,armura);
  77.     return 1;
  78.     }
  79.     if (strcmp("/arme", cmdtext, true, 10) == 0)
  80.     {
  81.     new arma = randomEx(0,46);
  82.     new cantitatea = randomEx(1,500);
  83.     new string[128];
  84.     format(string, sizeof(string),"Ai primit arma cu id %d .",arma,cantitatea);
  85.     SendClientMessage(playerid,COLOR_GREEN,string);
  86.     GivePlayerWeapon(playerid,arma,cantitatea);
  87.     return 1;
  88.     }
  89.     //========================VERSIUNEA 2==================================//
  90.     if (strcmp("/skin", cmdtext, true, 10) == 0)
  91.     {
  92.     new skin = randomEx(0,299);
  93.     new string[128];
  94.     format(string, sizeof(string),"Ai primit skinul cu id %d .",skin);
  95.     SendClientMessage(playerid,COLOR_GREEN,string);
  96.     SetPlayerSkin(playerid,skin);
  97.     return 1;
  98.     }
  99.     if (strcmp("/culoare", cmdtext, true, 10) == 0)
  100.     {
  101.     new culoare = randomEx(0,255);
  102.     new string[128];
  103.     format(string, sizeof(string),"Ai primit culoarea cu id %d .",culoare);
  104.     SendClientMessage(playerid,COLOR_GREEN,string);
  105.     SetPlayerColor(playerid,culoare);
  106.     return 1;
  107.     }
  108.     if (strcmp("/vremea", cmdtext, true, 10) == 0)
  109.     {
  110.     new vremea = randomEx(0,50);
  111.     new string[128];
  112.     format(string, sizeof(string),"Vremea s-a schimbat in id %d .",vremea);
  113.     SendClientMessage(playerid,COLOR_GREEN,string);
  114.     SetWeather(vremea);
  115.     return 1;
  116.     }
  117.     if (strcmp("/timpul", cmdtext, true, 10) == 0)
  118.     {
  119.     new ora = randomEx(0,23);
  120.     new string[128];
  121.     format(string, sizeof(string),"Este ora: %d .",ora);
  122.     SendClientMessage(playerid,COLOR_GREEN,string);
  123.     SetWorldTime(ora);
  124.     return 1;
  125.     }
  126.     //===========VERSIONEA 3====================================================//
  127.     if(strcmp( cmd, "/masina", true ) == 0 )
  128.     {
  129.         new masina = randomEx(400,611);
  130.         new Float:X, Float:Y, Float:Z;
  131.         new string[128];
  132.  
  133.         GetPlayerPos( playerid, X, Y, Z );
  134.         new culoare1=randomEx(0,126);
  135.         new culoare2=randomEx(0,126);
  136.         CreateVehicle( masina, X+2, Y+2, Z, 0, culoare1, culoare2, -1 );
  137.        
  138.         format(string,sizeof(string),"Masina creata, id: %d,culoare 1: %d,culoare 2: %d",masina,culoare1,culoare2);
  139.         SendClientMessage(playerid,0xAAAAAAAA,string);
  140.  
  141.         return 1;
  142.     }
  143.     if (strcmp("/interiorli", cmdtext, true, 10) == 0)
  144.     {
  145.     new interior = randomEx(0,18);
  146.     new string[128];
  147.     format(string, sizeof(string),"A fost selectat interiorul cu id: %d .",interior);
  148.     SendClientMessage(playerid,COLOR_GREEN,string);
  149.     SetPlayerInterior(playerid,interior);
  150.     return 1;
  151.     }
  152.     if(strcmp( cmd, "/sus", true ) == 0 )
  153.     {
  154.         new sus = randomEx(0,5000);
  155.         new Float:X, Float:Y, Float:Z;
  156.         new string[128];
  157.         GetPlayerPos( playerid, X, Y, Z );
  158.         SetPlayerPos(playerid,X,Y,Z+sus);
  159.         GivePlayerWeapon(playerid,46,1);
  160.         format(string,sizeof(string),"Ai urcat la : %d metri.",sus);
  161.         SendClientMessage(playerid,0xAAAAAAAA,string);
  162.         return 1;
  163.     }
  164.     if(strcmp( cmd, "/jos", true ) == 0 )
  165.     {
  166.         new jos = randomEx(-10,0);
  167.         new Float:X, Float:Y, Float:Z;
  168.         new string[128];
  169.         GetPlayerPos( playerid, X, Y, Z );
  170.         SetPlayerPos(playerid,X,Y,Z+jos);
  171.         format(string,sizeof(string),"Ai coborat la : %d metri.",jos);
  172.         SendClientMessage(playerid,0xAAAAAAAA,string);
  173.         return 1;
  174.     }
  175.     return 0;
  176. }
  177. stock randomEx(minnum = cellmin , maxnum = cellmax) return random(maxnum - minnum +1) + minnum;
Advertisement
Add Comment
Please, Sign In to add comment