07.03.2013, 17:57
hi all i have a litte problem with my script it loads 9 objects but the 10th object doesnt load.
can someone help me how to fix it, that i can load more objects in my menu.
this script has no errors or warnings.
here is the pawn code
#include <a_samp>
#if defined FILTERSCRIPT
#define 0xFF0000FF
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJ ECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_ OBJECTS-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTAC HED_OBJECTS-1)
public OnFilterScriptInit()
{
print("-=-=Appelmouse Simple Objects Menu=-=-");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hold", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 2341, DIALOG_STYLE_LIST, "APCOM Hold Menu", "FlameHands\nCow\nTurtle\nShark\nXmasBox\nMoneybag \nParrot\nGlasses\nM4\nEgg\nRemove Object", "Select", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2341)
{
if(response)
{
if(listitem == 0)
{
SetPlayerAttachedObject(playerid,0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000);
SetPlayerAttachedObject(playerid,1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000);
SendClientMessage(playerid, 0xFF0000FF, "Holding FlameHands");
}
if(listitem == 1)
{
SetPlayerAttachedObject(playerid, 2, 16442, 1);
SendClientMessage(playerid, 0xFF0000FF, "Holding Cow");
}
if(listitem == 2)
{
SetPlayerAttachedObject(playerid, 3, 1609, 1);
SendClientMessage(playerid, 0xFF0000FF, "Holding Turtle");
}
if(listitem == 3)
{
SetPlayerAttachedObject(playerid, 4, 1608, 1);
SendClientMessage(playerid, 0xFF0000FF, "Holding Shark");
}
if(listitem == 4)
{
SetPlayerAttachedObject(playerid, 5, 19054, 2);
SendClientMessage(playerid, 0xFF0000FF, "Holding XmasBox");
}
if(listitem == 5)
{
SetPlayerAttachedObject(playerid, 6, 1550, 1, -0.008714, -0.188819, -0.026564, 159.138153, 86.558647, 0.000000, 1.005565, 0.984468, 1.014210);
SendClientMessage(playerid, 0xFF0000FF, "Holding MoneyBag");
}
if(listitem == 6)
{
SetPlayerAttachedObject(playerid, 7, 19079, 1, 0.328340, -0.019586, -0.157024, 0.000000, 0.000000);
SendClientMessage(playerid, 0xFF0000FF, "Holding Parrot");
}
if(listitem == 7)
{
SetPlayerAttachedObject(playerid, 8, 19138, 2, 0.080131, 0.047566, -0.000297, 87.368026, 81.564750, 0.219037, 1.139057, 1.092170, 0.973663);
SendClientMessage(playerid, 0xFF0000FF, "Holding Glasses");
}
if(listitem ==
{
SetPlayerAttachedObject(playerid, 9, 356, 1, 0.299511, -0.122143, 0.134006, 0.000000, 158.504928, 0.000000);
SendClientMessage(playerid, 0xFF0000FF, "Holding M4");
}
if(listitem == 9)
{
SetPlayerAttachedObject(playerid, 10, 19341, 1);
SendClientMessage(playerid, 0xFF0000FF, "Holding Egg");
}
if(listitem == 10)
{
RemovePlayerAttachedObject(playerid,0);
RemovePlayerAttachedObject(playerid,1);
RemovePlayerAttachedObject(playerid,2);
RemovePlayerAttachedObject(playerid,3);
RemovePlayerAttachedObject(playerid,4);
RemovePlayerAttachedObject(playerid,5);
RemovePlayerAttachedObject(playerid,6);
RemovePlayerAttachedObject(playerid,7);
RemovePlayerAttachedObject(playerid,;
RemovePlayerAttachedObject(playerid,9);
RemovePlayerAttachedObject(playerid,10);
SendClientMessage(playerid, 0xFF0000FF, "Removed Object");
}
}
return 1;
}
return 0;
}
can someone help me how to fix it, that i can load more objects in my menu.
this script has no errors or warnings.
here is the pawn code
#include <a_samp>
#if defined FILTERSCRIPT
#define 0xFF0000FF
#define SetPlayerHoldingObject(%1,%2,%3,%4,%5,%6,%7,%8,%9) SetPlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_OBJ ECTS-1,%2,%3,%4,%5,%6,%7,%8,%9)
#define StopPlayerHoldingObject(%1) RemovePlayerAttachedObject(%1,MAX_PLAYER_ATTACHED_ OBJECTS-1)
#define IsPlayerHoldingObject(%1) IsPlayerAttachedObjectSlotUsed(%1,MAX_PLAYER_ATTAC HED_OBJECTS-1)
public OnFilterScriptInit()
{
print("-=-=Appelmouse Simple Objects Menu=-=-");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/hold", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 2341, DIALOG_STYLE_LIST, "APCOM Hold Menu", "FlameHands\nCow\nTurtle\nShark\nXmasBox\nMoneybag \nParrot\nGlasses\nM4\nEgg\nRemove Object", "Select", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2341)
{
if(response)
{
if(listitem == 0)
{
SetPlayerAttachedObject(playerid,0, 18693, 5, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000);
SetPlayerAttachedObject(playerid,1, 18693, 6, 1.983503, 1.558882, -0.129482, 86.705787, 308.978118, 268.198822, 1.500000, 1.500000, 1.500000);
SendClientMessage(playerid, 0xFF0000FF, "Holding FlameHands");
}
if(listitem == 1)
{
SetPlayerAttachedObject(playerid, 2, 16442, 1);
SendClientMessage(playerid, 0xFF0000FF, "Holding Cow");
}
if(listitem == 2)
{
SetPlayerAttachedObject(playerid, 3, 1609, 1);
SendClientMessage(playerid, 0xFF0000FF, "Holding Turtle");
}
if(listitem == 3)
{
SetPlayerAttachedObject(playerid, 4, 1608, 1);
SendClientMessage(playerid, 0xFF0000FF, "Holding Shark");
}
if(listitem == 4)
{
SetPlayerAttachedObject(playerid, 5, 19054, 2);
SendClientMessage(playerid, 0xFF0000FF, "Holding XmasBox");
}
if(listitem == 5)
{
SetPlayerAttachedObject(playerid, 6, 1550, 1, -0.008714, -0.188819, -0.026564, 159.138153, 86.558647, 0.000000, 1.005565, 0.984468, 1.014210);
SendClientMessage(playerid, 0xFF0000FF, "Holding MoneyBag");
}
if(listitem == 6)
{
SetPlayerAttachedObject(playerid, 7, 19079, 1, 0.328340, -0.019586, -0.157024, 0.000000, 0.000000);
SendClientMessage(playerid, 0xFF0000FF, "Holding Parrot");
}
if(listitem == 7)
{
SetPlayerAttachedObject(playerid, 8, 19138, 2, 0.080131, 0.047566, -0.000297, 87.368026, 81.564750, 0.219037, 1.139057, 1.092170, 0.973663);
SendClientMessage(playerid, 0xFF0000FF, "Holding Glasses");
}
if(listitem ==
{
SetPlayerAttachedObject(playerid, 9, 356, 1, 0.299511, -0.122143, 0.134006, 0.000000, 158.504928, 0.000000);
SendClientMessage(playerid, 0xFF0000FF, "Holding M4");
}
if(listitem == 9)
{
SetPlayerAttachedObject(playerid, 10, 19341, 1);
SendClientMessage(playerid, 0xFF0000FF, "Holding Egg");
}
if(listitem == 10)
{
RemovePlayerAttachedObject(playerid,0);
RemovePlayerAttachedObject(playerid,1);
RemovePlayerAttachedObject(playerid,2);
RemovePlayerAttachedObject(playerid,3);
RemovePlayerAttachedObject(playerid,4);
RemovePlayerAttachedObject(playerid,5);
RemovePlayerAttachedObject(playerid,6);
RemovePlayerAttachedObject(playerid,7);
RemovePlayerAttachedObject(playerid,;
RemovePlayerAttachedObject(playerid,9);
RemovePlayerAttachedObject(playerid,10);
SendClientMessage(playerid, 0xFF0000FF, "Removed Object");
}
}
return 1;
}
return 0;
}