Car Problem
#3

Try this:

pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/car nrg", cmdtext, true, 10) == 0)
    {
        new Float:x, Float:y, Float:z, Float:a;
        GetPlayerFacingAngle(playerid, a);
        GetPlayerPos(playerid, x, y, z);
        new snrg = CreateVehicle(522, x, y, z, a+90, -1, -1, 0);
        return 1;
    }
    return 0;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(vehicleid == snrg)
    {
        SetTimer("KillVehicle", 10000, false);
    }
    return 1;
}

forward KillVehicle(vehicleid);
public KillVehicle(vehicleid)
{
    DestroyVehicle(snrg);
}
Reply


Messages In This Thread
Car Problem - by AwokenNeoX - 09.05.2013, 12:43
Re: Car Problem - by vvhy - 09.05.2013, 12:49
Re: Car Problem - by MrTinder - 09.05.2013, 12:54
AW: Car Problem - by AwokenNeoX - 09.05.2013, 12:56

Forum Jump:


Users browsing this thread: 1 Guest(s)