Robbing skill - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Robbing skill (
/showthread.php?tid=503184)
Robbing skill -
vassilis - 28.03.2014
Is there a way to do a system that every 5 robberies the player gets +1 robbing level?
Re: Robbing skill -
Kyance - 28.03.2014
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 ..
Re: Robbing skill -
vassilis - 28.03.2014
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!!