[Tutorial] Difference between CreateVehicle and AddStaticVehicle(Ex)
#9

Erm, AddStaticVehicle(Ex) does work in commands...

pawn Code:
dcmd_veh(playerid, params[])
{
    HMOD_CHECK;
    if(!strlen(params)) return SendClientMessage(playerid, COLOUR_RED, "Usage: /veh [model]");
    if(strval(params) < 400 || strval(params) > 611) return SendClientMessage(playerid, COLOUR_RED, "Models start from 400 and end at 611");
    if(strval(params) == 432 || strval(params) == 425 || strval(params) == 520)
    {
        ASH_CHECK;
    }
    new Float:xx, Float:yy, Float:zz;
    GetPlayerPos(playerid, xx, yy, zz);
    SpawnedVehicles[LastSpawn] = AddStaticVehicleEx(strval(params), xx+2.5, yy+2.5, zz, 0.0, -1, -1, -1);
    LastSpawn++;
    return 1;
}
(Ignore the _CHECK bits, they're just defines for permissions checks)

That command spawns every vehicle on the game, with no issues.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)