pawn Код:
forward AttachObjectCorrectly(playerid, object);
public AttachObjectCorrectly(playerid, object)
{
if(object == 1550)
{
SetPlayerAttachedObject(playerid, 3,1550,3,0.1,0.1,-0.1,0.0,270.0,0.0);
}
else if(object == 373)
{
SetPlayerAttachedObject(playerid, 3,373,1,0.3,-0.0,-0.1,70.0,25.0,35.0);
}
else if(object == 2992)
{
SetPlayerAttachedObject(playerid, 3,2992,2,0.2,0.0,0.0,0.0,90.0,0.0);
}
else if(object == 3265)
{
SetPlayerAttachedObject(playerid, 3,3265,1,-0.5,0.0,0.0,0.0,90.0,180.0);
}
else if(object == 1575)
{
SetPlayerAttachedObject(playerid, 3,1575,6,0.0,0.0,0.0,0.0,90.0,0.0);
}
else if(object == 1210)
{
SetPlayerAttachedObject(playerid, 3,1210,5,0.3,0.1,0.0,0.0,270.0,0.0);
}
else if(object == 3026)
{
SetPlayerAttachedObject(playerid, 3,3026,1,-0.1,-0.0,0.0,0.0,0.0,0.0);
}
else if(object == 2054)
{
SetPlayerAttachedObject(playerid, 3,2054,2,0.1,0.0,-0.0,0.0,90.0,180.0);
}
else if(object == 2053)
{
SetPlayerAttachedObject(playerid, 3,2053,2,0.1,0.0,0.0,0.0,90.0,0.0);
}
else if(object == 2052)
{
SetPlayerAttachedObject(playerid, 3,2052,2,0.1,0.0,0.0,0.0,90.0,0.0);
}
else return SendClientMessage(playerid, COLOR_GREY,"[DEBUG]: Unkown Object, Contact a developer!");
return 1;
}
Somewhere in your script, you can either change your script around, or modify the function you're creating. I also recommend using a switch statement rather than a bunch of if statements.