08.10.2011, 17:09
Here it is for the repair pickups.
Code:
Code:
pawn Код:
forward pickup();
SetTimer("pickup",5000,true);
public pickup()
{
newplayer = CreatePickup(1240,14,405.8782,2460.9792,17.2118,-1);
airwolves = CreatePickup(1240,14,1619.4607,1337.4252,10.8095,-1);
bluefoxes = CreatePickup(1240,14,1874.7584,-2288.3972,14.2586,-1);
thunderbirds = CreatePickup(1240,14,-1372.7068,-214.9956,14.1484,-1);
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == newplayer)
{
if(GetPlayerTeam(playerid) == 0)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
return 1;}
}
else if(pickupid == airwolves)
{
if(GetPlayerTeam(playerid) == 1)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
return 1;}
}
else if(pickupid == bluefoxes)
{
if(GetPlayerTeam(playerid) == 2)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
return 1;}
}
else if(pickupid == thunderbirds)
{
if(GetPlayerTeam(playerid) == 3)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, 0x33AA33AA, "Your vehicle has been repaired!");
return 1;}
}
return 1;
}