Bug /stats id?
#1

Bug /stats id?

Quote:

CMD: stats(playerid, params[])
{
new string[10000];
new IP[16];
GetPlayerIp(playerid, IP, 16);
format(string, sizeof(string),"{80FF00}|=======( {FFFFFF}Player: {00FF80}%s [Id:%d]{80FF00} )========|",GetName(playerid),playerid);
/************************************************** ************************************************** *****************************/
format(string, sizeof(string),"NickName %s [Id:%d]",GetName(playerid),playerid);
format(string, sizeof(string),"Your IP [%s]",IP);
format(string, sizeof(string),"Admin [%i]",PlayerInfo[playerid][pAdmin]);
format(string, sizeof(string),"Level [%i]",PlayerInfo[playerid][pLevel]);
format(string, sizeof(string),"Vip [%i]", PlayerInfo[playerid][pVip]);
format(string, sizeof(string),"Money [$%i]",GetPlayerMoney(playerid));
format(string, sizeof(string),"Score [%i]", GetPlayerScore(playerid));
format(string, sizeof(string),"Skin [%i]", GetPlayerSkin(playerid));
format(string, sizeof(string),"Kills [%i]", PlayerInfo[playerid][pKills]);
format(string, sizeof(string),"Deaths [%i]",PlayerInfo[playerid][pDeaths]);
/************************************************** ************************************************** *****************************/
format(string, sizeof(string),"{80FF00}|=====================|");
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYL E_MSGBOX, "Stats", string, "Ok", "");
return 1;
}

Reply
#2

what is this?
show me some picture
Reply
#3

PHP код:
CMDstats(playeridparams[])
{
new 
string[10000];
new 
IP[16];
GetPlayerIp(playeridIP16);
format(stringsizeof(string),"{80FF00}|=======( {FFFFFF}Player: {00FF80}%s [Id:%d]{80FF00} )========|",GetName(playerid),playerid);
/************************************************** ************************************************** *****************************/
format(stringsizeof(string),"NickName %s [Id:%d]\n Your IP [%s]\n Admin [%i]\n Level [%i]\nVip [%i]\nMoney [$%i]\nScore [%i]\nSkin [%i]\nKills [%i]\nDeaths [%i]",GetName(playerid),,IP ,PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pVip],GetPlayerMoney(playerid)GetPlayerMoney(playerid), GetPlayerScore(playerid), GetPlayerSkin(playerid),PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],playerid);
/************************************************** ************************************************** *****************************/
format(stringsizeof(string),"{80FF00}|=====================|");
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYL E_MSGBOX"Stats"string"Ok""");
return 
1;

Reply
#4

pawn Код:
#include <sscanf2>

CMD:stats(playerid, params[])
{
    new lookupid;
    if(sscanf(params, "u", lookupid)) return SendClientMessage(playerid, -1, "Usage: /stats (id/name).");

    new string[10000], IP[16];
    GetPlayerIp(lookupid, IP, 16);

    format(string, sizeof(string),"{80FF00}|=======( {FFFFFF}Player: {00FF80}%s [Id:%d]{80FF00} )========|",GetName(lookupid),lookupid);
    /************************************************** ************************************************** *****************************/
    format(string, sizeof(string),"NickName %s [Id:%d]",GetName(lookupid),lookupid);
    format(string, sizeof(string),"Your IP [%s]",IP);
    format(string, sizeof(string),"Admin [%i]",PlayerInfo[lookupid][pAdmin]);
    format(string, sizeof(string),"Level [%i]",PlayerInfo[lookupid][pLevel]);
    format(string, sizeof(string),"Vip [%i]", PlayerInfo[lookupid][pVip]);
    format(string, sizeof(string),"Money [$%i]",GetPlayerMoney(lookupid));
    format(string, sizeof(string),"Score [%i]", GetPlayerScore(lookupid));
    format(string, sizeof(string),"Skin [%i]", GetPlayerSkin(lookupid));
    format(string, sizeof(string),"Kills [%i]", PlayerInfo[lookupid][pKills]);
    format(string, sizeof(string),"Deaths [%i]",PlayerInfo[lookupid][pDeaths]);
    /************************************************** ************************************************** *****************************/
    format(string, sizeof(string),"{80FF00}|=====================|");
    ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYL E_MSGBOX, "Stats", string, "Ok", "");
    return 1;
}
https://sampforum.blast.hk/showthread.php?tid=570927

Note: Put everything on one format, it won't work like that. But, yeah. I left that for you to do.
Reply
#5

Bug stats lol
Reply
#6

Quote:
Originally Posted by Tween73
Посмотреть сообщение
Bug stats lol
Quote:

Note: Put everything on one format, it won't work like that. But, yeah. I left that for you to do.

4char
Reply
#7

