How to disable /godmode in my DM teleport? ( 1+ REP ) -
[PDS]DarioKeic - 30.07.2012
Hello,
Okay, I made a DM arena. I also have a godmode command. Players can use /godmode and enter the DM arena. How can i disable /godmode in the DM arena. Also if the player has godmode on before teleporting. How can i disable it? .
Please help me and thank you
Код:
if(strcmp(cmdtext, "/godon", true)==0 || strcmp("/god",cmdtext,true)==0)
{
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 9999999);
SendClientMessage(playerid,0xFFFFFFFF, "{FF0000}Message: {FF8000}You Enabled Godmode! Use /godoff To Disable!");
return 1;
}
Код:
if(strcmp(cmdtext, "/dmarena", true)==0 || strcmp(cmdtext, "/dm", true)==0)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 9999);
GivePlayerWeapon(playerid, 26, 9999);
GivePlayerWeapon(playerid, 31, 9999);
GivePlayerWeapon(playerid, 24, 9999);
GivePlayerWeapon(playerid, 28, 9999);
SetPlayerTime(playerid, 0,0);
SetPlayerPos(playerid, 206.7284,1865.7227,13.1406);
SetPlayerFacingAngle(playerid, 294.7677);
new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s Has Teleported To (/DMarena)", name);
SendClientMessageToAll(0xFF0000C8, string);
return 1;
}
Re: How to disable /godmode in my DM teleport? ( 1+ REP ) -
SomebodyAndMe - 30.07.2012
make an 'if' statement to check if his health is 9999999
Re: How to disable /godmode in my DM teleport? ( 1+ REP ) -
EV007 - 30.07.2012
make a variable, then on gmon check if its 1
Re: How to disable /godmode in my DM teleport? ( 1+ REP ) -
Gangs_Rocks - 30.07.2012
new gGod[MAX_PLAYERS];
// Set it to 1 when the godmode is switched on
// Set it to 0 when player enters DM
// Add :
if(gGodMode[playerid] == 0)
{
// CODE
}
else
{
gGodMode[playerid] = 0;
//// SHIT//
}
Re: How to disable /godmode in my DM teleport? ( 1+ REP ) -
ReVo_ - 30.07.2012
new inGodmode[MAX_PLAYERS];
// /god
inGodmode[playerid] = 1;
// /godoff
inGodmode[playerid] = 0;
// in /dm command
if(inGodmode[playerid]) return SendClientMessage(playerid, red, "You cannot join in DM if you are in Godmode mode! Use /godoff for disable it!");