Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #file "fir.amx" //It can be removed.
- #include a_samp //Standard features SA-MP.
- // Script Christmas hat beta version 1
- new bool:FIR[MAX_PLAYERS]; //array
- #define Function: public //Well as BE. Public changed. Or blue irritates me.
- #define ACMD(%1,%2) \
- OnPlayerCommandText(%1,%2) //Well as BE. Public changed. Or blue irritates me.
- Function: OnPlayerDisconnect(playerid, reason) //If you took off the internet. Atach the object.
- {
- FIR{playerid} = false;
- return RemovePlayerAttachedObject(playerid, 3);
- }
- Function: OnPlayerDeath(playerid, killerid, reason) //If you are killed. Objects are removed.
- {
- FIR{playerid} = false;
- return RemovePlayerAttachedObject(playerid, 3);
- }
- Function: OnPlayerSpawn(playerid) //Although it is not necessary. Who needs can leave.
- {
- FIR{playerid} = false;
- return RemovePlayerAttachedObject(playerid, 3);
- }
- Function: ACMD(playerid, cmdtext[]) {
- if(strcmp(cmdtext, "/Christmas", true)){ //If we have a false, then we object attached. True if the action is not.
- if(!FIR{playerid}){
- SetPlayerAttachedObject(playerid, 3, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
- FIR{playerid} = true;
- }
- else{ //Attachments action and false the array.
- RemovePlayerAttachedObject(playerid, 3);
- FIR{playerid} = false;
- }
- return 1;
- }
- return 0;
- }
- #endscript //It can be removed.
Advertisement
Add Comment
Please, Sign In to add comment