Bob_Marley

[PAWNO] Script Christmas hat beta version 1

Nov 3rd, 2012
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.60 KB | None | 0 0
  1. #file                         "fir.amx" //It can be removed.
  2. #include                       a_samp //Standard features SA-MP.
  3. // Script Christmas hat beta version 1
  4. new bool:FIR[MAX_PLAYERS]; //array
  5. #define Function: public //Well as BE. Public changed. Or blue irritates me.
  6. #define ACMD(%1,%2) \
  7.         OnPlayerCommandText(%1,%2)        //Well as BE. Public changed. Or blue irritates me.
  8. Function: OnPlayerDisconnect(playerid, reason) //If you took off the internet. Atach the object.
  9. {
  10.     FIR{playerid} = false;
  11.     return RemovePlayerAttachedObject(playerid, 3);
  12. }
  13. Function: OnPlayerDeath(playerid, killerid, reason) //If you are killed. Objects are removed.
  14. {
  15.     FIR{playerid} = false;
  16.     return RemovePlayerAttachedObject(playerid, 3);
  17. }
  18. Function: OnPlayerSpawn(playerid) //Although it is not necessary. Who needs can leave.
  19. {
  20.     FIR{playerid} = false;
  21.     return RemovePlayerAttachedObject(playerid, 3);
  22. }    
  23.  
  24. Function: ACMD(playerid, cmdtext[]) {
  25.         if(strcmp(cmdtext, "/Christmas", true)){ //If we have a false, then we object attached. True if the action is not.
  26.             if(!FIR{playerid}){  
  27.                 SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);  
  28.                 FIR{playerid} = true;
  29.             }        
  30.             else{ //Attachments action and false the array.
  31.                 RemovePlayerAttachedObject(playerid, 3);  
  32.                 FIR{playerid} = false;
  33.             }    
  34.             return 1;  
  35.         }
  36.         return 0;      
  37. }
  38. #endscript //It can be removed.
Advertisement
Add Comment
Please, Sign In to add comment