Need help about my stats please
#1

When I type /stats it comes out
COLOR_GREEN line
COLOR_GREEN line

and below of that,, it says that the cmd bla bla bla use /help

but i got cmdtats and others


this is showstats...

ShowStats(playerid,targetid)
{
if(IsPlayerConnected(targetid)) {
SendClientMessageEx(playerid, COLOR_GREEN,"_____________________________________ __________________________________________________ ____________");
new cash = GetPlayerCash(targetid);
new sext[16], std[20], employer[64], rank[64], division[64], jtext2[20], jtext[20], pnumber[20], facfam[20];
if(PlayerInfo[targetid][pPnumber] == 0) pnumber = "None"; else format(pnumber, sizeof(pnumber), "%d", PlayerInfo[targetid][pPnumber]);
if(PlayerInfo[targetid][pSex] == 1) { sext = "Male"; } else { sext = "Female"; }
SendClientMessageEx(playerid, COLOR_GREEN,"_____________________________________ __________________________________________________ ____________");





and this is the cmd thingy


CMDtats(playerid, params[]) {
if (gPlayerLogged{playerid} != 0) {
ShowStats(playerid,playerid);
}
return 1;
}



help me please
Reply
#2

pawn Код:
ShowStats(playerid,targetid)
{
if(IsPlayerConnected(targetid)) {
SendClientMessageEx(playerid, COLOR_GREEN,"_____________________________________ __________________________________________________ ____________");
new cash = GetPlayerCash(targetid);
new sext[16], std[20], employer[64], rank[64], division[64], jtext2[20], jtext[20], pnumber[20], facfam[20];
if(PlayerInfo[targetid][pPnumber] == 0) pnumber = "None"; else format(pnumber, sizeof(pnumber), "%d", PlayerInfo[targetid][pPnumber]);
SendClientMessageEx(playerid, COLOR_GREEN,pnumber);
if(PlayerInfo[targetid][pSex] == 1) { sext = "Male"; } else { sext = "Female"; }
SendClientMessageEx(playerid, COLOR_GREEN,sext);
SendClientMessageEx(playerid, COLOR_GREEN,"_____________________________________ __________________________________________________ ____________");
return 1;
}
also you have useless variables and wrong conditions, I not fixed them only I added messages
Reply
#3

my pawn stop working when I compile -.-
Reply
#4

You had much to many {'s and }'s, fixed in this code.
pawn Код:
ShowStats(playerid,targetid)
{
    if(IsPlayerConnected(targetid)) {
        SendClientMessageEx(playerid, COLOR_GREEN,"_____________________________________ __________________________________________________ ____________");
        new cash = GetPlayerCash(targetid);
        new sext[16], std[20], employer[64], rank[64], division[64], jtext2[20], jtext[20], pnumber[20], facfam[20];
        if(PlayerInfo[targetid][pPnumber] == 0) pnumber = "None"; else format(pnumber, sizeof(pnumber), "%d", PlayerInfo[targetid][pPnumber]);
        SendClientMessageEx(playerid, COLOR_GREEN,pnumber);
        if(PlayerInfo[targetid][pSex] == 1) { sext = "Male"; } else { sext = "Female"; }
        SendClientMessageEx(playerid, COLOR_GREEN,sext);
        SendClientMessageEx(playerid, COLOR_GREEN,"_____________________________________ __________________________________________________ ____________");
    }
    return 1;
}
pawn Код:
CMD:stats(playerid, params[]) {
    if (gPlayerLogged(playerid)) return ShowStats(playerid,playerid);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)