Callback problem
#1

I have make so you fall under 50hp but nothing happends when you get under 50hp thanks in advance.

callback

pawn Код:
}

public DoDeath(playerid)
{
    new Float:phealth;
    GetPlayerHealth(playerid,phealth);
    if(phealth < 50)
    SendClientMessage(playerid, COLOR_LIGHTRED, "You were brutally wounded, you can either wait for help or accept your death (/acceptdeath)");
    Wounded[playerid] = 1;
    TogglePlayerControllable(playerid, 0);
    PlayerInfo[playerid][pDeath] = 0;
    SetPlayerPos(playerid, DeathDest[playerid][0],DeathDest[playerid][1],DeathDest[playerid][2]);
    SetPlayerVirtualWorld(playerid,DeathWorld[playerid]);
    SetPlayerHealth(playerid, 5);
    SetPlayerInterior(playerid,GetPlayerInterior(playerid));
    ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 1, 1, 1, 1, 1);
    return 1;
}
Reply
#2

So what should happen when somebody's health is under 50? I mean, you just told the script to send the player a message if his health is under 50, and now?

Also, you sure you scripted an "acceptdeath"-command?
Reply
#3

Yes i have script that, but just working when you got 0 hp

this will happend when you have under 50 hp ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 1, 1, 1, 1, 1); but not working.
Reply
#4

anyone?
Reply
#5

pawn Код:
Add this one
}

public DoDeath(playerid)
{
    new Float:phealth;
    GetPlayerHealth(playerid,50);
    if(phealth < 50)
    SendClientMessage(playerid, COLOR_LIGHTRED, "You were brutally wounded, you can either wait for help or accept your death (/acceptdeath)");
    Wounded[playerid] = 1;
    TogglePlayerControllable(playerid, 0);
    PlayerInfo[playerid][pDeath] = 0;
    SetPlayerPos(playerid, DeathDest[playerid][0],DeathDest[playerid][1],DeathDest[playerid][2]);
    SetPlayerVirtualWorld(playerid,DeathWorld[playerid]);
    SetPlayerHealth(playerid, 5);
    SetPlayerInterior(playerid,GetPlayerInterior(playerid));
    ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.0, 1, 1, 1, 1, 1);
    return 1;
}
Reply
#6

Pratar du svenska huh?
Reply
#7

English Please!?
Reply
#8

Quote:
Originally Posted by ThaFuq?Santinosback!
Посмотреть сообщение
Pratar du svenska huh?
Speak english here, send an pm if you want talk swedish.
Reply
#9

I get this now error 035: argument type mismatch (argument 2)

and the line is this GetPlayerHealth(playerid,50);
Reply
#10

Anyone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)