need help for some cmds
#5

Quote:
Originally Posted by JoshTheBoss
the /god is easy

at the top:
Код:
forward godmode (playerid);

new godmode;
new GodActive[MAX_PLAYERS];
then at the bottom of your script:
Код:
public godmode (playerid)
{
  SetPlayerHealth(playerid,500.0);
  return 1;
}
then at onplayercommandtext:
Код:
if (strcmp("/GodMode", cmdtext, true, 10) == 0)
{
  if (GodActive[playerid] == 0)
  {
     GodModeActive[playerid] = 1;
     SendClientMessage(playerid,COLOR,"god on");
     SetTimer("godmode", 200,1);
   }
   else
   {
     if (GodActive[playerid] == 1)
     {
        GodActive[playerid] = 0;
        SendClientMessage(playerid, COLOR_YELLOW, "god off");
        KillTimer(godmode);
      }
   }
}
Fail. This simply just gives you 500 hp. It doesnt keep spamming your hp up.
Reply


Messages In This Thread
need help for some cmds - by darkhamza - 31.05.2009, 17:38
Re: need help for some cmds - by Klutty - 31.05.2009, 18:10
Re: need help for some cmds - by darkhamza - 31.05.2009, 18:20
Re: need help for some cmds - by JoshTheBoss - 31.05.2009, 18:22
Re: need help for some cmds - by shitbird - 31.05.2009, 18:25
Re: need help for some cmds - by JoshTheBoss - 31.05.2009, 18:26
Re: need help for some cmds - by shitbird - 31.05.2009, 18:27
Re: need help for some cmds - by darkhamza - 31.05.2009, 19:32
Re: need help for some cmds - by Jakku - 31.05.2009, 19:35
Re: need help for some cmds - by darkhamza - 31.05.2009, 20:02

Forum Jump:


Users browsing this thread: 6 Guest(s)