Unique ideas
#1

I'm trying to create an rp script from scratch for the first time. (others were just edits of gamemodes) I'm needing unique ideas (using Y/INI, not mysql) for my script. Below are the following implemented systems
  • Injured system (/injuries to view a list of wounds from an injured player)
  • Dynamic Faction System (Max 9 factions, rank, info, and name can be editted) 4 occupied factions, 5 vacant slots(can be editted as well easily)
  • Holster System (Weapon object created once weapon is unequipped)
  • Corpse System (Creates an actor when the player dies. Can be looted)
  • Welfare System (/signwelfare for jobless citizens. gives them a welfare bonus every paycheck, but as least as the citizens who has jobs.
  • 4 Administrator Levels (made this to avoid power-hungry moderators)
  • Unique mapping (numerous exterior and interior mapping which are made from basic scratch)
  • Celebrity System (celebrities are made by players who use /like. There are 5 levels of celebrities, each gives a bonus reward on the paycheck)
  • Graffiti System (uses a spraycan to create a graffiti in any wall. provides a more realistic economy for gang members)
  • Coin System(has two usages; normal and betting. normal uses a coin for the sake of entertainment, doesn't do much, in the other hand, betting, uses a coin to bet. if the coin is heads, the player who picked heads wins the bet)
PS: Consider this as my advanced learning system
Reply
#2

Most of this has been implemented in most servers on sa-mp
EDIT:Use MySQL instead.
Reply
#3

Quote:
Originally Posted by Dice_
Посмотреть сообщение
Most of this has been implemented in most servers on sa-mp
EDIT:Use MySQL instead.
That's what the thread is for. Anyways, I never experienced MySQL and if I ever have the plans to learn it, probably not this summer. Next summer most likely
Reply
#4

It's very hard to make "dynamic" systems with a file-based system. If you say "max 9 factions" then that is a static limit. Nothing dynamic about that. I define a dynamic system as one that can be changed on-the-fly without ever editing the script. If your factions can only have - or worse, are forced to have - 10 ranks then that is also a static limit. A truly dynamic system allows one to create any number of factions with any number of member with any number of ranks and the leader(s) is/are either appointed or, if no such player(s) exist, the player(s) with the highest rank and the earliest join date(s).

Pawn itself is very rigid in the way it works, which doesn't really help. You would need to get away from the concept of "slots" and arrays with pre-defined sizes. I've always found it quite redundant to store things in memory that are already stored in the database. I guess this is fine for stuff that is accessed very, very frequently but nowadays I usually don't bother storing stuff like houses in memory. I will usually create a dynamic pickup and set its extra_id to the houseid that's stored in the database. If a player then picks up the pickup I can query the database and get the most recent information from there.

I've said this a few times in the last few days but the INI file format was never designed to hold large chunks of data and it is terrible at storing lists of things. If you must use files, try XML. To be honest, I don't really understand why XML didn't break through as a commonly used format in SA-MP. It's way better at storing lists and it allows you to traverse a tree structure.
Reply
#5

What are the plans for money ?
Cash is bad..., it can be hacked and then jobs loose the point, well not for honest players but it makes it unfair.
Bank money is better, its in server not in client's machine.
Reply
#6

Quote:
Originally Posted by VeryTallMidget
Посмотреть сообщение
What are the plans for money ?
Cash is bad..., it can be hacked and then jobs loose the point, well not for honest players but it makes it unfair.
Bank money is better, its in server not in client's machine.
Hm? Using variables to save player's money on GivePlayerMoney function can easily prevent that hack. And then Compare getplayermoney and that variable, if the variable is smaller than getplayermoney then he's a possible money hacker.
Reply
#7

Quote:
Originally Posted by Sunehildeep
Посмотреть сообщение
Hm? Using variables to save player's money on GivePlayerMoney function can easily prevent that hack. And then Compare getplayermoney and that variable, if the variable is smaller than getplayermoney then he's a possible money hacker.
Yeah, but don't ban/kick for that, just set the cash to what it should be.
Reply
#8

Quote:
Originally Posted by Sunehildeep
Посмотреть сообщение
Hm? Using variables to save player's money on GivePlayerMoney function can easily prevent that hack. And then Compare getplayermoney and that variable, if the variable is smaller than getplayermoney then he's a possible money hacker.
Is that money controllable that is given for stunts ?
Reply
#9

Quote:
Originally Posted by VeryTallMidget
Посмотреть сообщение
Is that money controllable that is given for stunts ?
One way is to disable them or use this simple plugin https://sampforum.blast.hk/showthread.php?tid=625747
Reply
#10

Quote:
Originally Posted by Vince
Посмотреть сообщение
It's very hard to make "dynamic" systems with a file-based system.
I totally agree as I faced this problem before and I foolishly lifted the clans count limit by making the stats directly saved into the database (direct access) which led to several tens of mysql requests being ran at the same time and server failures / freezes.
The only solution is to make MAX_PLAYERS sized arrays for the clan system which will do the following:
-Let's say 100 players online that each one of has a different clan, clan data should be loaded to each player variable and then edited through the var and saved back to database.
In case 2 players from the same clan are connected, clan data should be loaded only 1 time through the first mmber who connected, all clan stats will then have to be saved through his id
I don't think there's another solution to this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)