[FilterScript] V.I.P system
#1

VIP SYSTEM BY ZIGGAMERX


CHANGELOG
Complete script on 20/10/2018

Commands
Code:
/nos - adds nitros to vehicle
/vheal - heals yourslef
/vcar - spawns vip car
/vgod - turns on god mode
/vsay - announcemnets as vip
/vcc - changes car color
# for vip chat
/varmour - restores armour
/vbike - spawns V.I.P bike
/vheli - Spawns V.I.P helicopter
/vweaps- vip special weapons
/getvip - sets yourself as vip
/vips - list of online vips.
How many V.I.P Levels?
There are currently 2.

Credits

Code:
//----------------------------------------------------------------------------//
//V.I.P System by ZigGamerX.
//s_samp - Kalcor
//zcmd - Zeex
//Foreach - Thanks whoever made this.
//Sscanf2 - Thanks whoever made this.
//ZigGamerX Aka me - Script
//Jithu - Helping
//----------------------------------------------------------------------------//
Download links
https://pastebin.com/wZAgqY9U

PS:
This is my first script, sorry if i did something wrong.

Bugs
No bugs found right now.

Report if you found any.
Reply
#2

Old code ..

1. Why you loop all players?
Code:
for(new i = 0; i <MAX_PLAYERS; i++)
If you don't want to use ITERATORS ( YSI\y_iterate ) to select only from VIP LIST you can make something like this, but with iterators is much better.

Code:
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
This loop will go up to the highest ID on the server, the loop you have with MAX_PLAYERS goes through the 1000 players (define default, even if you have 100 on the server).

Why INTEGER only for 0/1 (false / true) ..? Use the boolean variable .. pGOD should be a bool.
Code:
bool: pGOD ( .. in pInfo )
At least if you used a switch and not if / else at CMD: vgod ..


EDIT: OHHH, SORRY MAN, IT'S YOUR FIRST SCRIPT ..
Take my words above as some tips, not critics, now I just saw that it is your first script, very good for a first script, you are on a good road.
Reply
#3

Quote:
Originally Posted by Dennis12
View Post
Old code ..

1. Why you loop all players?
Code:
for(new i = 0; i <MAX_PLAYERS; i++)
If you don't want to use ITERATORS ( YSI\y_iterate ) to select only from VIP LIST you can make something like this, but with iterators is much better.

Code:
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
This loop will go up to the highest ID on the server, the loop you have with MAX_PLAYERS goes through the 1000 players (define default, even if you have 100 on the server).

Why INTEGER only for 0/1 (false / true) ..? Use the boolean variable .. pGOD should be a bool.
Code:
bool: pGOD ( .. in pInfo )
At least if you used a switch and not if / else at CMD: vgod ..


EDIT: OHHH, SORRY MAN, IT'S YOUR FIRST SCRIPT ..
Take my words above as some tips, not critics, now I just saw that it is your first script, very good for a first script, you are on a good road.
Next time I'll follow your Tips.
Reply
#4

Good job with your first filterscript which will be useful for new servers but why you are using for loop instead of foreach as you included it?

I hope you will use foreach and optimize codes in next version and also remove that getvip command and make an admin command for setting vip.
Reply
#5

foreach - kar
sscanf2 - maddinat0r
Reply
#6

0/10

* Same as all scripts
Reply
#7

Quote:
Originally Posted by CoaPsyFactor
View Post
0/10

* Same as all scripts
Hello CaPsyFactor,

Its for begginers, they can learn it from this.
Reply
#8

Quote:
Originally Posted by ZigGamerx
View Post
Hello CaPsyFactor,

Its for begginers, they can learn it from this.
U didnt think like that on that fs https://sampforum.blast.hk/showthread.php?tid=660077
Reply
#9

Karma is a bitch also @Dennis the whole bool thing literally makes no difference but its good for identifying which type of a variable it is.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)