08.07.2009, 22:29
I'm trying to make a small register/login/stats-script, but I need some help.
Here's my OnPlayerCommandText:
But I get this:
And I also need some help with this:
Can anyone help me out?
Here's my OnPlayerCommandText:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/stats", true))
{
new str[128];
format(str, 128, "Kills: %d | Deaths: %d", dUserINT(PlayerName(playerid)).("kills"), dUserINT(PlayerName(playerid)).("deaths"));
SendClientMessage(playerid, 0xFF0000AA, str);
return true;
}
dcmd(register,8,cmdtext);
dcmd(login,5,cmdtext);
} <-- LINE 120
Quote:
C:\Documents and Settings\Andreas\Mine dokumenter\GTA\samp02Xserver.win32\samp02Xserver.w in32\gamemodes\test.pwn(120) : warning 209: function "OnPlayerCommandText" should return a value |
Quote:
C:\Documents and Settings\Andreas\Mine dokumenter\GTA\samp02Xserver.win32\samp02Xserver.w in32\gamemodes\test.pwn(73) : warning 202: number of arguments does not match definition |
pawn Код:
public OnPlayerDisconnect(playerid) {
if (PLAYERLIST_authed[playerid]) {
dUserSetINT(PlayerName(playerid)).("money",GetPlayerMoney(playerid));
dUserSetINT(PlayerName(playerid)).("skin",SetPlayerSkin(playerid)); <-- LINE 73
}
PLAYERLIST_authed[playerid]=false;
return false;
}