V.I.P system -
ZigGamerx - 15.10.2018
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.
Re: V.I.P system -
Dennis12 - 15.10.2018
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.
Re: V.I.P system -
ZigGamerx - 16.10.2018
Quote:
Originally Posted by Dennis12
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.
Re: V.I.P system -
UFF - 16.10.2018
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.
Re: V.I.P system -
Lokii - 16.10.2018
foreach - kar
sscanf2 - maddinat0r
Re: V.I.P system -
CoaPsyFactor - 24.10.2018
0/10
* Same as all scripts
Re: V.I.P system -
ZigGamerx - 25.10.2018
Quote:
Originally Posted by CoaPsyFactor
0/10
* Same as all scripts
|
Hello CaPsyFactor,
Its for begginers, they can learn it from this.
Re: V.I.P system -
Deadpoop - 25.10.2018
Quote:
Originally Posted by ZigGamerx
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
Re: V.I.P system -
RogueDrifter - 25.10.2018
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.