/godmodez dont 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)
+--- Thread: /godmodez dont work ? (
/showthread.php?tid=428535)
/godmodez dont work ? -
Giroud12 - 06.04.2013
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?
AW: /godmodez dont work ? -
[AK]Nazgul - 06.04.2013
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)
}
}
Re: /godmodez dont work ? -
JaKe Elite - 06.04.2013
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..
AW: Re: /godmodez dont work ? -
[AK]Nazgul - 06.04.2013
Quote:
Originally Posted by Romel
n00b. This is bad idea..
|
Why so? Tell me pl0x
Re: /godmodez dont work ? -
JaKe Elite - 06.04.2013
^^
There is a function for the god mode.
AW: /godmodez dont work ? -
[AK]Nazgul - 06.04.2013
Which function would that be?
Re : /godmodez dont work ? -
DaTa[X] - 06.04.2013
pawn Код:
OnPlayerUpdate(playerid)
{
if(god[playerid] == 1)
{
SetPlayerHealth(playerid,999999);
SetPlayerArmor(playerid,999999)
}
}
why this ?
AW: Re : /godmodez dont work ? -
[AK]Nazgul - 06.04.2013
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...
Re: /godmodez dont work ? -
M3mPHi$_S3 - 06.04.2013
PHP код:
public OnPlayerCommandText (playerid, cmdtext)
if(strcmp("/god",cmdtext,true) == 0)
{
SetPlayerHealth(playerid, 99999)
SetPlayerArmour(playerid, 99999)
return 1;
}
Re: /godmodez dont work ? -
Giroud12 - 07.04.2013
Thx guys...Sorry Romel