[FilterScript] EO_VIP system
#1


EO_VIP system Version 2.0
(v2.0) Released in 3rd March 2018
(Stable version)

Greetings
Hello there everybody, here I stand before you(metaphorically) in another very great day,
Here I spent a lot of time learning how to code for SAMP servers, fixing my mistakes in code, learning new algorithms and so...
And here I am, after a sweet time learning for such great community tutors, presenting my very first filterscript,

Menu

  • Menu
  • Credits
  • Description
  • What's new
  • Update Log
  • Preview
  • The Use
  • Download
  • Credits


Credits
Credits first because they are more important!
Code:
    **a_samp			     SA_MP team
    **a_mysql			     BlueG              > https://github.com/pBlueG/SA-MP-MySQL/re...8.51300944    **streamer			     incognito          > github.com/samp-incognito/samp-streamer-plugin/releases/tag/v2.9.1
    **sscanf2			     ******             > github.com/maddinat0r/sscanf/releases/tag/v2.8.2
    **iZCMD			     Zeex / Yashas      > github.com/YashasSamaga/I-ZCMD
    **YSI\y_timers		     ******             > github.com/Misiur/YSI
    **Filterscript and Include:      Oussama
Description
This is a project started on the 1st September 2016, It's an ongoing project, which would provide new features every update, as well as a regular update schedule,
This is a VIP based system filerscript, which would focus on granting you an ideal VIP system, and the less complicated overall previous ones,

What's new
  • * Bug fixes.
  • * Code optimization.
  • * Typo fixes.
  • * Enhanced commands.
  • * Include compatibility.
Update log
Quote:
( v1.8 ) Released 13th July2017


-Script Optimisation
-Many bug fixes
-VIP Expiration is more solid now, and will automatically reset expired VIP accounts



( v1.7 ) Released 10th July2017


-Converted to MySQL
-VIP Toys readded
-Many bug fixes



( v1.6 ) Released 30th Junary 2017


-Converted to SQLite
-Added a new RCON admin command /vipcount
-Many bug fixes




( v1.4 ) Released 13th Septembre 2016


-/vipcmd is updated
-/viphelp is updated
-More colors added to texts
-Added /isvip tp check if a player is VIP or not
-Added /vipgpp - you can create any gun pack preset to be able to spawn it via /vipgp (only for level 4)
-Added /viptoys - you can attach objects to your character, (around +230 objects)
-You would see a Game text when demoted/promoted on your VIP Status
-You can check if a someone is a VIP or not with a single click on his name
-only available Weather ids would be shown

-Yet a Massive script optimization
-Strings were extended to hold more data
-Spawn in bug option displaying in /vipacc bug fixed
-few objects removed and replaced by others


( v1.0 ) Released 11th Septembre 2016


-/vipcmd is updated
-/viphelp is updated
-/vips is updated
-Added /vipbtp - allows teleporting to the VIP Lounge (for level 4 only)
-Added /vipwc - change the player's weather (each level has multiple weather Ids to choose from depending on their level)
-Added /vipt - change the player's time
-Added /vipbs - choose whether to spawn in the VIP Base or not
-Added /viptag - can be disabled now
-Added /vipgc - Give money from distance to any player (no matter your distance was between you and them)
-Added /vipskin - change your skin (only for level 3 and 4)

-VIP Level 4 armor reduced to 90%
-when using vehicle commands (/vipnos /vipfix..etc), you would hear a tuning sound if the command executed just fine
-VIPs would receive random Tips every 15mins
-Non-VIPs would receive a ClientMessage advertising on the available VIP levels to motivate them into buying a VIP Account (Timer set to 30 mins)
-level 3 have 5 options of skins to choose between, while for level 4 VIPs it's 10
-/vipcmds is now a Dialog based command (previously it was just ClientMessages)
-/vips is now a Dialog based command (previously it was just ClientMessages)

-Yet another Massive script optimization

