Level System - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Level System (
/showthread.php?tid=162716)
Level System -
Garc1a - 24.07.2010
I need someone to help me with a Level System, Where they do /levels, a menu pops up saying: "Level 1, Level 2" etc and when you click on one it tells you what you get for each level.
At level 0 (what you start with) you spawn with a deagle, level 2 you spawn with a deagle and a shotgun.
And to get level 2 you have to have 50 kills.
I have no clue how to do this so I need help.
Much appreciated.
Re: Level System -
bartje01 - 24.07.2010
I'll try to help you a littlebit.
First of all.
ON top of your script:
The Level is a variable. You'll need this.
Now lets go to OnPlayerSpawn.
pawn Код:
if(Level[playerid] = 1)
{
GivePlayerWeapon(playerid,weaponmodel,ammo);
}
if(Level[playerid] = 2)
{
GivePlayerWeapon(playerid,weaponmodel,ammo);
}
etc...
This will give you the weapon on each level.
Now:
Top of script
At OnPlayerDeath
[pawn]
Kills[killerid] ++;
if(Kills[killerid] = 50)
{
Level[killerid] = 2;
}
Alright, Not tested yet.
Hope it helped.
Re: Level System -
Garc1a - 24.07.2010
Thanks for that, It looks like it'll work.
I'll test it later and make more levels and expand on it a little bit.
Thanks.
Re: Level System -
bartje01 - 24.07.2010
Np m8.If it doesn't work just post.