SA-MP Forums Archive
Spawning an object. - 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: Spawning an object. (/showthread.php?tid=639169)



Spawning an object. - TommyCole - 12.08.2017

I am making a furniture system, and I want to spawn the object which he chooses in the menu to the player's location. Can you send to me the edited Code?

Код:
 public OnPlayerModelSelection(playerid, response, listid, modelid)
{
	if(listid == objects)
	{
	    if(response)
	    
	    {
            new Float:x, Float:y, Float:z;
new modelid;
	    
		    SCM(playerid, RED, "Object Spawned");
	    	CreateDynamicObject(modelid, x,y,z);
	    }
	    else SendClientMessage(playerid, 0xFF0000FF, "Canceled");
    	return 1;
	}
}



Re: Spawning an object. - TommyCole - 12.08.2017

Can someone help?