/////////////////////////////* Adding your own */////////////////////////////// /* public YOUROWNCALLBACK() //Change to a Callback of your choice { new file[128], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), "/UserAchievements/%s.ini", pname); if(dini_Int(file, "NAMEOFDATA") == 1) //Change NAMEOFDATA to a data type of your choice { //Do nothing } else if(dini_Int(file, "NAMEOFDATA") == 0) //Change NAMEOFDATA to a data type of your choice { ShowAchievement(); dini_IntSet(file, "NAMEOFDATA", 1); //Change NAMEOFDATA to a data type of your choice SendClientMessage(playerid, COLOR_GREEN, "Achievement Get! WHAT EVER YOU WANT"); } return 1; } */
/////////////////////////////* Adding your own *///////////////////////////////
/*
public YOUROWNCALLBACK() //Change to a Callback of your choice
{
new file[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "/UserAchievements/%s.ini", pname);
if(dini_Int(file, "NAMEOFDATA") == 1) //Change NAMEOFDATA to a data type of your choice
{
//Do nothing
}
else if(dini_Int(file, "NAMEOFDATA") == 0) //Change NAMEOFDATA to a data type of your choice
{
ShowAchievement();
dini_IntSet(file, "NAMEOFDATA", 1); //Change NAMEOFDATA to a data type of your choice
SendClientMessage(playerid, COLOR_GREEN, "Achievement Get! WHAT EVER YOU WANT");
SetPlayerScore(playerid, GetPlayerScore(playerid)+100);//giving 100 score..
}
return 1;
}
*/
new file[128], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), "/UserAchievements/%s.ini", pname); if(dini_Int(file, "vehicle") == 1) { return 1; } else if(dini_Int(file, "vehicle") == 0) { ShowAchievement(); dini_IntSet(file, "vehicle", 1); SendClientMessage(playerid, COLOR_GREEN, "Achievement Get! You got in a vehicle for the first time."); return 1; } |
/////////////////////////////* Adding your own */////////////////////////////// /* public YOUROWNCALLBACK() //Change to a Callback of your choice { new file[128], pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, sizeof(pname)); format(file, sizeof(file), "/UserAchievements/%s.ini", pname); if(dini_Int(file, "score") == 100) //Change NAMEOFDATA to a data type of your choice { //Do nothing } else if(dini_Int(file, "score") == 100) //Change NAMEOFDATA to a data type of your choice { ShowAchievement(); dini_IntSet(file, "score", 100); //Change NAMEOFDATA to a data type of your choice SendClientMessage(playerid, COLOR_GREEN, "Achievement Get! WHAT EVER YOU WANT"); } return 1; } */ |
new Achievement[MAX_PLAYERS];
if(GetPlayerScore(playerid) >= 100 && Achievement[playerid] !=1)
{
SetPlayerScore(playerid, GetPlayerScore(playerid) +100);
Achievement[playerid]=1;
}
Put this at the top of your script
pawn Код:
pawn Код:
|