Advertisement
Dayrion

Svy FS

Nov 20th, 2017
659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.88 KB | None | 0 0
  1.  /*
  2. ===========================================================================
  3. |               Filterscript de Svya, mappeur de GTRP.                   ||
  4. ===========================================================================
  5.                      ______  __   ____  __  ______    
  6.                     /\  ___\/\ \ / /\ \_\ \/\  __ \  
  7.                     \ \___  \ \ \'/\ \____ \ \  __ \  
  8.                      \/\_____\ \__| \/\_____\ \_\ \_\
  9.                       \/_____/\/_/   \/_____/\/_/\/_/
  10.  
  11. */
  12.  
  13.  
  14. #include <a_samp>
  15. #include <izcmd>
  16. #include <sscanf2>
  17. #include <streamer>
  18. #include <a_GTFonction>
  19.  
  20. #define DIALOG_SVYA         20000
  21. #define SQLID_SVYA          126784
  22. #define CMD_INTERDIT        Erreur(playerid, "Vous n'êtes pas autorisé à utiliser cette commande.");
  23.  
  24.  
  25. public OnFilterScriptInit()
  26. {
  27.     CreateSvyaMapping();
  28.     return 1;
  29. }
  30.  
  31. public OnFilterScriptExit()
  32. {
  33.  
  34.     return 1;
  35. }
  36.  
  37.  
  38. CMD:svya(playerid, params[])
  39. {
  40.     if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
  41.         return CMD_INTERDIT
  42.  
  43.     ShowPlayerDialog(playerid, DIALOG_SVYA, DIALOG_STYLE_MSGBOX, "Tes commandes sal batard","Commandes de Svya le PD:\n» /gotoco /baffe /unfreeze\n» /haut /bas /droite /gauche", "Ok", "");
  44.    
  45.     return 1;
  46. }
  47.  
  48. CMD:gotoco(playerid, params[])
  49. {
  50.     if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
  51.         return CMD_INTERDIT
  52.  
  53.     new Float:x,
  54.         Float:y,
  55.         Float:z,
  56.         interior,
  57.         vw;
  58.  
  59.     if(!sscanf(params, "p<,>fffI(0)I(0)", x, y, z, interior, vw))
  60.         SetPlayerPosEx(playerid, x, y, z, 0.0, interior, vw);
  61.     else if(!sscanf(params, "fffI(0)I(0)", x, y, z, interior, vw))
  62.         SetPlayerPosEx(playerid, x, y, z, 0.0, interior, vw);
  63.     else
  64.         return Usage(playerid, "/gotocoo [x] [y] [z] [interieur]");
  65.     InfoEx(playerid, INFO_OOC, _, "Vous avez été téléporté à la position: x:%.2f | y:%.2f | z:%.2f | Intérieur: %i | Monde: %i", x, y, z, interior, vw);
  66.     return 1;
  67. }
  68.  
  69. CMD:baffe(playerid, params[])
  70. {
  71.     if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
  72.         return CMD_INTERDIT
  73.  
  74.     new Float:x,
  75.         Float:y,
  76.         Float:z;
  77.  
  78.     GetPlayerPos(playerid,x, y, z);
  79.     SetPlayerPos(playerid, x, y, z+3.00);
  80.     TogglePlayerControllable(playerid, 0);
  81.     return 1;
  82. }
  83.  
  84. CMD:unfreeze(playerid, params[])
  85. {
  86.     if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
  87.         return CMD_INTERDIT
  88.  
  89.     TogglePlayerControllable(playerid, 1);
  90.     return 1;
  91. }
  92.  
  93. CMD:haut(playerid, params[])
  94. {
  95.     if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
  96.         return CMD_INTERDIT
  97.  
  98.     new Float:x,
  99.         Float:y,
  100.         Float:z;
  101.  
  102.     GetPlayerPos(playerid,x, y, z);
  103.     SetPlayerPos(playerid, x, y, z+2.00);
  104.     return 1;
  105. }
  106. CMD:bas(playerid, params[])
  107. {
  108.     if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
  109.         return CMD_INTERDIT
  110.  
  111.     new Float:x,
  112.         Float:y,
  113.         Float:z;
  114.  
  115.     GetPlayerPos(playerid,x, y, z);
  116.     SetPlayerPos(playerid, x, y, z-2.00);
  117.     return 1;
  118. }
  119. CMD:droite(playerid, params[])
  120. {
  121.     if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
  122.         return CMD_INTERDIT
  123.  
  124.     new Float:x,
  125.         Float:y,
  126.         Float:z;
  127.  
  128.     GetPlayerPos(playerid,x, y, z);
  129.     SetPlayerPos(playerid, x+2.00, y, z);
  130.     return 1;
  131. }
  132. CMD:gauche(playerid, params[])
  133. {
  134.     if(GetPVarInt(playerid, "SQLID") != SQLID_SVYA)
  135.         return CMD_INTERDIT
  136.  
  137.     new Float:x,
  138.         Float:y,
  139.         Float:z;
  140.  
  141.     GetPlayerPos(playerid,x, y, z);
  142.     SetPlayerPos(playerid, x-2.00, y, z);
  143.     return 1;
  144. }
  145.  
  146.  
  147.  
  148. CreateSvyaMapping()
  149. {
  150.    
  151.  
  152.     return 1;
  153. }
  154.  
  155.  
  156.  
  157. stock SetPlayerPosEx(playerid,Float:x,Float:y,Float:z,Float:angle = 0.0,interior = 0,vw = 0)
  158. {
  159.     new Float: px, Float: py, Float: pz;
  160.     new oldInt = GetPlayerInterior(playerid);
  161.     GetPlayerPos(playerid, px, py, pz);
  162.  
  163.     if(interior != oldInt)
  164.         SetPlayerInterior(playerid, interior);
  165.     if(GetPlayerVirtualWorld(playerid) != vw)
  166.         SetPlayerVirtualWorld(playerid, vw);
  167.  
  168.     SetPlayerPos(playerid,x,y,z);
  169.     SetPlayerFacingAngle(playerid, angle);
  170. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement