SA-MP Forums Archive
How to do that HP... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to do that HP... (/showthread.php?tid=281748)



How to do that HP... - Join7 - 07.09.2011

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


Re: How to do that HP... - Zonoya - 07.09.2011

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;
}



Re: How to do that HP... - Sensitive - 07.09.2011

Nvm, already told.


Re: How to do that HP... - Join7 - 07.09.2011

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


Re : How to do that HP... - Naruto_Emilio - 07.09.2011

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


Re: How to do that HP... - Join7 - 07.09.2011

Yes, but it did not, disappeared as it passed through


Re: How to do that HP... - Emmet_ - 07.09.2011

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

Instead of

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


Re: How to do that HP... - Join7 - 07.09.2011

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


Re: How to do that HP... - =WoR=G4M3Ov3r - 07.09.2011

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.