god mode problem : help please.
#1

Hello guys.
I m having a problem
on player spawn
The player have weapon
But when the player perform action /god

Player still have the wepons but it should not be
Please help me.. after performing /god there should not be weapons with player and when he toogle there should be weapons. But not working

Here is the code

Www.pastebin.com/XYfv6hXM

Help.please
Reply
#2

Код:
new weapons[13][2][MAX_PLAYERS];

CMD:gmon(playerid, params[], help)
{
    SetPlayerHealth(playerid, 99999.0);
    SetPlayerArmour(playerid, 99999.0);
    SendClientMessage(playerid, -1, "* You use godmode!");
	for (new i = 0; i <= 12; i++)
	{
	    GetPlayerWeaponData(playerid, i, weapons[i][0][playerid], weapons[i][1][playerid]);
	}
	ResetPlayerWeapons(playerid);
    return 1;
}

CMD:gmoff(playerid, params[], help)
{
    SetPlayerHealth(playerid, 100.0);
    SetPlayerArmour(playerid, 0.0);
    SendClientMessage(playerid, -1, "* You don't use godmode!");
	for (new i = 0; i <= 12; i++)
	{
		GivePlayerWeapon(playerid, weapons[i][0][playerid], weapons[i][1][playerid]);
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)