09.01.2011, 17:54
i have some problems with my admincolor, it gets the admincolor and all ingame, but i can get killed, if i slap my self etc... and i cant figure it out why...
here is the code
here is the code
pawn Код:
dcmd_admincolor(playerid, params[])
{
if(!PLVL[playerid]) return 0;
if(PlayerInfo[playerid][pAdminLevel] >=1)
{
if(sscanf(params, "d", AdminColor)) return SendClientMessage(playerid, Yellow, "Usage: /admincolor 1/0");
if(strcmp(params, "1", true)==0)
{
SetPlayerHealth(playerid, 1000000000.0);
AdminColor1[playerid] = 1;
SetPlayerColor(playerid, AdminColor);
}
else if(strcmp(params, "0", true)==0)
{
if(PlayerInfo[playerid][pAdminLevel] >=1)
AdminColor1[playerid] = 0;
SetPlayerColor(playerid, Blue);
}
} else if(PlayerInfo[playerid][pAdminLevel] == 0) return 0;
return 1;