08.10.2013, 23:03
pawn Code:
#define DECISION_SETTINGS_CHANGE_PASS 0
#define DECISION_SETTINGS_SHOW_DEATHS 1
#define DECISION_SETTINGS_PREF_CITY 2
#define DECISION_SETTINGS_MAX_TRIES 3
@ChangePlayerDecisions(playerid, ...); // its forward
@ChangePlayerDecisions(playerid, ...) // its public
{
//new fm[128];
new
i = 1, // 1 because we have 'playerid' as first
n = numargs()
;
while(i < n)
{
PlayerDecisions[playerid][i-1] = getarg(i);
//format(fm,sizeof(fm),"/%i: %s",i+1,decisionMessages[i]);
OnPlayerDecisionsChange(playerid,decisions);
i++;
}
return 1;
}
// Usage
@ChangePlayerDecisions(playerid,DECISION_SETTINGS_CHANGE_PASS,DECISION_SETTINGS_SHOW_DEATHS,DECISION_SETTINGS_PREF_CITY,DECISION_SETTINGS_MAX_TRIES);