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


Messages In This Thread
Does not function - by Shazwan - 12.12.2014, 08:07
Re: Does not function - by Shazwan - 12.12.2014, 10:26
Re: Does not function - by Shazwan - 12.12.2014, 10:39
Re: Does not function - by Shazwan - 12.12.2014, 11:25

Forum Jump:


Users browsing this thread: 1 Guest(s)