how to make cmd that spawns a object to you
#1

i want like if you type /chair

then this object
1765 - Chair


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

With these functions

https://sampwiki.blast.hk/wiki/OnPlayerCommandText
https://sampwiki.blast.hk/wiki/GetPlayerPos
https://sampwiki.blast.hk/wiki/CreateObject
Reply
#3

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;
}
Reply
#4

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)