SA-MP Forums Archive
how to make cmd that spawns a object to you - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to make cmd that spawns a object to you (/showthread.php?tid=143021)



how to make cmd that spawns a object to you - hardstop - 20.04.2010

i want like if you type /chair

then this object
1765 - Chair


will spawn to my position how can i do like that?


Re: how to make cmd that spawns a object to you - dice7 - 20.04.2010

With these functions

https://sampwiki.blast.hk/wiki/OnPlayerCommandText
https://sampwiki.blast.hk/wiki/GetPlayerPos
https://sampwiki.blast.hk/wiki/CreateObject


Re: how to make cmd that spawns a object to you - aircombat - 20.04.2010

use this (tested and working) :
Код:
if(strcmp(cmd, "/chair", true) == 0)	
{
new Float:X; new Float:Y; new Float:Z;
GetPlayerPos(playerid,X,Y,Z);
CreateObject(1765,X,Y,Z,0, 0, 0);
return 1;
}



Re: how to make cmd that spawns a object to you - hardstop - 20.04.2010

Thanks