10.01.2011, 02:36
(
Last edited by CyNiC; 05/06/2011 at 01:08 PM.
)
• 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:
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

