Jump to content

[REL] Pointsystem_Classes


Paper

Recommended Posts

Hello guys,

Today i'm here for release my new script, it's pretty simple but i think it can be very useful.

When i started my scripter career i always tryed to make a fully working pointsystem for my server.

Now i want help who want do this for his own server.

For now you can store just points, but in future releases i will implement other stuffs, like cash and others.

This script have 4 simple exported functions:

  • getPlayerPoints(thePlayer)
    setPlayerPoints(thePlayer)
    takePlayerPoints(thePlayer)
    givePlayerPoints(thePlayer)

And here are the arguments for use these functions:

int getPlayerPoints(element player ) 
  
bool setPlayerPoints(element player, int amount) 
  
bool takePlayerPoints(element player, int amount) 
  
bool givePlayerPoints(element player, int amount) 

And you have 2 methods for store the datas:

  • On accounts
    On SQL database

For select the method you have to change the resource setting in the admin panel: 'accounts' or 'database'

You can download it here:

https://community.multitheftauto.com/index.php?p=resources&s=details&id=3478

Edited by Guest
Link to comment

Great, keep it up :)

getPlayerPoints(thePlayer)

setPlayerPoints(thePlayer)

takePlayerPoints(thePlayer)

givePlayerPoints(thePlayer)

Where are arguments ? ^^

  
int getPlayerPoints(element player ) 
  
bool setPlayerPoints(element player, int amount) 
  
bool takePlayerPoints(element player, int amount) 
  
bool givePlayerPoints(element player, int amount) 
  

Link to comment
And anyway nobody cares if it's OOP or not :D

Unexperienced scripters don't.

People like Orange do.

I #care. 24/7 on that channel :D

So wait, if i treat my script like OOP but it is not will cause errors whit the code? I don't think, so i don't care about the name :D

Don't be so fiscal :D

It won't cause errors, but it will make people miss the point of the name "classes" :P Check out GUI Classes by 50p and compare it with your resource. It's something totally else. But whatever, good job - lazy people will use it :D

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...