-Text bug fixed
-Account types mix bug fixed
-Gate noise can be heard inside of the VIP Lounge bug fixed
-/vipacc account type string extended

-Map Tweaking

( v0.8 ) Released 9th Septembre 2016

-/vipcmd is updated
-Added /vipgp, loads the user with different set of guns depending on their VIP Level for (Level 2, 3 and 4 VIPs), it's also closed between a timer of 15mins, and won't function unless a whole 15mins expires from last use
-Added /viptag , sticks a 3d Text on VIPs to let them show off their Level
- Added /vipnos installs nitrous in a vehicle
-Added /vipefix fix vehicle engine (Level 2, 3 and 4)
-Added /vipbfix fix vehicle body (for level 4 only)
-Added /flip flips a vehicle

-VIP Gates are automatically closed after 6 seconds if none closed them
-Gates make some noise when opening/closing for mo realistic feel
-VIP Cars have a 3d Text labeling them(only visible when getting closer to them)
-Whenever someone enters/leaves in the VIP Lounge, only VIPs inside would get the client message informing them about their actions,
-When the VIP Vehicle gets destroyed, the 3d Text label will too, and will be spanwed with it after 5seconds
-All VIP Cars have nitrous installed

-Massive script optimization(in earlier versions amx file = 375kb// now it's 58kb)

-Bug /vipcmds fixed
-Bug VIP Gates fixed

-VIP Vehicles reduced to 37 (38 vehicles previously)
-Many map tweaking has been made

(v0.5) Released 7th Septembre 2016
-/vipcmd is updated

-VIP Cars are set to Yellow color
-Non_VIP players would be ejected from VIP cars once they try to hijack them
-VIP Base Gate added (can be opened/closed with a single "N" press)
-Whenever someone enters the VIP Lounge, all VIPs would be receiving a Client Message informing about that
-More colors Added to texts for a better appearance

-Data would be saved every time a player disconnects to recover lost data

-VIP Timer kill bug fixed

-38 Vehicles added to the VIP Base
-3D Label added to the Lounge entrance
-VIP Mansion can be accessible


(v0.3.5) Released 6th Septembre 2016
-Added /vipacc command - Displays extra info about one's VIP level (Rank, Account type, registration date, days left...)
-Added /carc command - Changed vehicle color (only for VIP level 2, 3 and 4)
-/vipcmd is updated

-added Level 3 VIP would spawn with 40% armor
-added Level 4 VIP would spawn with 100% armor
-/carc command would charge VIP levels with different costs + discounts depending you how high the level is
-Chat clear on spawn
-VIP account will expire after 30 days

-Script optimization
-The date when the VIP account was set is now saved in the VIP .in! file to provide extra information

-Console printf bug fixed

-VIP Lounge walls and a lot was specified and partly mapped(work still in process)
-3D label included


(v0.2) Released 6th Septembre 2016
-added /vips command - Displays a list of connected VIPs
-added /vipcmds command - Displays a useful collection of VIP commands
-added /viphelp command - Displays some more info related to one's VIP level

-added Level 3 VIP would spawn with 40% armor
-added Level 4 VIP would spawn with 100% armor Spawn text bug fixed

-Spawn text bug fixed


(v0.1) Released 5th Septembre 2016
- 4 different VIP levels
Quote:

Rank 1: Silver Account
Rank 2: Gold Account
Rank 3: Platinum Account
Rank 4: Diamond Account

- Data Saving system, with YSI\y_ini from ******
- /vc [message]: VIP Chat

Preview



Imagur Album: http://imgur.com/a/ciHuM

The Use
**To set someone's VIP level, you should:
1- Login as RCON Admin (/rcon login (ROCN password)
2- Use /setvip (playerid) (VIP level[1, 2, 3, 4])

**To unset someone's VIP level, you should:
1- Login as RCON Admin (/rcon login (ROCN password)
2- Use /setvip (playerid) (0)


Installation
  • 1 put EOVIP.pwn inside of your filterscripts folder.
  • 2 put eovip.inc inside of pawno/include folder.
  • 3 open the EOVIP.pwn with your text editor and compile it.
  • 4 go to your server.cfg and add; EOVIP on filterscripts line.
  • 5 open up database.sql and execute the code to create a database with the VIPs table.
Usage
There are few useful functions in eovip.inc
PHP Code:
//------------------[Player]------------------
native setVIPLevel(playeridvlevel);
native getVIPLevel(playerid);
native bool:isPlayerVIP(playerid);
native getVIPName(playerid);
native getPlayerAccID(playerid);
native bool:isPlayerVIPTagActive(playerid);
native bool:isVIPInLoungue(playerid);
native TogglePlayerVIPTag(playeridbool:param);
native SendClientMessageToVIPs(const message[], colorexception INVALID_PLAYER_IDminLvl EOVIP_VIPLEVEL_1maxLvl EOVIP_VIPLEVEL_4);
native ResetVIPData(playerid);
native SaveVIPData(playeridMySQL:handle);
//-------------------[Base]-------------------
native CreateVIPBase();
native ToggleVIPGates(bool:action);
native bool:isVIPGateOpened();
//----------------[Vehicles]------------------
native CreateVIPVehicles();
native bool:isVIPVehicle(vehicleid);
//-----------------[Other]--------------------
native PlaySoundForAll(soundidFloat:posXFloat:posYFloat:posZ);
native StopSoundForAll(); 
Adding more commands is easy,
PHP Code:
CMD:mycommand(playerid)
{
    if(
isPlayerVIP(playerid) == false) return SendClientMessage(playerid0xFF000080"[ERROR]: You are not a VIP!");
    
// Your code here

PHP Code:
CMD:anothercommand(playerid)
{
    switch(
getVIPLevel())
    {
           case 
EOVIP_VIPLEVEL_1SendClientMessage(playerid0xFF000080" You are VIP level 1!");
           case 
EOVIP_VIPLEVEL_2SendClientMessage(playerid0xFF000080" You are VIP level 2!");
           case 
EOVIP_VIPLEVEL_3SendClientMessage(playerid0xFF000080" You are VIP level 3!");
           case 
EOVIP_VIPLEVEL_4SendClientMessage(playerid0xFF000080" You are VIP level 4!");
           default: 
SendClientMessage(playerid0xFF000080" You are not a VIP!");
    }

That simple!

Download

Github
https://github.com/EOussama/EO_VIP

PastBin
Filterscript : https://pastebin.com/D4Esp91W
Include : https://pastebin.com/8YU73n6m
Database : https://pastebin.com/WcfE7ceB


NOTE: Do not sell this filterscript, such acts would not be tolerated

If you liked it, give it a +REP
Reply
#2

Quote:
Originally Posted by Eoussama
View Post
[/url]
EO_VIP system Version 0.8
Greetings
Hello there everybody, here I stand before you(metaphorically) in another very great day,
Here I spent a lot of time learning how to code for SAMP servers, fixing my mistakes in code, learning new algorithms and so..
And here I am, after a sweet time learning for such great community tutors, presenting my very first filterscript,

Description
This is a project started in the 1th September 2016, It's an ongoing project, which would provide new features every update, as well as a regular update schedule,
This is a VIP based system filerscript, which would focus on granting you an ideal VIP system, and the less complicated overall previous ones,

Features
-well, this is just the first version, so it has just the basics for the system to keep running,-
VIP Accounts
- 4 different VIP levels

**Note: Rank 0 is Normal Account(non-VIP Account)
Database
- Data Saving system, with YSI\y_ini from ******
Commands
- /vc [message]: VIP Chat

The use
to make someone a VIP, you should log in as RCON, then use /setvip (playerid) (VIP level)

Download
MediaFire
http://www.mediafire.com/file/s20rri..._O_VIP+v0.1.7z


DropBox
https://www.dropbox.com/home/FilterS..._O_VIP+v0.1.7z


More Features on Version 0.2
Thread updated
Reply
#3

Well i will test it and i will tell you my openion :c
Added Pastbin code+ some Pictures..
Reply
#4

Quote:
Originally Posted by Younes44
View Post
Well i will test it and i will tell you my openion :c
Added Pastbin code+ some Pictures..
Sure, dying to hear your feedback
Reply
#5

It's awesome... I Added a few cmds
Reply
#6

Filterscript updated,
https://sampforum.blast.hk/showthread.php?tid=618479
Reply
#7

Quote:
Originally Posted by Eoussama
View Post
Ehh ?..
why to create another thread ? just update ur thread Here..
and i'am still waiting Images/Vide ?
Reply
#8

Please, post a pastebin link.
I'll check it.
EDIT:
Use switch instead of else if like:
PHP Code:
stock ErrorMessages(playeriderrorID)
{
    if(
errorID == 1
    if(
errorID == 2)  return SendClientMessage(playerid,RED,"ERROR: Player is not connected");
    if(
errorID == 3)  
    if(
errorID == 4)  
    if(
errorID == 5
    return 
1;

to
PHP Code:
ErrorMessages(playeriderrorID)
{
    switch(
errorID)
    {
        case 
: return SendClientMessage(playerid,RED,"ERROR: You are not a VIP");
        case 
: return SendClientMessage(playerid,RED,"ERROR: Player is not connected");
        case 
: return SendClientMessage(playerid,RED,"ERROR: You need to be VIP level 2 or above to use this command");
        case 
: return SendClientMessage(playerid,RED,"ERROR: You need to be VIP level 3 or above to use this command");
        case 
: return SendClientMessage(playerid,RED,"ERROR: You need to be VIP level 4 to use this command");
    }
    return 
1;

By the way, you don't need stock as a filterscript.
There is too many useless callback called there.
Reply
#9

Sorry for the offtopic, but why is it better to use switch than else if??
Reply
#10

UPDATED To V0.3.5
NEW FEATURES
Reply
#11

Why don't you put this on GitHub?
Reply
#12

Quote:
Originally Posted by AndySedeyn
Посмотреть сообщение
Why don't you put this on GitHub?
This is ironic, but I don't know how to properly use Github atm, It would take me a while to adapt, this whole branch/master thing is just so unreachable to me,
btw did you like what is is going in to?
Reply
#13

Quote:
Originally Posted by Eoussama
Посмотреть сообщение
This is ironic, but I don't know how to properly use Github atm, It would take me a while to adapt, this whole branch/master thing is just so unreachable to me,
btw did you like what is is going in to?
I briefly looked at the code and it looked fine to me. And as for GitHub, it's worth the effort. I didn't use the branches until recently, so it's not a huge problem.
Reply
#14

Quote:

NOTE Do not upload/edit this folterscript without my permission, such acts would not be tolerated

Are you high?
It's not like so that you have a DMCA Copyright for this, you're giving out code and saying "Do not touch this code".
Reply
#15

Updated to v0.5
new features ^^
Reply
#16

UPDATED to v0.8

more commands and features
The next update would be more advanced, I'll upload it as soon as I hit 10 repetation
Reply
#17

It's not bad but there is a lot of things you could improve on.

- Remove all unused callbacks
- It should have sqlite/mysql support
- Better integration into exisiting gamemodes (make an include version)
- Continue development new features

3-Stars from me
Reply
#18

Quote:
Originally Posted by Pottus
Посмотреть сообщение
It's not bad but there is a lot of things you could improve on.

- Remove all unused callbacks
- It should have sqlite/mysql support
- Better integration into exisiting gamemodes (make an include version)
- Continue development new features

3-Stars from me
Sure, when a more stable version releases, I'll make an include that would work smoothely with this along with all other futural projects
Reply
#19

Not bad, but try adding come VIP toys (hats, glasses..etc) they can use.
+rep
Reply
#20

Nice work Man.
Keep it up !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)