14.04.2013, 22:01
Im making a skill system and i made a /skillstats cmd, which i used this stock:
So in the cmd i used SkillStats(playerid);, but the cmd doesn't work, it doesnt show any dialog box.
pawn Код:
stock SkillStats(playerid)
{
if(pInfo[playerid][Skill] == 1)
{
//
}
if(pInfo[playerid][Skill] == 2)
{
new bo[250];
new info[250];
format(bo, sizeof bo, "Your current skill is: {F70505}%s {FFFFFF}- If you wish to change it use {F70505}/cs\n",SkillName(playerid));
strcat(info, bo);
strcat(bo,"{53C506}Your Skill Stats:\n");
strcat(info, bo);
format(bo, sizeof bo, "Bombs Left: {F70505}%d\n",pInfo[playerid][Bombs]);
strcat(info, bo);
format(bo, sizeof bo, "Bombs Planted {F70505}%d\n",pInfo[playerid][BombsPlanted]);
strcat(info, bo);
ShowPlayerDialog(playerid,DIALOG_BOMBER,DIALOG_STYLE_MSGBOX, "{FFFFFF}Skill Stats",bo,"Ok","");
}
if(pInfo[playerid][Skill] == 3)
{
new no[250];
new info[250];
format(no, sizeof no, "Your current skill is: {F70505}%s {FFFFFF}- If you wish to change it use {F70505}/cs\n",SkillName(playerid));
strcat(info, no);
strcat(no,"{53C506}Your Skill Stats:\n");
strcat(info, no);
format(no, sizeof no, "Taxes Paid: {F70505}%d\n",pInfo[playerid][Taxes]);
strcat(info, no);
ShowPlayerDialog(playerid,DIALOG_NORMALCIV,DIALOG_STYLE_MSGBOX, "{FFFFFF}Skill Stats",no,"Ok","");
}
if(pInfo[playerid][Skill] == 4)
{
//
}
if(pInfo[playerid][Skill] == 5)
{
new ro[250];
new info[250];
format(ro, sizeof ro, "Your current skill is: {F70505}%s {FFFFFF}- If you wish to change it use {F70505}/cs\n",SkillName(playerid));
strcat(info, ro);
strcat(ro,"{53C506}Your Skill Stats:\n");
strcat(info, ro);
format(ro, sizeof ro, "Players Robbed: {F70505}%d\n",pInfo[playerid][PlayersRobbed]);
strcat(info, ro);
format(ro, sizeof ro, "Total Robbed Money: {F70505}%d\n",pInfo[playerid][TotalRobbedMoney]);
strcat(info, ro);
ShowPlayerDialog(playerid,DIALOG_ROBBER,DIALOG_STYLE_MSGBOX, "{FFFFFF}Skill Stats",ro,"Ok","");
}
if(pInfo[playerid][Skill] == 6)
{
new ra[250];
new info[250];
format(ra, sizeof ra, "Your current skill is: {F70505}%s {FFFFFF}- If you wish to change it use {F70505}/cs\n",SkillName(playerid));
strcat(info, ra);
strcat(ra,"{53C506}Your Skill Stats:\n");
strcat(info, ra);
format(ra, sizeof ra, "Players Raped: {F70505}%d\n",pInfo[playerid][PlayersRaped]);
strcat(info, ra);
format(ra, sizeof ra, "Players Infected: {F70505}%d\n",pInfo[playerid][PlayersInfected]);
strcat(info, ra);
ShowPlayerDialog(playerid,DIALOG_RAPIST,DIALOG_STYLE_MSGBOX, "{FFFFFF}Skill Stats",ra,"Ok","");
}
if(pInfo[playerid][Skill] == 7)
{
new ca[250];
new info[250];
format(ca, sizeof ca, "Your current skill is: {F70505}%s {FFFFFF}- If you wish to change it use {F70505}/cs\n",SkillName(playerid));
strcat(info, ca);
strcat(ca,"{53C506}Your Skill Stats:\n");
strcat(info, ca);
format(ca, sizeof ca, "Vehicles Sold: {F70505}%d\n",pInfo[playerid][SoldVehicles]);
strcat(info, ca);
format(ca, sizeof ca, "Total Profit: {F70505}%d\n",pInfo[playerid][CarjackerProfit]);
strcat(info, ca);
ShowPlayerDialog(playerid,DIALOG_CARJACKER,DIALOG_STYLE_MSGBOX, "{FFFFFF}Skill Stats",ca,"Ok","");
}
if(pInfo[playerid][Skill] == 8)
{
//
}
return 1;
}