Jump to content

Question

Posted

Salut

asi vrea sa ma ajutati si pe mn la aceasta eroare

public OnPlayerCommandText(playerid, cmdtext[])

{

new cmd[128];//era 256

//===============================================================================================//

//---Comanda: /jetpack---//

//===============================================================================================//

if(strcmp(cmd, "/jetpack", true) == 0)

{

        if(IsPlayerConnected(playerid))

    {

if (PlayerInfo[playerid][AdminLevel] >= 1)

{

            SendClientMessage(playerid, 0xFF7F50AA, "{33FF33}You have jetpack now!");

            SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);

            return 1;

            }

            else

            {

            SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");

            return 1;

            }

        }

    }

//===============================================================================================//

//---Comanda: /restart---//

//===============================================================================================//

if(strcmp(cmd, "/restart", true) == 0)

{

if(IsPlayerConnected(playerid))

{

if (PlayerInfo[playerid][AdminLevel] >= 1337) // modifici tu cu ce grad vrei !

{

GameModeExit();

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "{09F7DF}DENITED: {ffffff}Nu ai Acces la aceasta comanda!");

}

}

return 1;

}

return 0;

}

Problema este ca se suprapun comenzile

Adic

Cand dau /jetpack imi da jetpack

si cand dau /restart imi da tot jetpack

1 answer to this question

Recommended Posts

Posted

La comanda restart sterge GameModeExit si pune SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.