Weapon Skills command. [REP+]
#1

Hey. I've made a weapon skills command. But when I type it nothing happens.
Here's the command:

pawn Код:
else if(strcmp(cmd, "/myskill", true) == 0)
{
    new skillstring[1000];
    new points[6];
    points[0] = 100 - PlayerInfo[playerid][pSDPistol];
    points[1] = 100 - PlayerInfo[playerid][pDesertEagle];
    points[2] = 100 - PlayerInfo[playerid][pShotGun];
    points[3] = 100 - PlayerInfo[playerid][pMP5];
    points[4] = 100 - PlayerInfo[playerid][pAK47];
    points[5] = 100 - PlayerInfo[playerid][pM4];
    format(skillstring,1000,"SDPistol:\t[%s]%d%\nDeagle:\t[%s]%d%\nShotGun:\t[%s]%d%\nMP5\t\t[%s]%d%\nAK47:\t\t[%s]%d%\nM4A1:\t\t[%s]%d%",
    ToDevelopSkills(PlayerInfo[playerid][pSDPistol],points[0]),PlayerInfo[playerid][pSDPistol],
    ToDevelopSkills(PlayerInfo[playerid][pDesertEagle],points[1]),PlayerInfo[playerid][pDesertEagle],
    ToDevelopSkills(PlayerInfo[playerid][pShotGun],points[2]),PlayerInfo[playerid][pShotGun],
    ToDevelopSkills(PlayerInfo[playerid][pMP5],points[3]),PlayerInfo[playerid][pMP5],
    ToDevelopSkills(PlayerInfo[playerid][pAK47],points[4]),PlayerInfo[playerid][pAK47],
    ToDevelopSkills(PlayerInfo[playerid][pM4],points[5]),PlayerInfo[playerid][pM4]);
    ShowPlayerDialog(playerid,435343,DIALOG_STYLE_MSGBOX,"<< Weapon Skills >>",skillstring,"Done","");
    return 1;
}
Reply
#2

Why would you do ELSE if ? You could od just if. the string might be wayyy too big. try lower down ?
Reply
#3

What size do you recommand?
Reply
#4

What about 258 ? Is it too less ? Test around. You can never do anything without testing.

You can always do a printf(yourstring) to see where the problem is.
Reply
#5

Good idea.
Reply
#6

I had just to change the dialog ID because it was too big.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)