Command /acar doesn't seem to work well.
#6

Now i got this:
pawn Код:
CMD:acar(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_REDD, "[ERROR] You do not have the right's to use this command!");
    if (isnull(params)) return SendClientMessage(playerid, COLOR_LGREEN, "[USAGE]{ffffff} /acar [park/help/etc]");
    if (!strcmp(params, "help", true))
    {
        SendClientMessage(playerid, COLOR_LGREEN, "/acar help {ffffff}- List of /acar commands");
        SendClientMessage(playerid, COLOR_LGREEN, "/acar park {ffffff}- Park the vehicle you are in!");
    }
    else if (!strcmp(params, "park", true))
    {
        new vehicle, Float:x, Float:y, Float:z, Float:angle;
        vehicle = GetPlayerVehicleID(playerid);
        GetPlayerPos(playerid, x, y, z);
        GetPlayerFacingAngle(playerid, angle);
        VehicleInfo[vehicle][vX] = x;
        VehicleInfo[vehicle][vY] = y;
        VehicleInfo[vehicle][vZ] = z;
        VehicleInfo[vehicle][vA] = angle;
        SaveVehicle(vehicle);
        SetTimerEx("loadcar", 1000, false, "i", vehicle);
        SetPlayerPos(playerid, x, y, z+3);
        SendClientMessage(playerid, COLOR_LGREEN, "[Acar]{ffffff} Vehicle parked!");
    }
    else SendClientMessage(playerid, COLOR_LGREEN, "Use:{ffffff} /acar help for more info!");
    return 1;
}
And the timer:
pawn Код:
forward loadcar(i);
public loadcar(i)
{
    SetVehicleToRespawn(i);
}
Yet, it doesn't seem to park the vehicle yet.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)