Health problem
#1

How do I stop falling Health? Help please.
Reply
#2

wht u mean with falling health? :P
Reply
#3

yes. hp
Reply
#4

search for "godmode"?
Reply
#5

mode: underworld
Reply
#6

make a timer for a player you want to stop this and make it set the players health to 100

pawn Код:
new playergod[playerid];
//UnderGameModeInit
SetTimer("God",1000,1);
//Any where
forward God();
public God()
{
  for (new i = 0;i < MAX_PLAYERS;i ++)
  {
    if (playergod[i] == 1)
    {
      SetPlayerHealth(i,100);
    }
  }
  return 1;
}
//OnPlayerCommandText
if(strcmp(cmdtext, "/god", true) == 0)
{
  playergod[playerid] = 1;
}

if(strcmp(cmdtext, "/notgod", true) == 0)
{
  playergod[playerid] = 0;
}
Reply
#7

Error:

nefartas.pwn(139) : error 017: undefined symbol "playerid"
nefartas.pwn(139) : error 009: invalid array size (negative, zero or out of bounds)


139: new playergod[playerid];
Reply
#8

put this on the top of your script

pawn Код:
new playergod[playerid];
Reply
#9

Yes, I put it there.
Reply
#10

Код:
new playergod[playerid];
xD !

Код:
new playergod[200];
Reply
#11

thanks
Reply
#12

remove
Reply
#13

Quote:
Originally Posted by Jefff
Код:
new playergod[playerid];
xD !

Код:
new playergod[200];
that is for a playerid that is not a string

Edit: what you made there will never work what he whants
Reply
#14

Quote:
Originally Posted by ArcticFox
Quote:
Originally Posted by Jefff
Код:
new playergod[playerid];
xD !

Код:
new playergod[200];
that is for a playerid that is not a string

Edit: what you made there will never work what he whants
It will work 200 stands for MAX_PLAYERS
Reply
#15

Quote:
Originally Posted by !MaVe
Quote:
Originally Posted by ArcticFox
Quote:
Originally Posted by Jefff
Код:
new playergod[playerid];
xD !

Код:
new playergod[200];
that is for a playerid that is not a string

Edit: what you made there will never work what he whants
It will work 200 stands for MAX_PLAYERS
AHH i confused playerid with MAX_PLAYERS sorry all
Reply
#16

Fox, theres no need for a timer!

SetPlayerHealth(playerid, 100000); << Godmode
Reply
#17

If you want it just against weapons

pawn Код:
//OnGameModeInit
SetTeamCount(2);

//OnPlayerConnect
SetPlayerTeam(playerid, 0);
Reply
#18

Quote:
Originally Posted by Mikeshake
Fox, theres no need for a timer!

SetPlayerHealth(playerid, 100000); << Godmode
Thanks for telling me I didn't know that
Reply
#19

But that will make the health bar flickering
Reply
#20

So?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)