SA-MP Forums Archive
HOW CAN I MAKE GIVE ALL - 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 CAN I MAKE GIVE ALL (/showthread.php?tid=542558)



HOW CAN I MAKE GIVE ALL - ThunderX - 20.10.2014

HOW CAN I MAKE THIS CMD WITH ZCMD

/giveallveh [veh id]


if i use this cmd i will give all player that veh


Re: HOW CAN I MAKE GIVE ALL - austin070 - 20.10.2014

pawn Код:
CMD:giveallveh(playerid, params[])
{
    new model, car;
    if(sscanf(params, "d", model)) return SendClientMessage(playerid, -1, "Usage: /giveallveh [model]");
   
    new Float:x, Float:y, Float:z, Float:a;
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            GetPlayerPos(i, x, y, z);
            GetPlayerFacingAngle(i, a);
            car = CreateVehicle(model, x, y, z, a, -1, -1, 0);
            PutPlayerInVehicle(i, car, 0);
        }
    }
   
    return 1;
}



Re: HOW CAN I MAKE GIVE ALL - ThunderX - 20.10.2014

Thank you