Bug or something else
#3

You should try using player vehicles instead, so assign them to a playerid.

pawn Код:
new veh[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    veh[playerid] = -1;
    return 1;
}

public OnPlayerDisconnect(playerid)
{
    if(veh[playerid] != -1)
    {
        DestroyVehicle(veh[playerid]);
    }
    return 1;
}

COMMAND:car(playerid,params[])
{
    new model, carc1, carc2;
    new Float:x, Float:y, Float:z;
    if(sscanf(params, "iii", model, carc1, carc2)) return SendClientMessage(playerid, RAUDONA, "/car [model_id] [color1] [color2]");
    GetPlayerPos(playerid, x, y, z);
    if(veh[playerid] != -1)
    {
        DestroyVehicle(veh[playerid]);
    }
    veh[playerid] = CreateVehicle(model, x, y+5, z+2, 0, spalva1, spalva2, 400);
    TrDegalai[veh[playerid]] = 8.0;
    SendClientMessage(playerid, BALTA, "Car created!");
    return 1;
}
EDIT: At the end of CreateVehicle, there is a respawn delay parameter, you just need to set this to -1 to prevent it from respawning.
https://sampwiki.blast.hk/wiki/CreateVehicle
Reply


Messages In This Thread
Bug or something else - by Vvolk - 30.12.2012, 22:14
Re: Bug or something else - by Jimmy0wns - 30.12.2012, 22:33
Re: Bug or something else - by Threshold - 30.12.2012, 22:35
Re: Bug or something else - by Vvolk - 30.12.2012, 22:39
Re: Bug or something else - by Threshold - 30.12.2012, 22:41
Re: Bug or something else - by Vvolk - 30.12.2012, 22:43
Re: Bug or something else - by Vvolk - 01.01.2013, 12:12
Re: Bug or something else - by Vince - 01.01.2013, 12:21
Re: Bug or something else - by Vvolk - 01.01.2013, 12:39

Forum Jump:


Users browsing this thread: 6 Guest(s)