SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 15/10/2018, 08:15 PM   #1
ZigGamerx
Big Clucker
 
ZigGamerx's Avatar
 
Join Date: Jul 2018
Posts: 173
Reputation: 23
Default V.I.P system

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.
ZigGamerx is offline   Reply With Quote
Old 15/10/2018, 08:30 PM   #2
Dennis12
Big Clucker
 
Join Date: Sep 2017
Location: Bucuresti
Posts: 55
Reputation: 5
Default Re: V.I.P system

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.
__________________
Creatiile mele / My Creations

http://forum.sa-mp.com/showthread.php?t=644297
Dennis12 is offline   Reply With Quote
Old 16/10/2018, 06:01 AM   #3
ZigGamerx
Big Clucker
 
ZigGamerx's Avatar
 
Join Date: Jul 2018
Posts: 173
Reputation: 23
Default Re: V.I.P system

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.
ZigGamerx is offline   Reply With Quote
Old 16/10/2018, 11:36 AM   #4
UFF
Huge Clucker
 
UFF's Avatar
 
Join Date: Feb 2018
Location: Funky World
Posts: 354
Reputation: 28
Default Re: V.I.P system

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.
__________________
(¯`ˇ._.ˇUltimate Funky Freeroam._.ˇ´¯)

Server IP: Closed, We will come back soon!

Last edited by UFF; 16/10/2018 at 12:12 PM.
UFF is offline   Reply With Quote
Old 16/10/2018, 12:40 PM   #5
Lokii
Huge Clucker
 
Join Date: Sep 2017
Posts: 312
Reputation: 77
Default Re: V.I.P system

foreach - kar
sscanf2 - maddinat0r
Lokii is offline   Reply With Quote
Old 24/10/2018, 05:44 PM   #6
CoaPsyFactor
Gangsta
 
Join Date: Jul 2010
Location: Belgrade, Serbia
Posts: 905
Reputation: 52
Default Re: V.I.P system

0/10

* Same as all scripts
__________________
Quote:
Originally Posted by ThaiLuan View Post
Code:
C:\Users\Administrator\Downloads\Viet-RP\gamemodes\3mien.pwn(112016) : fatal error 101: cannot write to file: "disk full"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Help me! How to fix error
CoaPsyFactor is offline   Reply With Quote
Old 25/10/2018, 09:43 AM   #7
ZigGamerx
Big Clucker
 
ZigGamerx's Avatar
 
Join Date: Jul 2018
Posts: 173
Reputation: 23
Default Re: V.I.P system

Quote:
Originally Posted by CoaPsyFactor View Post
0/10

* Same as all scripts
Hello CaPsyFactor,

Its for begginers, they can learn it from this.
ZigGamerx is offline   Reply With Quote
Old 25/10/2018, 10:12 AM   #8
Deadpoop
Big Clucker
 
Deadpoop's Avatar
 
Join Date: Jul 2016
Posts: 132
Reputation: 5
Default Re: V.I.P system

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://forum.sa-mp.com/showthread.php?t=660077
__________________
Deadpoop is offline   Reply With Quote
Old 25/10/2018, 09:13 PM   #9
RogueDrifter
High-roller
 
RogueDrifter's Avatar
 
Join Date: Dec 2017
Location: SA-MP Drifting world.
Posts: 1,242
Reputation: 379
Default Re: V.I.P system

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.
__________________
Be creative.

[Github]:Link [Gists]:Link [Forum]:Link [Server]:Link [Discord]:Link


RogueDrifter is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Job System, House Rent System and Event System AngeloBrand98 Scripting Help 2 08/11/2016 08:34 AM
[FilterScript] NRank System V1.0 | Advanced Rank System | 5+ Commands | Dialog System [Much More] Nirzor Filterscripts 9 18/04/2014 10:49 PM
[FilterScript] Cross Admin System V1.2 [updated] + Added IRC System + Anti Cheat(sscanf, dcmd,y_ini) No.1 Admin System CROSS_Hunter Filterscripts 21 02/01/2013 07:32 PM
[FilterScript] Cross Admin System V1.1 [updated] + Added V.I.P System(sscanf, dcmd,y_ini) No.1 Admin System CROSS_Hunter Filterscripts 8 10/09/2012 12:18 PM
[HELP] Robbery system, tax system, houseing system Commander_Shaw Help Archive 3 15/09/2010 05:18 AM


All times are GMT. The time now is 12:31 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.