How to add god mode in Game Mode
#1

Hi,
how to add god mode in Game Mode I Add One God Mode but That One Has many Bugs
Pls Help me
Reply
#2

Quote:
Originally Posted by 4ss4ssin
Посмотреть сообщение
Hi,
how to add god mode in Game Mode I Add One God Mode but That One Has many Bugs
Pls Help me
pawn Код:
#include <zcmd>
new God[MAX_PLAYERS];
CMD:god(playerid,params[])
{
    if(God[playerid] == 0)
    {
    SetPlayerHealth(playerid, 99999);
    GameTextForPlayer(playerid,"~g~godmod ~w~on",4500,3);
    God[playerid] = 1;
    }
    else if(God[playerid] == 1)
    {
    SetPlayerHealth(playerid, 100);
    GameTextForPlayer(playerid,"~g~godmod ~w~off",4500,3);
    God[playerid] = 0;
    }
    return 1;
}
Reply
#3

it's true buy we don't Support like this
Quote:

CMD:god(playerid,params[])
{
if(God[playerid] == 0)
{
SetPlayerHealth(playerid, 99999);
GameTextForPlayer(playerid,"~g~godmod ~w~on",4500,3);
God[playerid] = 1;
}
else if(God[playerid] == 1)
{
SetPlayerHealth(playerid, 100);
GameTextForPlayer(playerid,"~g~godmod ~w~off",4500,3);
God[playerid] = 0;
}
return 1;
}

we Support Like this
Quote:

if(!strcmp(cmd, "/god", true))

can you give me like this code?
Reply
#4

Quote:
Originally Posted by 4ss4ssin
Посмотреть сообщение
it's true buy we don't Support like this

we Support Like this

can you give me like this code?
Bro, not to be a dick, but, thats basically changing the strcmp like with the CMD:god line, placing it under OnPlayerCommandText.
Reply
#5

I Don't know What Am I do Please help me like that one I have Please Please Please
Reply
#6

PHP код:
new godmode[MAX_PLAYERS]; // Add this to the top of your script under the includes.
//The god command made using OnPlayerCommandText.Just copy paste this code.
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/god"cmdtexttrue10) == 0)
    {
        if(
godmode[playerid] == 0)
        {
            
SetPlayerHealth(playerid100000);
            
GameTextForPlayer(playerid,"~w~God Mode ~g~enabled!"50006);
            
godmode[playerid] = 1;
        }
        else if(
godmode[playerid] == 1)
        {
            
SetPlayerHealth(playerid100);
            
GameTextForPlayer(playerid,"~w~God Mode ~r~disabled!"50006);
            
godmode[playerid] = 1;
        }
        return 
1;
    }
    return 
0;

Reply
#7

Plus if your gamemode has a headshot system don't forget to ignore the headshot if the player is in godmode.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)