[SetScore] Doesn't save the score when i quit game!!!
#1

Hi guys i got score command that i was using in my [GM] but suddenly it stoop working yesterday i give some play score and he quit and come back game + his score was 0 not saved i did to my self to check it it was true the score doesn't save here is the setscore code:

Quote:

dcmd_setscore(playerid,params[]) {
if(IsPlayerAdmin(playerid)) {
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp2)) return SendClientMessage(playerid, COLOR_CHARTREUSE, "Bilgilendirme: /setscore [playerid] [skor]");
new player1 = strval(tmp), ascore = strval(tmp2), string[128];
if(PlayerInfo[player1][Level] == 10 && PlayerInfo[playerid][Level] != 10) return SendClientMessage(playerid,red,"Hatali Komut: Bu komutu adminler ьzerinde kullanamazsiniz.");
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
format(string, sizeof(string), "» sScore «: \"%s\" adli oyuncunun skorunu '%d' yaptin. ", pName(player1), ascore); SendClientMessage(playerid,COLOR_PINK,string);
if(player1 != playerid) { format(string,sizeof(string),"» sScore «: Admin \"%s\" senin skorunu(Score) '%d' yapti.", pName(playerid), ascore); SendClientMessage(player1,COLOR_PINK,string); SendClientMessage(player1,COLOR_TOMATO,"Not: Skorunun kayэtlanmasэnэ istiyorsan oyundan зэkэp tekrar girmelisin."); }
SetPlayerScore(player1, ascore); TabloGuncelle(player1);
PlayerInfo[player1][score] = GetPlayerScore(player1);
return 1;
} else return SendClientMessage(playerid,red,"Hatali Komut: Bu id'de bir oyuncu serverde bulunmamaktadir.");
} else return SendClientMessage(playerid,red,"Hatali Komut: Bu komut kaldэrэlmэюtэr.");
}

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)