When a player gets killed nothing happens.
#1

ohaii darr,

When a player gets killed, they just stay there with around 10 HP, but to everyone else they are dead...

They must then /c(hange)t(team) before being killed.

Also,
OnPlayerDeath I have ResetPlayerWeapons(playerid); but it doesn't disarm, shall I call it under OnPlayerSpawn also?
Reply
#2

Post your OnPlayerDeath and OnPlayerSpawn here please. So then I can have a look at it to see if it's a problem.
Reply
#3

pawn Код:
public OnPlayerSpawn(playerid)
{
    ResetPlayerWeapons(playerid);
    if(IsSniper[playerid]==1)
    {
        GivePlayerWeapon(playerid,34,200);
        GivePlayerWeapon(playerid,25,200);
        GivePlayerWeapon(playerid,23,200);
        GivePlayerWeapon(playerid,44,200);
        IsClassed[playerid] = 20;
    }
    else if(IsAssault[playerid]==1)
    {
        GivePlayerWeapon(playerid,31,500);
        GivePlayerWeapon(playerid,27,200);
        GivePlayerWeapon(playerid,29,400);
        IsClassed[playerid] = 20;
    }
    else if(IsRocket[playerid]==1)
    {
        GivePlayerWeapon(playerid,36,100);
        GivePlayerWeapon(playerid,39,5);
        GivePlayerWeapon(playerid,40,1);
        GivePlayerWeapon(playerid,35,100);
        GivePlayerWeapon(playerid,29,400);
        IsClassed[playerid] = 20;
    }
    else if(IsTrooper[playerid]==1)
    {
        GivePlayerWeapon(playerid,22,200);
        GivePlayerWeapon(playerid,33,200);
        GivePlayerWeapon(playerid,29,400);
        GivePlayerWeapon(playerid,42,50);
        IsClassed[playerid] = 20;
    }
    else if(IsMedic[playerid]==1)
    {
        GivePlayerWeapon(playerid,23,200);
        GivePlayerWeapon(playerid,33,200);
        GivePlayerWeapon(playerid,4,1);
        GivePlayerWeapon(playerid,44,100);
        IsClassed[playerid] = 20;
    }
    else if(IsScout[playerid]==1)
    {
        GivePlayerWeapon(playerid,26,200);
        GivePlayerWeapon(playerid,32,200);
        GivePlayerWeapon(playerid,4,1);
        GivePlayerWeapon(playerid,18,2);
        IsClassed[playerid] = 20;
    }
    else if(IsEngineer[playerid]==1)
    {
        GivePlayerWeapon(playerid,25,200);
        GivePlayerWeapon(playerid,22,200);
        GivePlayerWeapon(playerid,35,2);
        GivePlayerWeapon(playerid,16,2);
        GivePlayerWeapon(playerid,31,200);
        IsClassed[playerid] = 20;
    }
    else if(IsClassed[playerid] == 20)
    {
        ShowPlayerDialog(playerid,699,DIALOG_STYLE_LIST,"Choose A Class:","Sniper Class\nAssualt Class\nRocket Class \nTrooper Class \nMedic Class \nScout Class\nEngineer Class","Accept","Exit");
    }
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    IsDisarmed[playerid] = 0;
   if(GetPlayerTeam(killerid) == 1)
    {
        RussiaScore++; //Sets team1score
        new newtext[41];
        format(newtext, sizeof(newtext), "Russias Score: %d", RussiaScore);
        TextDrawSetString(Text:Textdraw0, newtext);
    }
    if(GetPlayerTeam(killerid) == 2)
    {
        USAScore++; //Sets team2score
        new newtext[41];
        format(newtext, sizeof(newtext), "USA Score: %d", USAScore);
        TextDrawSetString(Text:Textdraw1, newtext);
    }
    if(RussiaScore == 50 || USAScore == 50)
    {
        SendRconCommand("changemode w1");
    }
    ShowHideTD(Text:Textdraw0);
    ShowHideTD(Text:Textdraw1);
   
    new string[18];
    format(string, sizeof(string),"Killed: %s", GetName(playerid));
    GameTextForPlayer(playerid, string, 3000, 5);
    GivePlayerMoney(killerid, 1000);
   
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
   
    new stringA[18];
    format(stringA, sizeof(stringA),"Killed by: %s", GetName(killerid));
    GameTextForPlayer(playerid, stringA, 3000, 5);
    GivePlayerMoney(playerid, -500);
   
    PlayerInfo[killerid][pKills] += 1;
    PlayerInfo[playerid][pDeaths] += 1;
   
    IsClassed[playerid] = 20;
    return 1;
}
Reply
#4

Hmm.

Have you got anything like a timer or anything? That involves health?
Reply
#5

It's fixed somehow :/
Reply
#6

That's good!

At least your problem is sorted, sorry I couldn't help.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)