06.09.2010, 14:05
No matter what pickup type I choose, it always disappears.
I'm using 0.3b if that would help.
Any suggestions?
I'm using 0.3b if that would help.
Any suggestions?
new MyPickup;
AddStaticPickup(1273, 23, X, Y, Z);
if(pickupid == MyPickup)
{
Here put stuff you want that when player gets in the pickup ...
return 1;
}
|
Change pickup type to ID 23 !
![]() Example: pawn Код:
|
|
Can we see part of script where you create pickup, and OnPlayerPickUpPickup();?
|
new BankPickup;
public OnGameModeInit()
{
SetGameModeText("CDM v1.0");
UsePlayerPedAnims();
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
// Pickups
BankPickup = CreatePickup(1239, 23, -794.9199, 1557.0032, 27.1244);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == BankPickup)
{
GameTextForPlayer(playerid, "~w~Bank Entrance~n~Press ~r~~k~~PED_DUCK~~w~ to enter", 5000, 5);
return 1;
}
return 1;
}
if(pickupid == dPickup)
{
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health +25);
DestroyPickup(dPickup);
}