u want straight dialog right?
here lol -_-
PHP код:
CMDstats(playeridparams[])
{
new 
string[10000];
new 
IP[16];
GetPlayerIp(playeridIP16);
format(stringsizeof(string),"{80FF00}|=======( {FFFFFF}Player: {00FF80}%s [Id:%d]{80FF00} )========|",GetName(playerid),playerid);
/************************************************** ************************************************** *****************************/
format(stringsizeof(string),"NickName %s [Id:%d]\n Your IP [%s]\n Admin [%i]\n Level [%i]\nVip [%i]\nMoney [$%i]\nScore [%i]\nSkin [%i]\nKills [%i]\nDeaths [%i]",GetName(playerid),,IP ,PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pVip],GetPlayerMoney(playerid)GetPlayerMoney(playerid), GetPlayerScore(playerid), GetPlayerSkin(playerid),PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],playerid);

/************************************************** ************************************************** *****************************/
format(stringsizeof(string),"{80FF00}|=====================|");
ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYL E_MSGBOX"Stats"string"Ok""");
return 
1;

Reply
#8

replace this with ur /stats

\n for straight dialog

if i help u,rep+ me
Reply
#9

-_- -_-
Quote:

(311) : error 001: expected token: ",", but found "-identifier-"
(311) : warning 215: expression has no effect
(311) : warning 215: expression has no effect
(311) : warning 215: expression has no effect
(311) : error 001: expected token: ";", but found ")"
(311) : error 029: invalid expression, assumed zero
(311) : fatal error 107: too many error messages on one line

Quote:

format(string, sizeof(string),"NickName %s [Id:%d]\nYour IP [%s]\nAdmin [%i]\nLevel [%i]\nVip [%i]\nMoney [$%i]\nScore [%i]\nSkin [%i]\nKills [%i]\nDeaths [%i]",GetName(playerid),IP,PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pVip],GetPlayerMoney(playerid)GetPlayerMoney(playerid), GetPlayerScore(playerid), GetPlayerSkin(playerid),PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],playerid));

Reply
#10

No, no, no, NO!

You have 3 formats.

Quote:

format(string, sizeof(string),"{80FF00}|=======( {FFFFFF}Player: {00FF80}%s [Id:%d]{80FF00} )========|",GetName(playerid),playerid);
/************************************************** ************************************************** *****************************/
format(string, sizeof(string),"NickName %s [Id:%d]\n Your IP [%s]\n Admin [%i]\n Level [%i]\nVip [%i]\nMoney [$%i]\nScore [%i]\nSkin [%i]\nKills [%i]\nDeaths [%i]",GetName(playerid),,IP ,PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pVip],GetPlayerMoney(playerid)GetPlayerMoney(playerid), GetPlayerScore(playerid), GetPlayerSkin(playerid),PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths],playerid);

/************************************************** ************************************************** *****************************/
format(string, sizeof(string),"{80FF00}|=====================|");

ONE, sir.

Otherwise:
pawn Код:
#include <sscanf2>

CMD:stats(playerid, params[])
{
    new lookupid;
    if(sscanf(params, "u", lookupid)) return SendClientMessage(playerid, -1, "Usage: /stats (id/name).");

    new string[500], temp[128], IP[16];
    GetPlayerIp(lookupid, IP, 16);

    format(temp, sizeof(temp),"{80FF00}|=======( {FFFFFF}Player: {00FF80}%s [Id:%d]{80FF00} )========|\n",GetName(lookupid),lookupid);
    strcat(string, temp);
    /************************************************** ************************************************** *****************************/
    format(temp, sizeof(temp),"NickName %s [Id:%d]\n",GetName(lookupid),lookupid);
    strcat(string, temp);
    format(temp, sizeof(temp),"Your IP [%s]\n",IP);
    strcat(string, temp);
    format(temp, sizeof(temp),"Admin [%i]\n",PlayerInfo[lookupid][pAdmin]);
    strcat(string, temp);
    format(temp, sizeof(temp),"Level [%i]\n",PlayerInfo[lookupid][pLevel]);
    strcat(string, temp);
    format(temp, sizeof(temp),"Vip [%i]\n", PlayerInfo[lookupid][pVip]);
    strcat(string, temp);
    format(temp, sizeof(temp),"Money [$%i]\n",GetPlayerMoney(lookupid));
    strcat(string, temp);
    format(temp, sizeof(temp),"Score [%i]\n", GetPlayerScore(lookupid));
    strcat(string, temp);
    format(temp, sizeof(temp),"Skin [%i]\n", GetPlayerSkin(lookupid));
    strcat(string, temp);
    format(temp, sizeof(temp),"Kills [%i]\n", PlayerInfo[lookupid][pKills]);
    strcat(string, temp);
    format(temp, sizeof(temp),"Deaths [%i]\n",PlayerInfo[lookupid][pDeaths]);
    strcat(string, temp);
    /************************************************** ************************************************** *****************************/
    format(temp, sizeof(temp),"{80FF00}|=====================|");
    strcat(string, temp);
    ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYL E_MSGBOX, "Stats", string, "Ok", "");
    return 1;
}
And 10,000 cells... Oh my. Use 500 at least.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)