Create Vehicle Command
#1

I am trying to make a command with this to type something like /elegy and make a elegy spawn next to me.
What I have not been able to find is what to use to do this, is there a CreateVehicle? I cant find anything. I just want a car to spawn next to me, so I cant save the coords or anything.

Thanks
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/elegy"))
    {

        return 1;
    }
Reply
#2

pawn Код:
if(!strcmp(cmdtext, "/elegy"))
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        CreateVehicle(522, X + 2, Y, Z, 0.0, 0, 0, 10); // 522 is the vehicle ID, change it to the Elegy
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)