01.04.2010, 22:16
i have a problem..
i like that a player get health, depends which rank he is.
this won't working:
it comes a strange amount of health, and not the health what i wrote.
example, if i are rank 0 and i have the first class, i must get 60 health and 10 armour, but i comes 137 health and 10 armour lol
i like that a player get health, depends which rank he is.
this won't working:
pawn Code:
forward SpawnKillOver(playerid);
public SpawnKillOver(playerid)
{
SpawnKillProtected[playerid] = 0;
if(Rank[playerid] == 0)
{
SetPlayerHealth(playerid,50);
}
if(Rank[playerid] == 1)
{
SetPlayerHealth(playerid,52.5);
}
if(Rank[playerid] == 2)
{
SetPlayerHealth(playerid,55);
}
if(Rank[playerid] == 3)
{
SetPlayerHealth(playerid,55);
SetPlayerArmour(playerid,5);
}
if(Rank[playerid] == 4)
{
SetPlayerHealth(playerid,60);
SetPlayerArmour(playerid,5);
}
if(Rank[playerid] == 5)
{
SetPlayerHealth(playerid,65);
SetPlayerArmour(playerid,10);
}
if(Rank[playerid] == 6)
{
SetPlayerHealth(playerid,70);
SetPlayerArmour(playerid,10);
}
new Float:Health;
new Float:Armour;
if(ClassSet[playerid] == 1)
{
GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,Health + 10);
GetPlayerArmour(playerid,Armour);
SetPlayerArmour(playerid,Armour + 10);
}
SendClientMessage(playerid,_COLOR_GREEN,"You are not Spawnkill Protected anymore.");
if(ClassSet[playerid] == 2)
{
GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,Health + 20);
}
if(ClassSet[playerid] == 3)
{
GetPlayerArmour(playerid,Armour);
SetPlayerArmour(playerid,Armour + 20);
}
if(ClassSet[playerid] == 4)
{
GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,Health + 5);
GetPlayerArmour(playerid,Armour);
SetPlayerArmour(playerid,Armour + 15);
}
return 1;
}
example, if i are rank 0 and i have the first class, i must get 60 health and 10 armour, but i comes 137 health and 10 armour lol