SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 10/01/2011, 02:36 AM   #1
CyNiC
High-roller
 
Join Date: Jan 2009
Location: Brazil
Posts: 1,420
Reputation: 203
Default Insanity Vehicles Groups

• Insanity Vehicles Groups •

- Description

It allows you to set any vehicle to any group, and each vehicle only will can
be driven by the player that's of your group(or not, configurable).

- Author

Allan Jader (CyNiC)

- Note

You can change how much you want the filterscript, leaving the credit to the
author.


Functions
pawn Code:
native AddGroupedVehicle(model, group, Float:X, Float:Y, Float:Z, Float:Rotation, color1, color2, bool: lock = false, respawn_delay = 0);
native PutVehicleInGroup(vehicleid, group, bool: lock = false);
native RemoveVehicleFromGroup(vehicleid, group);
native IsVehicleInGroup(vehicleid, group);
native PutPlayerInGroup(playerid, group, bool: unlockforplayer = true);
native RemovePlayerFromGroup(playerid, group, bool: lockforplayer = true);
native IsPlayerInGroup(playerid, group);
native VehicleGroupStateChange(playerid, newstate);
native VehicleGroupStreamIn(vehicleid, forplayerid);
native vGroup_OnGameModeInit();


Configuration

Is necessary add these 3 functions on your Gamemode/Filterscript:
pawn Code:
VehicleGroupStateChange(playerid, newstate);       //Add on init of callback OnPlayerStateChange
VehicleGroupStreamIn(vehicleid, forplayerid);      //Add on init of callback OnVehicleStreamIn
vGroup_OnGameModeInit();                           //Add on init of callback OnGameModeInit
#define MAX_GROUPS 50                              //change for your value


Download Version 1.0
http://www.4shared.com/file/8397z9yp/vgroup.html
Download Version 2.0.2
Vehicles can have more than one group, functions names changed, and small optimizations.
Some problems solved.
http://www.4shared.com/file/dffPB0L9...Groups_20.html
__________________
My scripts
Brazucas'Server

Last edited by CyNiC; 05/06/2011 at 01:08 PM.
CyNiC is offline   Reply With Quote
Old 10/01/2011, 03:42 AM   #2
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,793
Reputation: 1179
Default Re: Insanity Vehicles Groups

Looks great, nice job.
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is online now   Reply With Quote
Old 10/01/2011, 03:44 AM   #3
TheYoungCapone
Gangsta
 
TheYoungCapone's Avatar
 
Join Date: Nov 2010
Posts: 663
Reputation: 86
Default Re: Insanity Vehicles Groups

yes what ive been looking for good for my gang vehicles thanks
__________________
- Click HERE to subscribe to my youtube channel.
- Check out my clan HERE
- Need help with SetObjectMaterial? Click HERE
- Need help using Jernejl's map editor? Click HERE
for a tutorial showing the basics.
- Click HERE to see my releases.
TheYoungCapone is offline   Reply With Quote
Old 10/01/2011, 03:55 AM   #4
ғαιιοцт
High-roller
 
ғαιιοцт's Avatar
 
Join Date: Feb 2008
Posts: 1,428
Reputation: 188
Default Re: Insanity Vehicles Groups

Good Idea
It looks nice
ғαιιοцт is offline   Reply With Quote
Old 10/01/2011, 04:39 AM   #5
Mr.Stranger
Big Clucker
 
Mr.Stranger's Avatar
 
Join Date: Jan 2011
Posts: 117
Reputation: 0
Default Re: Insanity Vehicles Groups

great job buddy. I was waiting for it.
Mr.Stranger is offline   Reply With Quote
Old 10/01/2011, 02:52 PM   #6
CyNiC
High-roller
 
Join Date: Jan 2009
Location: Brazil
Posts: 1,420
Reputation: 203
Default Re: Insanity Vehicles Groups

Thanks, report any problem.
__________________
My scripts
Brazucas'Server
CyNiC is offline   Reply With Quote
Old 10/01/2011, 02:56 PM   #7
Kwarde
High-roller
 
Kwarde's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 2,711
Reputation: 1668
Default Re: Insanity Vehicles Groups

It's an cool idea, but can players from other groups enter the cars of other groups?
__________________
When the opportunity presents itself to flip-a da table, uh, you flip-a da table.

Discord: Kwarde#1966
Kwarde is offline   Reply With Quote
Old 10/01/2011, 04:04 PM   #8
CyNiC
High-roller
 
Join Date: Jan 2009
Location: Brazil
Posts: 1,420
Reputation: 203
Default Re: Insanity Vehicles Groups

Quote:
Originally Posted by Kwarde View Post
It's an cool idea, but can players from other groups enter the cars of other groups?
Yes, can be diferent if you want.

Using AddGroupedVehicle:

Standart: AddGroupedVehicle(model, group, Float:X, Float:Y, Float:Z, Float:Rotation, color1, color2, don't write nothing here respawn_delay = 0);

Locked for other groups: AddGroupedVehicle(model, group, Float:X, Float:Y, Float:Z, Float:Rotation, color1, color2, true, respawn_delay = 0);

Using SetVehicleGroup:

Standart: SetVehicleGroup(vehicleid, groupdon't write nothing here);

Locked for other groups: SetVehicleGroup(vehicleid, group, true);
__________________
My scripts
Brazucas'Server
CyNiC is offline   Reply With Quote
Old 10/01/2011, 04:05 PM   #9
Kwarde
High-roller
 
Kwarde's Avatar
 
Join Date: Nov 2009
Location: The Netherlands
Posts: 2,711
Reputation: 1668
Default Re: Insanity Vehicles Groups

Ah I thought that was just global lock. Thanks. I'll see if I'm gonna use it
But if I'm gonna use it, I'll edit, ok? (Still your credits). I have an wire for auto hacking system
__________________
When the opportunity presents itself to flip-a da table, uh, you flip-a da table.

Discord: Kwarde#1966
Kwarde is offline   Reply With Quote
Old 10/01/2011, 04:07 PM   #10
CyNiC
High-roller
 
Join Date: Jan 2009
Location: Brazil
Posts: 1,420
Reputation: 203
Default Re: Insanity Vehicles Groups

No Problems.
__________________
My scripts
Brazucas'Server
CyNiC 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
[FilterScript] Insanity Weapons Drop CyNiC Filterscripts 14 25/08/2012 07:37 PM
/groups help. The_Gangstas Help Archive 1 23/11/2010 08:31 PM
[Include] Insanity Pickups Control CyNiC Lançamentos/Releases 5 07/10/2010 12:02 PM
[Include] Insanity Pickups Control CyNiC Includes 6 07/10/2010 11:55 AM


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


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