death bug
#1

i have download fs register/login with bud include.when get killed,the wasted text no deleted.
Reply
#2

can you show us the code?
Reply
#3

what code onplayerdeath or the fs
Reply
#4

OnPlayerDeath, and OnPlayerSpawn.
Reply
#5

PHP код:
public OnPlayerDeath(PIDkilleridreason)
{
            if(
killerid != INVALID_PLAYER_ID)
            {
                
SetPlayerScore(killeridGetPlayerScore(killerid)+1);
                
GivePlayerMoney(killerid4000);
                
scm(killerid, -1"Congratulation!You have gained 4000$ and +2 score.");
                
SetPlayerScore(PIDGetPlayerScore(PID) -1);
                
GivePlayerMoney(PID, -2000);
                
scm(PID, -1"You lost 2000$ because you noob.");
            }
            if(
god_mode[PID] == 1)
            {
                        
god_mode[PID] = 0;
                        return 
1;
            }
            if(
InDM[PID] == true)
            {
              if(
anakko[PID] == 1)
              {
                    
anakko[PID] = 0;
                     if(
makko[PID] != INVALID_PLAYER_ID)
                    
TogglePlayerSpectating(PID1);
                    
PlayerSpectatePlayer(PIDkillerid);
                    
SendClientMessage(PIDWHITE"You have been killed, you are now spectating your killer.");
                    
SetTimerEx("EndDeathCam"10000false"i"playerid);
              }
              else
              {
                    
TogglePlayerSpectating(PID0);
                    
killstreak(PIDkillerid);
                    
DestroyDynamic3DTextLabel(wanted[PID]);
                    return 
1;
              }
            }
            
PlayerTextDrawHide(PID,Textdraw0);
            
PlayerTextDrawHide(PID,Textdraw1);
            
PlayerTextDrawHide(PID,Textdraw2);
            
PlayerTextDrawHide(PID,Textdraw3);
            
gPlayerHasCitySelected[PID] = 0;
            
anakko[PID] = 1;
            
GameTextForPlayer(PID,"~w~Wasted",500,2);
            
UnderWater[PID]=0;
            return 
1;

PHP код:
public OnPlayerSpawn(PID)
{
              if(
IsPlayerNPC(PID)) return 1;
              
SetPlayerSkillLevel(PID,WEAPONSKILL_PISTOL,1000);
              
SetPlayerSkillLevel(PID,WEAPONSKILL_PISTOL_SILENCED,1000);
              
SetPlayerSkillLevel(PID,WEAPONSKILL_DESERT_EAGLE,1000);
              
SetPlayerSkillLevel(PID,WEAPONSKILL_SHOTGUN,1000);
              
SetPlayerSkillLevel(PID,WEAPONSKILL_SAWNOFF_SHOTGUN,1000);
              
SetPlayerSkillLevel(PID,WEAPONSKILL_SPAS12_SHOTGUN,1000);
              
SetPlayerSkillLevel(PID,WEAPONSKILL_MICRO_UZI,1000);
              
SetPlayerSkillLevel(PID,WEAPONSKILL_MP5,1000);
              
SetPlayerSkillLevel(PID,WEAPONSKILL_AK47,1000);
              
SetPlayerSkillLevel(PID,WEAPONSKILL_M4,1000);
              
SetPlayerSkillLevel(PID,WEAPONSKILL_SNIPERRIFLE,1000);
              
PlayerTextDrawHide(PID,Textdraw0);
              
PlayerTextDrawHide(PID,Textdraw1);
              
PlayerTextDrawHide(PID,Textdraw2);
              
PlayerTextDrawHide(PID,Textdraw3);
              
SetPlayerInterior(PID,0);
              
TogglePlayerClock(PID,0);
              
GivePlayerMoney(PID350);
              
power(PID);
              
UnderWater[PID]=0;
              if(
abangmacho11  == crukk11[PID])
              {
                new 
spawn random(sizeof(gRandomSpawns_LosSantos));
                
SetPlayerPos(PIDgRandomSpawns_LosSantos[spawn][0], gRandomSpawns_LosSantos[spawn][1], gRandomSpawns_LosSantos[spawn][2]);
                
SetPlayerFacingAngle(PIDgRandomSpawns_LosSantos[spawn][3]);
              }
              if(
god_mode[PID] == 1)
              {
                 
SetPlayerHealth(PIDFloat:0x7F800000);
              }
              if(
InDM[PID] == true)
              {
                  switch (
DM[PID])
                {
                    case 
0shamal
                    
{
                            
GivePlayerWeapon(PID241000);
                            
SetPlayerHealth(PID99);
                            
SetPlayerArmour(PID99);
                            new 
spawn random(sizeof(DMZeroSpawns));
                            
SetPlayerPos(PIDDMZeroSpawns[spawn][0], DMZeroSpawns[spawn][1], DMZeroSpawns[spawn][2]);
                            
SetPlayerFacingAngle(PIDDMZeroSpawns[spawn][3]);
                            
SetPlayerInterior(PID1); //>> SetPlayerInterior
                            
SetPlayerVirtualWorld(PID1);
                            
SetPlayerHealth(PID99);
                    }
                }
              }
              if(
CITY_LOS_SANTOS == gPlayerCitySelection[PID])
              {
                         
randSpawn random(sizeof(gRandomSpawns_LosSantos));
                         
SetPlayerPos(PID,gRandomSpawns_LosSantos[randSpawn][0],gRandomSpawns_LosSantos[randSpawn][1],gRandomSpawns_LosSantos[randSpawn][2]);
                        
SetPlayerFacingAngle(PID,gRandomSpawns_LosSantos[randSpawn][3]);
              }
              else if(
CITY_SAN_FIERRO == gPlayerCitySelection[PID])
              {
                         
randSpawn random(sizeof(gRandomSpawns_SanFierro));
                         
SetPlayerPos(PID,gRandomSpawns_SanFierro[randSpawn][0],gRandomSpawns_SanFierro[randSpawn][1],gRandomSpawns_SanFierro[randSpawn][2]);
                        
SetPlayerFacingAngle(PID,gRandomSpawns_SanFierro[randSpawn][3]);
              }
              else if(
CITY_LAS_VENTURAS == gPlayerCitySelection[PID])
              {
                         
randSpawn random(sizeof(gRandomSpawns_LasVenturas));
                         
SetPlayerPos(PID,gRandomSpawns_LasVenturas[randSpawn][0],gRandomSpawns_LasVenturas[randSpawn][1],gRandomSpawns_LasVenturas[randSpawn][2]);
                        
SetPlayerFacingAngle(PID,gRandomSpawns_LasVenturas[randSpawn][3]);
              }
              return 
1;

Reply
#6

what is the textdraw new variable?
i only see GameTextForPlayer shows for 500 miliseconds
Reply
#7

not working
Reply
#8

Use style 5 https://sampwiki.blast.hk/wiki/GameTextStyle
It says it will disappear after 3 seconds which is like the time the player watch his corpse.
Reply
#9

not working.it maybe from OnPlayerDamage from weapon config.because i have animation death

PHP код:
public OnPlayerDamage(&PID, &Float:amount, &issuerid, &weapon, &bodypart)
{
        if(
god_mode[PID])
            return 
0;
        if(
issuerid != INVALID_PLAYER_ID && bodypart == && !IsPlayerAdmin(PID))// I recommend defining bodyparts.
        
{
            if(
IsPlayerConnected(issuerid))
            {
                new 
string[100], pname[24];
                
GetPlayerName(PIDheadshotsizeof(headshot));
                
GetPlayerName(issueridpnamesizeof(pname));
                
format(stringsizeof(string), "%s(%i) was shot in the head by %s(%i)"headshot,PIDpnameissuerid);
                
scms(0x800000AA,string);
                
GameTextForPlayer(issuerid,"~r~HeadShot",2000,1);
                
//PlayerPlaySound(issuerid, 17802, 0.0, 0.0, 0.0);// There is already a ding sound that you can play when someone gets shot.
                
GameTextForPlayer(PID,"~r~HeadShot",2000,1);
                
//ClearAnimations(PID);
                //ApplyAnimation(PID, "PED", "ko2", 4.1, 1, 1, 1, 1, 1, 1);// Redundant? People already play a custom animation when getting shot in the head and falling down in weapon-config.
                //PlayerPlaySound(PID, 17802, 0.0, 0.0, 0.0);// There is already a ding sound that you can play when someone gets shot.
                
GivePlayerMoney(issuerid1000);
                
GameTextForPlayer(PID,"~w~Wasted",500,2);
                
amount 0.0;// If you set the amount of damage to 0.0, it means that it kills the player. As is documented here: https://github.com/oscar-broman/samp-wea...8.92883751
                
return 1;//Returning 1 to make sure that the damage gets applied right away.
            
}
        }
        return 
1;

Reply
#10

Try to change the style of the gametext "Wasted" and the time to something a bit longer.
I don't think it does have to do with animation and those physical stuff. It is just screen text
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)