20.03.2013, 07:04
well i was making my register system... and from my code i wanted it to also have /stats [playerid] but i dont know anything about sscanf which i am reasearching about
here is the cmd:
CMD
tats(playerid, params[])
{
new string[256], string2[256], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s's Statistics", PlayerName);
format(string2, sizeof(string2), "Vip Level: %d\nKills: %d\nDeaths: %d\nRatio: %0.2f\nMoney: %d", PlayerInfo[playerid][pVip], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pCash] );
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, string, string2, "Ok", "Cancel");
return 1;
}
i wish to make somethin like /stats [playerid/name] to that other players can view their friends stats
here is the cmd:
CMD

{
new string[256], string2[256], PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s's Statistics", PlayerName);
format(string2, sizeof(string2), "Vip Level: %d\nKills: %d\nDeaths: %d\nRatio: %0.2f\nMoney: %d", PlayerInfo[playerid][pVip], PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pCash] );
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, string, string2, "Ok", "Cancel");
return 1;
}
i wish to make somethin like /stats [playerid/name] to that other players can view their friends stats