28.08.2012, 11:05
i used this thread: how to make score, kills, deaths, skin saves
line 15085:
line 15086:
the main system is in the thread i gave above but i converted it to my saving system and had those warnings
the converted one is:
ok if you found any errors please tell cuz i need that urgently
Код:
C:\Documents and Settings\Gaber\Desktop\My Samp Server\gamemodes\SFCRRPG.pwn(15085) : warning 202: number of arguments does not match definition C:\Documents and Settings\Gaber\Desktop\My Samp Server\gamemodes\SFCRRPG.pwn(15086) : warning 202: number of arguments does not match definition
pawn Код:
Killz[playerid] =dUserSetINT(PlayerName(playerid)).("Kills");
pawn Код:
Deathz[playerid] =dUserSetINT(PlayerName(playerid)).("Deaths");
the converted one is:
pawn Код:
//at the first of the script
new Killz[MAX_PLAYERS]; // We have used this variable because to save the kills of the player
new Deathz[MAX_PLAYERS];
pawn Код:
//under onplayerdisconnect [it saves the stats]
dUserSetINT(PlayerName(playerid)).("Kills",Killz[playerid]); // Set's "Kills"
dUserSetINT(PlayerName(playerid)).("Deaths",Deathz[playerid]);
pawn Код:
//unnder onplayerdeath
Killz[killerid] ++; // The killer value will be increased
Deathz[playerid] ++; // The death value will be increased
pawn Код:
//login dialog
Killz[playerid] =dUserSetINT(PlayerName(playerid)).("Kills");
Deathz[playerid] =dUserSetINT(PlayerName(playerid)).("Deaths");
pawn Код:
//reseting the variables
Killz[playerid] =0;
Deathz[playerid] =0;
pawn Код:
//under the register dialog
dUserSetINT(PlayerName(playerid)).("Kills",0);
dUserSetINT(PlayerName(playerid)).("Deaths",0);