Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BY: INFINITE HOST/STORE
- #include <a_samp>
- //criando um new para verificar se o jogador tem a auréola ou não
- new colocaraureola[MAX_PLAYERS] = 0;
- //Quando o jogador sair do jogador irá retirar a Auréola caso ele tem
- public OnPlayerDisconnect(playerid, reason)
- {
- if(colocaraureola[playerid] == 1)
- {
- TirarAureola(playerid);
- }
- return 1;
- }
- //Criando um comando para colocar ou tirar a auréola
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/aureola", cmdtext, true, 10) == 0)
- {
- if(colocaraureola[playerid] == 0)//Ele não tem Auréola
- {
- ColocarAureola(playerid);//colocando Auréola
- colocaraureola[playerid] = 1;
- return 1;
- }
- if(colocaraureola[playerid] == 1)//Ele tem Auréola
- {
- TirarAureola(playerid);//Tirando Auréola
- colocaraureola[playerid] = 0;
- return 1;
- }
- return 1;
- }
- return 0;
- }
- stock ColocarAureola(playerid)//Definição de ColocarAureola
- {
- new id;
- id = CountAttachedObjects(playerid);
- SetPlayerAttachedObject(playerid,id,2992,2,0.306000,-0.012000,0.009000,0.000000,-95.299942,-1.399999,1.000000,1.000000,1.000000);
- SetPlayerAttachedObjectEx(2992,Vaga_Aureola1,playerid,id);
- id = CountAttachedObjects(playerid);
- SetPlayerAttachedObject(playerid,id,2992,2,0.313000,-0.007000,0.032999,-0.299999,83.700019,0.000000,1.000000,1.000000,1.000000);
- SetPlayerAttachedObjectEx(2992,Vaga_Aureola2,playerid,id);
- }
- stock TirarAureola(playerid)//Definição de TirarAureola
- {
- RemovePlayerAttachedObjectEx(playerid, Vaga_Aureola1);
- RemovePlayerAttachedObjectEx(playerid, Vaga_Aureola2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement