1 kill = 1 score
#1

well, i put this:
onplayerdeath
Код:
		SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
but it won't to save isto score when i relog

loaduserdata
Код:
    INI_Int("Ubojstva", PlayerInfo[playerid][pKills]);
onplayerregister
Код:
    INI_WriteInt(playerFile, "Ubojstva", 0);
Код:
    PlayerInfo[playerid][pKills] = 0;
onlpayerlogout
Код:
    INI_WriteInt(playerFile, "Ubojstva", PlayerInfo[playerid][pKills]);
Reply
#2

On LoadUserData are you doing:
pawn Код:
SetPlayerScore(playerid, PlayerInfo[playerid][pKills]);
?
Reply
#3

i put this:
Код:
    INI_Int("Ubojstva", SetPlayerScore(playerid, PlayerInfo[playerid][pKills]);
Код:
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(3573) : error 017: undefined symbol "INI_Int"
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(3573) : warning 202: number of arguments does not match definition
C:\Users\toni\Desktop\Gang War Los Santos 0.3e\gamemodes\mod2.pwn(3573) : error 001: expected token: ",", but found ";"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
Reply
#4

What INI system are you using?
Link me?
Reply
#5

I using y_ini saving system...
Reply
#6

OnPlayerDeath
pawn Код:
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
PlayerInfo[killerid][pKills]=GetPlayerScore(killerid);
Reply
#7

Remove
pawn Код:
INI_Int("Ubojstva", SetPlayerScore(playerid, PlayerInfo[playerid][pKills]);
And add this
pawn Код:
INI_Int("Ubojstva", PlayerInfo[playerid][pKills]);
SetPlayerScore(playerid, PlayerInfo[playerid][pKills]);
Reply
#8

Quote:
Originally Posted by Deduction
Посмотреть сообщение
Remove
pawn Код:
INI_Int("Ubojstva", SetPlayerScore(playerid, PlayerInfo[playerid][pKills]);
And add this
pawn Код:
INI_Int("Ubojstva", PlayerInfo[playerid][pKills]);
SetPlayerScore(playerid, PlayerInfo[playerid][pKills]);
thanks very much, its working +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)