#2

Honestly, this is ridiculously easy.

Using ZCMD:
pawn Код:
CMD:veh(playerid, params[])
{
    new Float:x, Float:y, Float:z, Float:a,  vehid = strval(params); // Creates the variables, creates vehid which is formatted to be the id typed after /veh
    GetPlayerPos(playerid, x, y, z); // Gets the player's position, formats it into the variables.
    GetPlayerFacingAngle(playerid, a); // His facing angle, formats it into its variable.
    CreateVehicle(vehid, x+3, y+3, z+3, a, -1, -1, 120); // Finally, spawning the vehicle. I added +3 so that it doesn't spawn directly under the player or anything.
    return 1;
}
Reply


Messages In This Thread
CMD - by DaniceMcHarley - 02.11.2012, 13:52
Re: CMD - by DBan - 02.11.2012, 14:22
Re: CMD - by [LB]GoLd_DeViL - 17.01.2013, 14:57
Re: CMD - by ryansheilds - 17.01.2013, 15:38

Forum Jump:


Users browsing this thread: 2 Guest(s)