How to do that HP...
#1

How to do that HP, having experienced it, does not disappear because it disappears and so does not give me HP: 100

CreateDynamicPickup(1240, 1, X, Y, Z, -1); // HP
Reply
#2

its like this
Код:
new [your pickup name NO SPACES];

public OnFilterScriptInti()
{
      [You Pickup name] = CreateDynamicPickup(1240, 1, X, Y, Z, -1);
      return 1;
}
Else if its a gamemode its like this

Код:
public OnGameModeInti()
{
      [You Pickup name] = CreateDynamicPickup(1240, 1, X, Y, Z, -1);
      return 1;
}
then
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
      if(pickupid = [Your Pickup name]);
      SetPlayerHealth(playerid, 100);
      DestroyDynamicPickup([Your Pickup ID]);
      return 1;
}
Reply
#3

Nvm, already told.
Reply
#4

D:\Server\gamemodes\drift.pwn(12796) : warning 211: possibly unintended assignment
D:\Server\gamemodes\drift.pwn(12796) : error 036: empty statement
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Line(12796): if(pickupid = pickup);

so?

Код:
	if(pickupid == pickup)
	{
		SetPlayerHealth(playerid, 100);
		DestroyDynamicPickup(pickup);
	}
EDIT: Passing through the pickup disappears HP
Reply
#5

if(pickupid == pickup)
{
SetPlayerHealth(playerid, 100);
}
Reply
#6

Yes, but it did not, disappeared as it passed through
Reply
#7

[You Pickup name] = CreateDynamicPickup(1240, 23, X, Y, Z, -1);

Instead of

[You Pickup name] = CreateDynamicPickup(1240, 1, X, Y, Z, -1);
Reply
#8

To become, but why the first CreateDynamicPickup (1239, 1, X, Y, Z, -1);
Having gone through it disappears, and should not disappear
Reply
#9

Quote:
Originally Posted by Join7
Посмотреть сообщение
To become, but why the first CreateDynamicPickup (1239, 1, X, Y, Z, -1);
Having gone through it disappears, and should not disappear
Its because you're using DestroyDynamicPickup.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)