Robbing skill
#1

Is there a way to do a system that every 5 robberies the player gets +1 robbing level?
Reply
#2

Create an variable or enum which stores the robbery amount, and each time it goes to 5, 10, 15 etc.. ( I don't know of a better way D: ), give him the Robbing level/skill.

ex:
pawn Код:
//Robbery script here
/*Something*/[playerid][pRobbed]++;

if(/*Something*/[playerid][pRobbed] == 5 || /*Something*/[playerid][pRobbed] == 10 || /*Something*/[playerid][pRobbed] == 15 || /*Something*/[playerid][pRobbed] == 20 /*......*/)
{
    /*Something*/[playerid][pRobSkill]++;
    format(string, sizeof(string), "* Your Robbing Skill has increased to %i for robbing %i stores!", /*Something*/[playerid][pRobbed], /*Something*/[playerid][pRobSkill]);
    SendClientMessage(playerid, -1, string);
}
Something like that i suppose ..
Reply
#3

Quote:
Originally Posted by Kyance
Посмотреть сообщение
Create an variable or enum which stores the robbery amount, and each time it goes to 5, 10, 15 etc.. ( I don't know of a better way D: ), give him the Robbing level/skill.

ex:
pawn Код:
//Robbery script here
/*Something*/[playerid][pRobbed]++;

if(/*Something*/[playerid][pRobbed] == 5 || /*Something*/[playerid][pRobbed] == 10 || /*Something*/[playerid][pRobbed] == 15 || /*Something*/[playerid][pRobbed] == 20 /*......*/)
{
    /*Something*/[playerid][pRobSkill]++;
    format(string, sizeof(string), "* Your Robbing Skill has increased to %i for robbing %i stores!", /*Something*/[playerid][pRobbed], /*Something*/[playerid][pRobSkill]);
    SendClientMessage(playerid, -1, string);
}
Something like that i suppose ..
I got it thanks lad!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)