Help me Please!!.
#1

Hello all, I have the command /w and /God, so when they activate /God, they can not use the command /w

And get a Message like this: you can't use Weapon, please turn off the Godmode

My /god Command:

Quote:

CMD:god(playerid)
{
if(gUser[playerid][U_MODE] != MODE_FREEROAM) return GameTextForPlayer(playerid, "~r~You must be in freeroam", 5000, 3);

if(gUser[playerid][U_GOD])
{
SetPlayerHealth(playerid, 100.0);
GameTextForPlayer(playerid, "~b~~h~~h~~h~Godmode ~w~~h~OFF", 5000, 3);
ResetPlayerWeapons(playerid);
}
else
{
SetPlayerHealth(playerid, FLOAT_INFINITY);
GameTextForPlayer(playerid, "~b~~h~~h~~h~Godmode ~w~~h~ON", 5000, 3);
ResetPlayerWeapons(playerid);
}
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
gUser[playerid][U_GOD] = (! gUser[playerid][U_GOD]);
return 1;
}

My Weapon Command:

Quote:

CMD:w(playerid)
{
if(gUser[playerid][U_MODE] != MODE_FREEROAM) return GameTextForPlayer(playerid, "~g~You Are Not In Freeroam", 5000, 3);

if(! IsPlayerSpawned(playerid)) return GameTextForPlayer(playerid, "~g~You must be spawned", 5000, 3);

ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons configurations/spawner", "Weapons list\nSpawn Weapons\nTools", "Select", "Close");
return 1;
}

Thanks For Help!
Reply
#2

look in that thread where you posted the same before
Reply
#3

Quote:
Originally Posted by Sreyas
View Post
look in that thread where you posted the same before
Really?, I don't know, Sorry... but Can You Help Me?
Reply
#4

Here it is you posted it on that thread i replied :3 ah what ever im posting it again
Quote:
Originally Posted by TheseMan
View Post
Hello, can you do it in My Weapon commands?
PHP Code:
CMD:w(playerid)
{
if(
gUser[playerid][U_MODE] != MODE_FREEROAM) return GameTextForPlayer(playerid"~g~You Are Not In Freeroam"50003);
if(
gUser[playerid][U_GOD]) return GameTextForPlayer(playerid"~g~You Are In God mode"50003);
if(! 
IsPlayerSpawned(playerid)) return GameTextForPlayer(playerid"~g~You must be spawned"50003);
ShowPlayerDialog(playeridDIALOG_WEAPONSDIALOG_STYLE_LIST"Weapons configurations/spawner""Weapons list\nSpawn Weapons\nTools""Select""Close");
return 
1;

Reply
#5

Quote:
Originally Posted by Sreyas
View Post
Here it is you posted it on that thread i replied :3 ah what ever im posting it again



PHP Code:
CMD:w(playerid)
{
if(
gUser[playerid][U_MODE] != MODE_FREEROAM) return GameTextForPlayer(playerid"~g~You Are Not In Freeroam"50003);
if(
gUser[playerid][U_GOD]) return GameTextForPlayer(playerid"~g~You Are In God mode"50003);
if(! 
IsPlayerSpawned(playerid)) return GameTextForPlayer(playerid"~g~You must be spawned"50003);
ShowPlayerDialog(playeridDIALOG_WEAPONSDIALOG_STYLE_LIST"Weapons configurations/spawner""Weapons list\nSpawn Weapons\nTools""Select""Close");
return 
1;

It Does Not Work
Reply
#6

try to edit your god command may be that made it not working
PHP Code:
CMD:god(playerid)
{
if(
gUser[playerid][U_MODE] != MODE_FREEROAM) return GameTextForPlayer(playerid"~r~You must be in freeroam"50003);

if(
gUser[playerid][U_GOD])
{
SetPlayerHealth(playerid100.0);
GameTextForPlayer(playerid"~b~~h~~h~~h~Godmode ~w~~h~OFF"50003);
ResetPlayerWeapons(playerid);
PlayerPlaySound(playerid10570.00.00.0);
gUser[playerid][U_GOD] = false;
return 
1;
}
else
{
SetPlayerHealth(playeridFLOAT_INFINITY);
GameTextForPlayer(playerid"~b~~h~~h~~h~Godmode ~w~~h~ON"50003);
ResetPlayerWeapons(playerid);
PlayerPlaySound(playerid10570.00.00.0);
gUser[playerid][U_GOD] = true;
return 
1;
}

Reply
#7

Quote:
Originally Posted by Sreyas
View Post
try to edit your god command may be that made it not working
PHP Code:
CMD:god(playerid)
{
if(
gUser[playerid][U_MODE] != MODE_FREEROAM) return GameTextForPlayer(playerid"~r~You must be in freeroam"50003);
if(
gUser[playerid][U_GOD])
{
SetPlayerHealth(playerid100.0);
GameTextForPlayer(playerid"~b~~h~~h~~h~Godmode ~w~~h~OFF"50003);
ResetPlayerWeapons(playerid);
PlayerPlaySound(playerid10570.00.00.0);
gUser[playerid][U_GOD] = false;
return 
1;
}
else
{
SetPlayerHealth(playeridFLOAT_INFINITY);
GameTextForPlayer(playerid"~b~~h~~h~~h~Godmode ~w~~h~ON"50003);
ResetPlayerWeapons(playerid);
PlayerPlaySound(playerid10570.00.00.0);
gUser[playerid][U_GOD] = true;
return 
1;
}

Not Working
Reply
#8

something is fishy what is problem? is it giving any error ?
Reply
#9

Quote:
Originally Posted by Sreyas
View Post
something is fishy what is problem? is it giving any error ?
There is no error, but when I tried in the game is not working.
Reply
#10

hmm try it
PHP Code:
CMD:w(playerid

if(
gUser[playerid][U_MODE] != MODE_FREEROAM) return GameTextForPlayer(playerid"~g~You Are Not In Freeroam"50003); 
if(
gUser[playerid][U_GOD] == true) return GameTextForPlayer(playerid"~g~You Are In God mode"50003); 
if(! 
IsPlayerSpawned(playerid)) return GameTextForPlayer(playerid"~g~You must be spawned"50003); 

ShowPlayerDialog(playeridDIALOG_WEAPONSDIALOG_STYLE_LIST"Weapons configurations/spawner""Weapons list\nSpawn Weapons\nTools""Select""Close"); 
return 
1

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)