Does not function
#1

Hello, im making my own fitness system and 1 shot bullet but it does not do any of it.

heres the code

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
    {
        Fitness(playerid);
	}
    if(issuerid != INVALID_PLAYER_ID && weaponid == 0 && bodypart == 3)
    {
        Bullet(playerid);
	}
    return 1;
}
This should be the respond

Код:
Delay:Bullet[100, i](playerid)
{
    if(!PlayerInfo[playerid][pHitbul])
	{
	    SetPlayerHealth(playerid, 0.0);
        PlayerInfo[playerid][pBullet] -= 1;
	}
    return 1;
}

Delay:Fitness[10, i](playerid)
{
    if(PlayerInfo[playerid][pFitness] >= 1500)
	{
        new Float:HP;
		GetPlayerHealth(playerid,HP);
        SetPlayerHealth(playerid,HP-30);
	}
    if(PlayerInfo[playerid][pFitness] >= 1000)
	{
        new Float:HP;
		GetPlayerHealth(playerid,HP);
        SetPlayerHealth(playerid,HP-25);
	}
    if(PlayerInfo[playerid][pFitness] >= 700)
	{
        new Float:HP;
		GetPlayerHealth(playerid,HP);
        SetPlayerHealth(playerid,HP-20);
	}
    if(PlayerInfo[playerid][pFitness] >= 500)
	{
        new Float:HP;
		GetPlayerHealth(playerid,HP);
        SetPlayerHealth(playerid,HP-15);
	}
    if(PlayerInfo[playerid][pFitness] >= 300)
	{
        new Float:HP;
		GetPlayerHealth(playerid,HP);
        SetPlayerHealth(playerid,HP-10);
	}
    if(PlayerInfo[playerid][pFitness] >= 100)
	{
        new Float:HP;
		GetPlayerHealth(playerid,HP);
        SetPlayerHealth(playerid,HP-5);
	}
    return 1;
}
any ideas what is wrong or wrong scripting?
Reply
#2

It does like this, each fitness level is the level of -HP damage to the player id. Its like unlocking a new level to get more damage.
Reply
#3

Oh sorry i think you didn't catch that, fitness system works like this, they need to exercise and the fitness will be increase to the level that has been set, each level contain more damage. the more the fitness they get, the stronger they can kill you.
Reply
#4

um where can i edit it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)