#1

i need help with this when some in killing to any player he doesnt get score who where death he get +1 score help me to fix this.....
PHP код:
    new kstring[128]; //killer message
    
GetPlayerName(playeridpnamesizeof(pname));
    
format(kstringsizeof(kstring), "~b~Haha Ya 0wned %s",pname);
    
GameTextForPlayer(killeridkstring40003);
    new 
kname[MAX_PLAYER_NAME];   //killername
    
GetPlayerName(killeridknamesizeof(kname));
    
format(pstringsizeof(pstring), "~r~:( you got 0wned by %s",kname);
    
GameTextForPlayer(playeridpstring40003);
    
    new 
kscore=GetPlayerScore(killerid);
    
SetPlayerScore(killerid,kscore++);
    
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
    
PlayerInfo[playerid][Deaths]++;
    
PlayerInfo[killerid][Kills]++; 
Reply
#2

pawn Код:
if(killerid != INVALID_PLAYER_ID)
    {
        new kstring[128], playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, sizeof(playername));
        format(kstring, sizeof(kstring), "~b~Haha Ya 0wned %s", playername);
        GameTextForPlayer(killerid, kstring, 4000, 3);
        GetPlayerName(killerid, playername, sizeof(playername));
        format(pstring, sizeof(pstring), "~r~:( you got 0wned by %s", playername);
        GameTextForPlayer(playerid, pstring, 4000, 3);
        SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
        SetPlayerScore(playerid, GetPlayerScore(playerid) + 1); //Why do you give 'playerid' 1 score?
        PlayerInfo[playerid][Deaths]++;
        PlayerInfo[killerid][Kills]++;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)