12.02.2017, 17:57
Where do you create the pickup? Show the code please
You have to do something like "RepairPickup = CreatePickup....." and then check for "RepairPickup" under OnPlayerPickUpPickup.
You have to do something like "RepairPickup = CreatePickup....." and then check for "RepairPickup" under OnPlayerPickUpPickup.
PHP код:
new RepairPickup;
RepairPickup = CreatePickup(...);
//Under OnPlayerPickUpPickup
if(pickupid == RepairPickup)
{
if(pInfo[playerid][fraktion]==2 && pInfo[playerid][fraktion]==3)
{
if(IsPlayerInAnyVehicle(playerid))
{
RepairVehicle(GetPlayerVehicleID(playerid));
SendClientMessage(playerid, GELB, "Du hast das Fahrzeug repariert.");
}
}
else
{
SendClientMessage(playerid, GRAU, "Du hast keine Berechtigungen dein Fahrzeug zu reparieren.");
return 1;
}
}