[Help] Setting a timer to delay rest of command
#6

pawn Код:
forward CarTimer(Float:X, Float:Y, Float:Z);
pawn Код:
if(strcmp(cmd, "/getcar", true) == 0)
    {
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(playerid, X, Y, Z);
        SendClientMessage(playerid, COLOR_HELP, "A car will be to your position in 2 Minutes");
        SetTimer("CarTimer",60*2*1000, false, "%f %f %f", X, Y, Z);
        return 1;
    }
pawn Код:
public CarTimer(Float:X, Float:Y, Float:Z)
new carid = CreateVehicle(410, X,Y+5,Z+1, 0.0, 6, 6, 15);
        CreatedCars[CreatedCar] = carid; // Part of la-rp base
        CreatedCar ++; // Part of la-rp base
}
Not tested.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)