29.10.2017, 16:38
Create an array like Achievements[MAX_PLAYERS][enum_achievements], where enum_achievements have a structure like:
and then when a player does something like buying a house, he will get the sweethome achievement by setting Achievements[playerid][sweethome] to true.
To show the achievements use a function that returns UnLocked/Locked like GetAchievementState(Achievement[playerid][sweethome]), and use it to format a string, and use it as text for a MessageBox Dialog.
PS: What happened to old thread? (https://sampforum.blast.hk/showthread.php?tid=643861)
PHP код:
enum enum_achievements {
bool:thuglife,
bool:rulebreak,
bool:sweethome,
bool:BLABLABLA
}
To show the achievements use a function that returns UnLocked/Locked like GetAchievementState(Achievement[playerid][sweethome]), and use it to format a string, and use it as text for a MessageBox Dialog.
PS: What happened to old thread? (https://sampforum.blast.hk/showthread.php?tid=643861)