server bug if a more than 15 players conect
#3

ok this's tha systm
Quote:

if((newkeys & KEY_FIRE) && (team[playerid] == 2))
{
new Float:hp, Float:a;
new target = GetClosestPlayer(playerid);
if(target == INVALID_PLAYER_ID || target == playerid) return 1;
if(team[target] == 2) return 1;
GetPlayerArmour(target,a);
target = GetClosestPlayer(playerid);
if(target == INVALID_PLAYER_ID || target == playerid) return SendClientMessage(playerid, YELLOW, "no human is near you!");
if(GetDistanceBetweenPlayers(playerid,target) <= 2)
{
if(a > 0)
{
SetPlayerArmour(target, a-3);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp+2);
GameTextForPlayer(target, "~g~armor protecting you from infection ", 2000, 6);
}
else
{
GetPlayerHealth(target,hp);
SetPlayerHealth(target, hp-4);
GetPlayerHealth(playerid,hp);
SetPlayerHealth(playerid, hp+2);
SetPVarInt(target ,"infection", 1);
GetPlayerHealth(target,hp);
}
}
else SendClientMessage(playerid, YELLOW, "Nobody is near you!");
}

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)