/godmodez dont work ?
#1

Quote:

#include <a_samp>
#define INFINITY (Float:0x7F800000)
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/godmodez", cmdtext, true) == 0)
{
SetPlayerArmour(playerid, INFINITY);
SetPlayerHealth(playerid, INFINITY);
return 1;
}
return 0;
}

Whats Wrong?
Reply
#2

I'd rather just set the health and armor to 999999.
And if you want a real godemode, do this
pawn Код:
new god[MAX_PLAYERS]=0;

public OnPlayerCommandText(playerid, cmdtext[])
{

if(strcmp("/god",cmdtext,true) == 0)
{
    if(god[playerid] == 0)
    {
        god[playerid] = 1;
        return 1;
    }
    else
    {
        god[playerid] = 0;
        return 1;
    }
}

return 0;
}

public OnPlayerUpdate(playerid)
{
    if(god[playerid] == 1)
    {
        SetPlayerHealth(playerid,999999);
        SetPlayerArmor(playerid,999999)
    }
}
Reply
#3

Wow nice..

No seriously. What is the problem?
You just give us the code and tell us

"Whats Wrong?" Are we Magician?
NO. We're scripters.

Quote:
Originally Posted by [AK]Nazgul
Посмотреть сообщение
I'd reather just set the health and armor to 999999.
And if you want a real godemode, do this
pawn Код:
new god[MAX_PLAYERS]=0;
if(strcmp("/god",cmdtext,true) == 0)
{
    if(god[playerid] == 0)
    {
        god[playerid] = 1;
        return 1;
    }
    else
    {
        god[playerid] = 0;
        return 1;
    }
}

OnPlayerUpdate(playerid)
{
    if(god[playerid] == 1)
    {
        SetPlayerHealth(playerid,999999);
        SetPlayerArmor(playerid,999999)
    }
}
n00b. This is bad idea..
Reply
#4

Quote:
Originally Posted by Romel
Посмотреть сообщение
n00b. This is bad idea..
Why so? Tell me pl0x
Reply
#5

^^

There is a function for the god mode.
Reply
#6

Which function would that be?
Reply
#7

pawn Код:
OnPlayerUpdate(playerid)
{
    if(god[playerid] == 1)
    {
        SetPlayerHealth(playerid,999999);
        SetPlayerArmor(playerid,999999)
    }
}
why this ?
Reply
#8

Quote:
Originally Posted by DaTa[X]
Посмотреть сообщение
pawn Код:
OnPlayerUpdate(playerid)
{
    if(god[playerid] == 1)
    {
        SetPlayerHealth(playerid,999999);
        SetPlayerArmor(playerid,999999)
    }
}
why this ?
You can't die no matter what, but nvm...
Reply
#9

PHP код:
public OnPlayerCommandText (playeridcmdtext)
if(
strcmp("/god",cmdtext,true) == 0)
{
     
SetPlayerHealth(playerid99999)
     
SetPlayerArmour(playerid99999)

     return 
1;

Reply
#10

Thx guys...Sorry Romel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)