Problem ? /god
#1

Problem Solved.
Reply
#2

Код:
CMD:god(playerid)
{
    if(P_DATA[playerid][P_Registered] == 0) return ShowInfoTD(playerid, "~r~~h~You must be registered by using /register before using this command.");
	if(P_DATA[playerid][P_LoggedIn] == 0) return 1;
	if(P_DATA[playerid][P_God] == 0) {
		P_DATA[playerid][P_God] = 1;
		SetPlayerHealth(playerid, 9999999);
        ResetPlayerWeapons(playerid);
        ShowInfoTD(playerid,"~p~Godmode~g~ ON~p~.");
	}else if(P_DATA[playerid][P_God] == 1) {
        if(P_DATA[playerid][P_God] == 0)
        ShowInfoTD(playerid,"~p~Godmode~r~ OFF~p~.");
		SetPlayerHealth(playerid, 100);
    }
    return 1;
}
Reply
#3

There was a problem with GOD variable.

pawn Код:
CMD:god(playerid)
{
    if(P_DATA[playerid][P_God] == 0)
    {
        P_DATA[playerid][P_God] = 1;
      if(P_DATA[playerid][P_Registered] == 0)if(P_DATA[playerid][P_Registered] == 0) return ShowInfoTD(playerid, "~r~~h~You must be registered by using /register before using this command.");
      if(P_DATA[playerid][P_LoggedIn] == 0) return 1;
        SetPlayerHealth(playerid, 9999999);
        ResetPlayerWeapons(playerid);
        ShowInfoTD(playerid,"~p~Godmode~g~ ON~p~.");
    }
    else if(P_DATA[playerid][P_God] == 1)
    {
        P_DATA[playerid][P_God] = 0;
        ShowInfoTD(playerid,"~p~Godmode~r~ OFF~p~.");
        SetPlayerHealth(playerid, 100);
    }
    return 1;
}
Reply
#4

Thx guys for the helps
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)