Help "bug"
#1

Do not save any kill anything ..
I noticed that no kill list but does not appear if you put all those with mysql ultimu kill list goes .. can you tell me from what?

PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    new 
string[256];
    
format(string256"UPDATE users SET `Kills`='%d', `Deaths`='%d', `Score`='%d' WHERE `Username`='%s'"PlayerInfoplayerid ][ pKills ], PlayerInfoplayerid ][ pDeaths ], PlayerInfoplayerid ][ pScore ], GetNameplayerid )  );
    
mysql_query(mysqlstring);
    
format(string256"UPDATE users SET `Kills`='%d', `Deaths`='%d', `Score`='%d', `Money`='%d' WHERE `Username`='%s'"PlayerInfokillerid ][ pKills ], PlayerInfokillerid ][ pDeaths ], PlayerInfokillerid ][ pScore ], PlayerInfokillerid ][ pMoney ], GetNamekillerid )  );
    
mysql_query(mysqlstring);
    
SetPlayerScorekilleridPlayerInfokillerid ][ pScore ] );
     if( 
headshotBonusplayerid ] == ) return GameTextForPlayer(killerid"~g~+300$"20001), GivePlayerMoneykillerid300 );
    
headshotBonusplayerid ] = 0;
    
playerDeathplayerid ] = 1;
     
SendDeathMessage(killeridplayeridreason);
    
PlayerInfoplayerid ][ pDeaths ] ++;
    
PlayerInfokillerid ][ pKills ] ++;
    
PlayerInfokillerid ][ pScore ] ++;
    return 
1;

// edit:

Check here .. not saved language
xampp say that we have opened the database made.
PHP код:
    if( dialogid == DIALOG_LANGUAGE ) {
        if(
response) return PlayerInfoplayerid ][ pLanguage ] = 1;
        if(!
response) return PlayerInfoplayerid ][ pLanguage ] = 2;
        
formatszQuerysizeofszQuery ), "UPDATE users SET `Language`='%s' WHERE `Username`='%s'"PlayerInfoplayerid ][ pLanguage ], GetNameplayerid ) ); mysql_querymysqlszQuery );
        
TogglePlayerSpectating(playerid1);
        
LoadTDsplayerid );
        
SetTimerEx("RespawnPlayer"2000false"i"playerid);
        return 
1; } 
Reply
#2

Hello!

You can update the things in the databank if the player disconnected.
PHP код:
public OnPlayerDeath(playeridkilleridreason)
{
    if(
headshotBonusplayerid ] == 0)return GameTextForPlayer(killerid"~g~+300$"20001), GivePlayerMoneykillerid300 );
    
headshotBonusplayerid ] = 0;
    
playerDeathplayerid ] = 1;
    
SendDeathMessage(killeridplayeridreason);
    
PlayerInfoplayerid ][ pDeaths ] ++;
    
PlayerInfokillerid ][ pKills ] ++;
    
PlayerInfokillerid ][ pScore ] ++;
    
SetPlayerScorekilleridPlayerInfokillerid ][ pScore ] );
    return 
1;

Well, write the code so.

Mencent
Reply
#3

can you explain what exactly is not saved from what? Especially if the language
Reply
#4

Because of the language, write it so:
PHP код:
if( dialogid == DIALOG_LANGUAGE ) {
        if(
response)PlayerInfoplayerid ][ pLanguage ] = 1;
        if(!
response)PlayerInfoplayerid ][ pLanguage ] = 2;
        
formatszQuerysizeofszQuery ), "UPDATE users SET `Language`='%s' WHERE `Username`='%s'"PlayerInfoplayerid ][ pLanguage ], GetNameplayerid ) ), mysql_querymysqlszQuery );
        
TogglePlayerSpectating(playerid1);
        
LoadTDsplayerid );
        
SetTimerEx("RespawnPlayer"2000false"i"playerid);
        return 
1; } 
Because the kills and deaths. They won't updat because they are the same how in the databank.
After the mysql query you are putting kills only one higher.

Mencent
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)