How to make a command? /v [car name] - 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: How to make a command? /v [car name] (
/showthread.php?tid=632016)
How to make a command? /v [car name] -
Electron123 - 08.04.2017
Hello i want to make a command like /v car name
when people type /v [car name] they will get that car
And also i want to make a command like /createobject [ID name] I wanna add buildings like houses etcs
Re: How to make a command? /v [car name] -
Sithis - 08.04.2017
Read the wiki. You don't seriously expect us to do everything for you, right?
Re: How to make a command? /v [car name] -
Odeath - 08.04.2017
Here is a simple /obj it will create the ObjectID in the player's position if you want to create the object a little further from the player's position you can add some value to the x and y in CreateObject for example CreateObject(ObjectID,x+10.0,y,z,0.0,0.0,96.0);
Quote:
CMDbj(playerid,params[])
{
new ObjectID,Float,Float:y,Float:z;
if(sscanf(params,"i",ObjectID)){return SendClientMessage(playerid,0xff0000ff,"Usage: /obj [Object ID]");}
GetPlayerPos(playerid,x,y,z);
CreateObject(ObjectID,x,y,z,0.0,0.0,96.0);
return 1;
}
|