save amount
#3

Quote:
Originally Posted by Calisthenics
View Post
`TotalDMG` should have Float: tag
pawn Code:
PlayerInfo[playerid][TotalDMG] += amount;
// is equivalent to
PlayerInfo[playerid][TotalDMG] = PlayerInfo[playerid][TotalDMG] + amount;
Thank you very much! I also have another problem. I have a PlayerText that indicates the fps, ping and packetloss for each player. The problem is that if I connect and then someone connects, that someone doesn't show up but I do. Even if the other one is id 0 and I'm 1.

PHP Code:
new PlayerText:Textdraw0[MAX_PLAYERS]; 
stock in OnPlayerConnect:

PHP Code:
stock PlayerTextdrawing(playerid)
{
    
Textdraw0[playerid] = CreatePlayerTextDraw(playerid540.0000000.000000"FPS:000 Ping:000 PL:0.00");
    
PlayerTextDrawBackgroundColor(playeridTextdraw0[playerid], 255);
    
PlayerTextDrawFont(playeridTextdraw0[playerid], 1);
    
PlayerTextDrawLetterSize(playeridTextdraw0[playerid], 0.2199991.100000);
    
PlayerTextDrawColor(playeridTextdraw0[playerid], -1);
    
PlayerTextDrawSetOutline(playeridTextdraw0[playerid], 0);
    
PlayerTextDrawSetProportional(playeridTextdraw0[playerid], 1);
    
PlayerTextDrawSetShadow(playeridTextdraw0[playerid], 0);

And the showtextdraw in the teams:

PHP Code:
PlayerTextDrawShow(playeridTextdraw0[playerid]); 
OnPlayerUpdate:

PHP Code:
    new str[25];
    
format(strsizeof(str), "FPS:%d Ping:%d PL:%.2f"GetPlayerFPS(playerid), GetPlayerPing(playerid), NetStats_PacketLossPercent(playerid));
    
PlayerTextDrawSetString(playeridTextdraw0[playerid], str); 
Why?
Reply


Messages In This Thread
save amount - by Vy - 09.05.2020, 13:10
Re: save amount - by Calisthenics - 09.05.2020, 13:15
Re: save amount - by Vy - 09.05.2020, 13:22
Re: save amount - by Calisthenics - 09.05.2020, 13:39
Re: save amount - by Vy - 09.05.2020, 13:53
Re: save amount - by Calisthenics - 09.05.2020, 14:08
Re: save amount - by Vy - 09.05.2020, 14:22
Re: save amount - by Vy - 09.05.2020, 14:33
Re: save amount - by Calisthenics - 09.05.2020, 14:54
Re: save amount - by Vy - 09.05.2020, 18:20

Forum Jump:


Users browsing this thread: 2 Guest(s)