SA-MP Forums Archive
spwan with over 100 hp wont work - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: spwan with over 100 hp wont work (/showthread.php?tid=253494)



spwan with over 100 hp wont work - Amine_Mejrhirrou - 06.05.2011

yo all
the problem is simple : this is my script
Код:
public OnPlayerSpawn(playerid)
{	
	if(team[playerid] == 2)
	{
	    SetPlayerRandomSpawn(playerid);
	    SetPlayerTeam(playerid, 2);
	    team[playerid] = 2;
		SetPlayerColor(playerid,ZRED);
		GameTextForPlayer(playerid,"~r~Zombie  ~b~ KEY_FIRE to bit human",10000,3);
		SetPlayerHealth(playerid, 150);
		GivePlayerMoney(playerid,30);
but when i spaw tha plyr has only 100 hp


Re: spwan with over 100 hp wont work - Daddy Yankee - 07.05.2011

Maybe you have some anticheat which blocks this ?


Re: spwan with over 100 hp wont work - BizzyD - 07.05.2011

Quote:
Originally Posted by Amine_Mejrhirrou
Посмотреть сообщение
yo all
the problem is simple : this is my script
Код:
public OnPlayerSpawn(playerid)
{	
	if(team[playerid] == 2)
	{
	    SetPlayerRandomSpawn(playerid);
	    SetPlayerTeam(playerid, 2);
	    team[playerid] = 2;
		SetPlayerColor(playerid,ZRED);
		GameTextForPlayer(playerid,"~r~Zombie  ~b~ KEY_FIRE to bit human",10000,3);
		SetPlayerHealth(playerid, 150);
		GivePlayerMoney(playerid,30);
but when i spaw tha plyr has only 100 hp
It shows as 100, But really it is 150.

Add this code to your script and do /myhealth ingame and you will see your health.

pawn Код:
if (strcmp("/myhealth", cmdtext, true, 10) == 0)
    {
        new string[128];
        new Float:health;
        GetPlayerHealth(playerid,health);
        format(string,128,"Your health is: %.1f ");
        SendClientMessage(playerid,0xAAAAAAAA,string);
        return 1;
    }



Re: spwan with over 100 hp wont work - Lorenc_ - 07.05.2011

I here am experiencing this with Zombie Chasing NPC'S as well.


Re : Re: spwan with over 100 hp wont work - Amine_Mejrhirrou - 07.05.2011

Quote:
Originally Posted by AlexzzPro
Посмотреть сообщение
It shows as 100, But really it is 150.
it's showing 100 caus it's 100 hp (i hav a txt rawn for hp & armor)
tha problem whas junkbuster ... it spawn the player with 100 hp


Re: Re : Re: spwan with over 100 hp wont work - BizzyD - 07.05.2011

Quote:
Originally Posted by Amine_Mejrhirrou
Посмотреть сообщение
it's showing 100 caus it's 100 hp (i hav a txt rawn for hp & armor)
tha problem whas junkbuster ... it spawn the player with 100 hp
Oh :P But did you figure out how to solve it?