SA-MP Forums Archive
Help me with making 0.3e Toys editor - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me with making 0.3e Toys editor (/showthread.php?tid=372041)



Help me with making 0.3e Toys editor - Jassey - 25.08.2012

I have read this https://sampwiki.blast.hk/wiki/EditAttachedObject
What should I do to make toys editor 0.3e? please teach me how to make it.


Re: Help me with making 0.3e Toys editor - Riddick94 - 25.08.2012

There's a lot of scripts with editing objects with this function. You got Attached Object Editor in original server package.. check FilterScripts folder and look for "Attachments.pwn" then open it and read.. you should understand.. (I hope)


Re: Help me with making 0.3e Toys editor - R4VER - 25.08.2012

just attach an object by usingSetPlayerAttachedObject function ... then use this script to let the player edit his toy if he has an object attached
Код:
	COMMAND:toyeditor(playerid, params[])
	{
		new i=0;
		if(IsPlayerAttachedObjectSlotUsed(playerid, i++))
	    {
	        EditAttachedObject(playerid, i);
	        SendClientMessage(playerid, -1, "You can edit your toy's position now!");
		}
		else
		{
		    SendClientMessage(playerid, -1, "You dont have any toy to edit");
		}
		return 1;
	}



Re: Help me with making 0.3e Toys editor - Riddick94 - 25.08.2012

Shouldn't be..?

pawn Код:
EditAttachedObject(playerid, i);
Your index variable doesn't make sense when you adding only +1 to it, because you are not changing the ID..


Re: Help me with making 0.3e Toys editor - R4VER - 25.08.2012

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Shouldn't be..?

pawn Код:
EditAttachedObject(playerid, i);
Your index variable doesn't make sense when you adding only +1 to it, because you are not changing the ID..
oh my bad! yup sry ill edit it