22.01.2013, 15:15
(
Последний раз редактировалось ahmad95; 06.04.2015 в 13:23.
)
Problem Solved.
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; }
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;
}