19.03.2012, 08:19
Well i tried making a stats for my server but it gives error could you make me one or fix this one ? Please
In hope of your replies !
Please don't tell to use search or give me link.
I did tried them but fail.
Please help me !
pawn Код:
stock ShowStats(playerid,targetid)
{
if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
{
if(Player[playerid][AdminLevel] >= Player[id][AdminLevel])
{
new string[128], GroupString[128], phonestring[128], JobString[128], deg1[128], deg2[128], deg3[128], deg4[128], deg5[128];
if(Player[id][PhoneN] == -1)
{
format(phonestring, sizeof(phonestring), "Phone Number: None");
}
else
{
format(phonestring, sizeof(phonestring), "Phone Number: %d", Player[id][PhoneN]);
}
if(Player[id][Job] >= 1)
{
format(JobString, sizeof(JobString), "%s", Jobs[Player[id][Job]]);
}
else
{
format(JobString, sizeof(JobString), "Unemployed");
}
if(Player[id][Group] >= 1)
{
format(GroupString, sizeof(GroupString), "%s", Groups[Player[id][Group]][GroupName]);
}
else
{
format(GroupString, sizeof(GroupString), "None");
}
if(Player[id][CollegeMedia] >= 1)
{
format(deg1, sizeof(deg1), "Qualified");
}
else
{
format(deg1, sizeof(deg1), "UnQualified");
}
if(Player[id][CollegeLaw] >= 1)
{
format(deg2, sizeof(deg2), "Qualified");
}
else
{
format(deg2, sizeof(deg2), "UnQualified");
}
if(Player[id][CollegeEng] >= 1)
{
format(deg3, sizeof(deg3), "Qualified");
}
else
{
format(deg3, sizeof(deg3), "UnQualified");
}
if(Player[id][CollegeMath] >= 1)
{
format(deg4, sizeof(deg4), "Qualified");
}
else
{
format(deg4, sizeof(deg4), "UnQualified");
}
if(Player[id][CollegeChem] >= 1)
{
format(deg5, sizeof(deg5), "Qualified");
}
else
{
format(deg5, sizeof(deg5), "UnQualified");
}
format(coordstring,sizeof(coordstring),"{33CCFF}format(string, sizeof(string), "Here are your statistics: %s [IP: %s]", RemoveUnderScore(id), IPString);
format(coordsstring, sizeof(coordsstring),"{33CCFF}[OOC info]{FFFFFF}Player name: %s\n",GetPlayerNameEx(targetid));
strcat(catstr, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "{33CCFF}[OOC info]{FFFFFF}Money: $%s | Seconds Connected: %d]\n",IntToFormattedStr(Player[id][Money]), Player[id][SecondsLoggedIn]);
strcat(catstr, coordsstring, sizeof(coordsstring));
format(coordsstring, sizeof(coordsstring), "{33CCFF}[Character]{FFFFFF} Experience points: %i | Level: %i Recorded Crimes: %d \n", Player[id][Exp], Player[id][Level], Player[id][CriminalOffences]);
strcat(catstr, coordsstring, sizeof(coordsstring));
ShowPlayerDialog(playerid, 5133, DIALOG_STYLE_MSGBOX, "{33CCFF}Red Country Stastics", catstr, "Close", "");
}
return 1;
}
Please don't tell to use search or give me link.
I did tried them but fail.
Please help me !