29.10.2013, 22:34
Hey guys, How can you create a Repair pickup? ^^
The Location is : 2030.0023,-1863.4410,13.5481,178.4680
The Location is : 2030.0023,-1863.4410,13.5481,178.4680
//example
new repairp;
public OnGameModeInit()
{
repairp = CreatePickup(ID, 2, X, Y, Z, -1);
// Remplace ID by your pickup ID. -1 = virtual world
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == repairp) // if he is on the repair pickup
{
// if he is in a veh
RepairVehicle(GetPlayerVehicleID(playerid));
}
return 1;
} // matnix
new repair_pickup;
//In ongamemodeinit..
repair_pickup = CreatePickup(1242, 14, 2030.0023,-1863.4410,13.5481, -1);
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == repair_pickup)
{
if(IsPlayerInAnyVehicle(playerid)) {
RepairVehicle(GetPlayerVehicleID(playerid));
}
}
return 1;
}
https://sampwiki.blast.hk/wiki/CreatePickup
pawn Код:
pawn Код:
pawn Код:
|