Mixing dcmd and cmdtext?
#5

Quote:
Originally Posted by Jefff
Код:
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);
	return 0;
}
Код:
SetPlayerSkin(playerid)
to
Код:
GetPlayerSkin(playerid)
Are you sure you want me to place that code anywhere in my /stats?
Maybe in my dcmd_login? I changed to GetPlayerSkin where I wrote LINE 224:

pawn Код:
dcmd_login(playerid,params[]) {
  if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"Already authed.");
  if (!udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"Account doesn't exist, please use '/register password'.");
  if (strlen(params)==0) return SystemMsg(playerid,"Correct usage: '/login password'");
  if (udb_CheckLogin(PlayerName(playerid),params)) {
    GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("money")-GetPlayerMoney(playerid));
    GetPlayerSkin(playerid,dUserINT(PlayerName(playerid)).("skin")); <-- LINE 224
    PLAYERLIST_authed[playerid]=true;
    return SystemMsg(playerid,"Successfully authed!");
  }
  return SystemMsg(playerid,"Login failed!");
}
Now I get
Quote:

C:\Documents and Settings\Andreas\Mine dokumenter\GTA\samp02Xserver.win32\samp02Xserver.w in32\gamemodes\test.pwn(224) : warning 202: number of arguments does not match definition

instead
Reply


Messages In This Thread
Mixing dcmd and cmdtext? - by Anarkien - 08.07.2009, 22:29
Re: Mixing dcmd and cmdtext? - by Weirdosport - 08.07.2009, 22:33
Re: Mixing dcmd and cmdtext? - by Anarkien - 08.07.2009, 22:41
Re: Mixing dcmd and cmdtext? - by Jefff - 08.07.2009, 22:53
Re: Mixing dcmd and cmdtext? - by Anarkien - 08.07.2009, 23:01
Re: Mixing dcmd and cmdtext? - by Jefff - 08.07.2009, 23:03
Re: Mixing dcmd and cmdtext? - by Anarkien - 08.07.2009, 23:06
Re: Mixing dcmd and cmdtext? - by Anarkien - 08.07.2009, 23:10

Forum Jump:


Users browsing this thread: 1 Guest(s)