SA-MP Forums Archive
How to script XP System and Robbery 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)
+--- Thread: How to script XP System and Robbery system? (/showthread.php?tid=579123)



How to script XP System and Robbery system? Still in need of help - MichaelJones - 24.06.2015

How to script robbery system ?


How to script XP System too?
When you rob a store you gain XP

+Reputation to whoever answer , thank you



Also how to create textdraw for the XP system?


Re : How to script XP System and Robbery system? - KillerDVX - 24.06.2015

For your XP System, i've got :

PHP код:
stock SetPlayerXp(playeridXp)
{
return 
SetPlayerScore(playeridXp);

For your Robbery system, i've got a FilterScript made by superrobot48 :

https://sampforum.blast.hk/showthread.php?tid=505857

For each robbery you add :

SetPlayerXp(playerid, Xp); (change Xp by your amount)

For exemple :

SetPlayerXp(playerid,3); (it will give 3 xp for the player)

Hope it helps.

KillerDVX,




Re: How to script XP System and Robbery system? - Inn0cent - 24.06.2015

https://sampforum.blast.hk/showthread.php?tid=505857
Look at this.

EDIT:

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
For your Robbery system, i've got a FilterScript made by superrobot48 :

https://sampforum.blast.hk/showthread.php?tid=505857

Its not a filterscript.


Re: How to script XP System and Robbery system? - MichaelJones - 24.06.2015

How to create textdraw for the XP system?

Example: Your XP: [The player's XP]


Re: How to script XP System and Robbery system? - VenomMancer - 24.06.2015

Quote:
Originally Posted by MichaelJones
Посмотреть сообщение
How to create textdraw for the XP system?

Example: Your XP: [The player's XP]
Here : https://sampforum.blast.hk/showthread.php?tid=537468


Re: Re : How to script XP System and Robbery system? - Darkwood17 - 24.06.2015

Some XP systems: This will add +1 XP to the player. In your situation add this when someone robbed successfully:
Код:
PlayerInfo[playerid][Experiencel]++;
Note: This will work only for the second XP system.



Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
For your XP System, i've got :

PHP код:
stock SetPlayerXp(playeridXp)
{
return 
SetPlayerScore(playeridXp);

You just replaced SetPlayerScore with SetPlayerXp. They will work same, so this is not a XP system.


Re : Re: How to script XP System and Robbery system? - KillerDVX - 24.06.2015

Quote:

How to create textdraw for the XP system?

Quote:
Originally Posted by VenomMancer
Посмотреть сообщение
He want to create a textdraw, why you are showing him a "Progress Bar" ?

KillerDVX,



Re : Re: Re : How to script XP System and Robbery system? - KillerDVX - 24.06.2015

Quote:

You just replaced SetPlayerScore with SetPlayerXp. They will work same, so this is not a XP system.

No it wouldn't work, it will show : Undefined symbol "SetPlayerXp".





Re: Re : How to script XP System and Robbery system? - JaydenJason - 24.06.2015

Quote:
Originally Posted by KillerDVX
Посмотреть сообщение
For your XP System, i've got :

PHP код:
stock SetPlayerXp(playeridXp)
{
return 
SetPlayerScore(playeridXp);

For your Robbery system, i've got a FilterScript made by superrobot48 :

https://sampforum.blast.hk/showthread.php?tid=505857

For each robbery you add :

SetPlayerXp(playerid, Xp); (change Xp by your amount)

For exemple :

SetPlayerXp(playerid,3); (it will give 3 xp for the player)

Hope it helps.

KillerDVX,

#define SetPlayerXP SetPlayerScore


Re : Re: Re : How to script XP System and Robbery system? - KillerDVX - 25.06.2015

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
#define SetPlayerXP SetPlayerScore
The same bro. ^^