SA-MP Forums Archive
give player vehicle - 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: give player vehicle (/showthread.php?tid=660057)



give player vehicle - Spawe - 23.10.2018

Well as the title says I want a command for example / darauto [player] [auto] for administrators


Re: give player vehicle - d3Pedro - 24.10.2018

Quote:
Originally Posted by Spawe
Посмотреть сообщение
Well as the title says I want a command for example / darauto [player] [auto] for administrators
Код:
CMD:darauto(playerid, params[])
{
//    if(AdminVar[playerid] != Adminlevel) return SendClientMessage(playerid, -1, "ERROR: Your admin level has not authorize on this command!");
    new targetid, model;
    if(sscanf(params, "ui", targetid, model))
    {
        return SendClientMessage(playerid, -1, "USAGE: /givepveh [playerid] [modelid]");
    }
    if(!(400 <= model <= 611))
    {
        return SendClientMessage(playerid, -1, "Invalid vehicle id");
    }
    new Float:posx, Float:posy, Float:posz, Float:a;
    GetPlayerPos(targetid, posx, posy, posz);
    GetPlayerFacingAngle(targetid, a);
	AddStaticVehicleEx(model, posx, posy, posz, a, -1, -1, -1);
    return 1;
}



Re: give player vehicle - Spawe - 24.10.2018

Thank brooo