public OnPlayerPickUpPickup(playerid, pickupid)
{
switch (pickupid)
{
//-----------------------Vehicle Repair----------------
case 0:
{
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
SendClientMessage(playerid,orange,"Vehicle Fixed");
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
switch (pickupid)
{
//-----------------------Vehicle Repair----------------
case 0:
{
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
SendClientMessage(playerid,orange,"Vehicle Fixed");
}
}
return 1;
}
} } return 1; } |
case 0:
{
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
SendClientMessage(playerid,orange,"Vehicle Fixed");
}
//-----------------------Weapons-----------------------
case 1:
{
if(pickupid == PICKUP1)
{
// Their Functions
}
new some_pickup;//global
//put this wherever you create the pickup:
some_pickup = CreatePickup(...);
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == some_pickup)
{
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
SendClientMessage(playerid,orange,"Vehicle Fixed");
}
return 1;
}