Advertisement
NERYSVAN_TV

Auréola

May 11th, 2024
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.60 KB | Source Code | 0 0
  1. BY: INFINITE HOST/STORE
  2.  
  3. #include <a_samp>
  4. //criando um new para verificar se o jogador tem a auréola ou não
  5. new colocaraureola[MAX_PLAYERS] = 0;
  6. //Quando o jogador sair do jogador irá retirar a Auréola caso ele tem
  7. public OnPlayerDisconnect(playerid, reason)
  8. {
  9.     if(colocaraureola[playerid] == 1)
  10.     {
  11.         TirarAureola(playerid);
  12.     }
  13.     return 1;
  14. }
  15. //Criando um comando para colocar ou tirar a auréola
  16. public OnPlayerCommandText(playerid, cmdtext[])
  17. {
  18.     if (strcmp("/aureola", cmdtext, true, 10) == 0)
  19.     {
  20.         if(colocaraureola[playerid] == 0)//Ele não tem Auréola
  21.         {
  22.             ColocarAureola(playerid);//colocando Auréola
  23.             colocaraureola[playerid] = 1;
  24.             return 1;
  25.         }
  26.         if(colocaraureola[playerid] == 1)//Ele tem Auréola
  27.         {
  28.             TirarAureola(playerid);//Tirando Auréola
  29.             colocaraureola[playerid] = 0;
  30.             return 1;
  31.         }
  32.         return 1;
  33.     }
  34.     return 0;
  35. }
  36. stock ColocarAureola(playerid)//Definição de ColocarAureola
  37. {
  38.     new id;
  39.     id = CountAttachedObjects(playerid);
  40.     SetPlayerAttachedObject(playerid,id,2992,2,0.306000,-0.012000,0.009000,0.000000,-95.299942,-1.399999,1.000000,1.000000,1.000000);
  41.     SetPlayerAttachedObjectEx(2992,Vaga_Aureola1,playerid,id);
  42.     id = CountAttachedObjects(playerid);
  43.     SetPlayerAttachedObject(playerid,id,2992,2,0.313000,-0.007000,0.032999,-0.299999,83.700019,0.000000,1.000000,1.000000,1.000000);
  44.     SetPlayerAttachedObjectEx(2992,Vaga_Aureola2,playerid,id);
  45. }
  46. stock TirarAureola(playerid)//Definição de TirarAureola
  47. {
  48.     RemovePlayerAttachedObjectEx(playerid, Vaga_Aureola1);
  49.     RemovePlayerAttachedObjectEx(playerid, Vaga_Aureola2);
  50. }
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement