10.04.2011, 15:11
Hello!
I have made 4 pickups spawn type 14 with functions, this one can only be picked up when in a vehicle and then it disappear after pickup.
So i need a timer to create these pickups every 5 sec, i tried to make just one pickup with that timer from wiki, but didnt get it to work.
Anyone who can help me?
I have made 4 pickups spawn type 14 with functions, this one can only be picked up when in a vehicle and then it disappear after pickup.
So i need a timer to create these pickups every 5 sec, i tried to make just one pickup with that timer from wiki, but didnt get it to work.
Anyone who can help me?
pawn Код:
new newplayer;
new airwolves;
new bluefoxes;
new thunderbirds;
public OnGameModeInit()
{
newplayer = CreatePickup(3096,14,405.8782,2460.9792,17.2118,-1);
airwolves = CreatePickup(3096,14,1619.4607,1337.4252,10.8095,-1);
bluefoxes = CreatePickup(3096,14,1874.7584,-2288.3972,14.2586,-1);
thunderbirds = CreatePickup(3096,14,-1372.7068,-214.9956,14.1484,-1);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == newplayer)
{
SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
RepairVehicle(GetPlayerVehicleID(playerid));
}
if(pickupid == airwolves)
{
SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
RepairVehicle(GetPlayerVehicleID(playerid));
}
if(pickupid == bluefoxes)
{
SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
RepairVehicle(GetPlayerVehicleID(playerid));
}
if(pickupid == thunderbirds)
{
SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
RepairVehicle(GetPlayerVehicleID(playerid));
}
return 1;
}