StraliotiF

SISTEMA DE CF - GT

Sep 30th, 2016
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 2.64 KB | None | 0 0
  1. /* FS FEITO POR FÁBIO STRALIOTI, NÃO RETIRE OS CRÉDITOS */
  2. #define FILTERSCRIPT
  3. #include <a_samp>
  4. #include <zcmd>
  5. #include <sscanf2>
  6.  
  7. #if defined FILTERSCRIPT
  8.  
  9. new bool:cf[MAX_PLAYERS];
  10. new stralioti[128];
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.     print("Eu sou o cara do momento, FABINHO LIMDO");
  15.     return 1;
  16. }
  17.  
  18. public OnPlayerConnect(playerid) {
  19.     SendClientMessage(playerid, -1,"Este Servidor usa o FS DE CF feito por: Fábio Stralioti");
  20.     SendClientMessage(playerid, -1,"Para ver os comandos use: /comandosfs");
  21.     return 1;
  22. }
  23.  
  24.  
  25. public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
  26. {
  27.     for(new i; i <GetPlayerPoolSize() + 1; i++)
  28.     {
  29.  
  30.         if(IsPlayerConnected(i))
  31.         {
  32.  
  33.             if(cf[i])
  34.             {
  35.  
  36.                 static Float:vida;
  37.                 GetPlayerHealth(damagedid, vida);
  38.                 SetPlayerArmour(damagedid, (vida-amount));
  39.                 SetPlayerHealth(damagedid, (vida-amount));
  40.             }
  41.         }
  42.     }
  43.     return 1;
  44. }
  45.  
  46. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  47. {
  48.     if(dialogid == 123)
  49.     {
  50.         if(response)
  51.         {
  52.         if(listitem == 0)
  53.         {
  54.             SetPlayerPos(playerid, -1111.6626,-888.2189,74.5799);
  55.         }
  56.         if(listitem == 1)
  57.         {
  58.             SetPlayerPos(playerid, 469.8008,-1112.6299,27.8615);
  59.         }
  60.         if(listitem == 2)
  61.         {
  62.             SetPlayerPos(playerid, -391.9537,-2781.9492,64.6013);
  63.         }
  64.         if(listitem == 3)
  65.         {
  66.             SetPlayerPos(playerid, -2595.7278,-2123.5432,31.0957);
  67.         }
  68.     }
  69. }
  70.     return 1;
  71. }
  72.    
  73.  
  74. CMD:locaiscf(playerid) {
  75.      ShowPlayerDialog(playerid, 123, DIALOG_STYLE_LIST, "Locais","Local 1\nLocal 2\nLocal 3\nLocal 4", "Selecionar", "Cancelar");
  76.      return 1;
  77. }
  78.  
  79. CMD:prepararcf(playerid) {
  80.     for(new i; i <GetPlayerPoolSize() + 1; i++)
  81.     {
  82.         SetPlayerHealth(i, 100);
  83.         SetPlayerArmour(i, 100);
  84.         GivePlayerWeapon(i, 46, 1);
  85.         SetPlayerVirtualWorld(i, 2);
  86.         cf[i] = true;
  87.     }
  88.     format(stralioti, sizeof(stralioti), "O %s setou todos para CF", nome(playerid));
  89.     SendClientMessageToAll(-1, stralioti);
  90.     return 1;
  91. }
  92.  
  93. CMD:saircf(playerid) {
  94.     for(new i; i <GetPlayerPoolSize() + 1; i++)
  95.     {
  96.         cf[i] = false;
  97.         SpawnPlayer(i);
  98.         SetPlayerArmour(i, 0);
  99.         SetPlayerHealth(i, 100);
  100.         SetPlayerVirtualWorld(i, 0);
  101.     }
  102.     format(stralioti, sizeof(stralioti), "O %s desetou todos do CF", nome(playerid));
  103.     SendClientMessageToAll(-1, stralioti);
  104.     return 1;
  105. }
  106.  
  107. CMD:comandosfs(playerid) {
  108.     SendClientMessage(playerid, -1,"------------[COMANDOS]------------");
  109.     SendClientMessage(playerid, -1,"/locaiscf");
  110.     SendClientMessage(playerid, -1,"/prepararcf");
  111.     SendClientMessage(playerid, -1,"/saircf");
  112.     return 1;
  113. }
  114.  
  115. nome(playerid) {
  116.     new nomee[MAX_PLAYER_NAME];
  117.     GetPlayerName(playerid, nomee, sizeof(nomee));
  118.     return nomee;
  119. }
  120.  
  121. #else
  122. #endif
Advertisement
Add Comment
Please, Sign In to add comment