[pawn]#include <a_samp> #define bandana 1000 enum pInfo { pDonateRank } new PlayerInfo[MAX_PLAYERS][pInfo]; #define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9,%10) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1,%2,%3,%4,%5,%6,%7,%8,%9,%10) #define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJECTS-1) #define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTACHED_OBJECTS-1) main() { print("[FS]Hold Bandana by Lucian."); } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/bandana", true) == 0) { if(PlayerInfo[playerid][pDonateRank] > 1) { ShowPlayerDialog(playerid,bandana,DIALOG_STYLE_LIST,"Bandana","Bandana 1\nBandana 2\nBandana 3\nBandana 4\nBandana 5\nBandana 6\nBandana 7\nBandana 8\nBandana 9\nBandana 10\nRemove Bandana","OK",""); } return 1; } return 0; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid==bandana) { if(response) { if(listitem==0) { SetPlayerAttachedObject( playerid, 0, 18917, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754); } if(listitem==1) { SetPlayerAttachedObject( playerid, 0, 18913, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754); } if(listitem==2) { SetPlayerAttachedObject( playerid, 0, 18916, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754); } if(listitem==3) { SetPlayerAttachedObject(playerid, 0, 18915, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754); } if(listitem==4) { SetPlayerAttachedObject(playerid, 0, 18912 , 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754); } if(listitem==5) { SetPlayerAttachedObject(playerid, 0, 18911 , 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754); } if(listitem==6) { SetPlayerAttachedObject( playerid, 0, 18914, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754); } if(listitem==7) { SetPlayerAttachedObject(playerid, 0, 18918, 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754); } if(listitem==8) { SetPlayerAttachedObject(playerid, 0, 18920 , 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754); } if(listitem==9) { SetPlayerAttachedObject(playerid, 0, 18919 , 2, 0.078534, 0.041857, -0.001727, 268.970458, 1.533374, 269.223754); } if(listitem==10) { for(new i;i<5;i++) RemovePlayerAttachedObject(playerid,i); } } return 1; } return 0; } public OnFilterScriptExit() { for(new i=0;i<MAX_PLAYERS;i++) if(IsPlayerConnected(i)) StopPlayerHoldingObject(i); return 0; }[/pawn]