[Include] Rit Server Includes ( rSI )
#1

rit Server Includes

RIT©


Update (7/16/2014)


Note: Some changes has been made ,regarding include names for more details, go through
the README.txt provided with the file.New functions are added too.
Functions marked with "(new)"
are new functions.

This include contains 80+ unique,useful and time saving functions.Which can be used
while scripting any kind of server.Note: Do not compare YSI and RIT both are different,though
YSI is more advanced.
Installation process is in the "README.txt".
If you have any suggestions for the next update , feel free to post it here.Though,
I will try my best to create it.Please do not worry if your suggestion will be useful , you will be automatically
added in the credits section.


rit_cord

Introduction


This include is mostly related with co-ordinates,velocity and vectors. With this
include you can easily get the player axis co-ordinates ,velocity and much more
things related to axis co-ordinates.

GetX :- Returns the value of the "X" co-ordinate of a player.
Note: Returns a Float value

GetY :- Returns the value of the "Y" co-ordinate of a player.
Note: Returns a Float value

GetZ :- Returns the value of the "Z" co-ordinate of a player.
Note: Returns a Float value

GetVelX :- Returns the velocity of player in "X" axis while moving.
Note: Returns a Float value

GetVelY :- Returns the velocity of player in "Y" axis while moving.
Note: Returns a Float value

GetVelZ :- Returns the velocity of player in "Z" axis while moving.
Note: Returns a Float value

GetPlayerSpeed :- Returns the speed of a player in KM/H. Returns integer type value.
Note: Returns '-1' If player not connected.


GetVehicleSpeed :- Returns the speed of a vehicle in KM/H. Returns integer type value.
Note: Returns '-1' If player not connected or if player is not present within a vehicle.

SkyDive :- Give player a parachute and makes player skydive.
Note: Return 0 if player not connected.

SyncPlayer :- Syncs the player if they get stuck any where within the server.
Returns 1 if the player is connected ,if not, Returns 0


--------------------------------------------------------------------------------


Syntax:-

GetX(playerid);

GetY(playerid);

GetZ(playerid);

GetVelX(playerid);

GetVelY(playerid);

GetVelZ(playerid);

GetPlayerSpeed(playerid);

GetVehicleSpeed(playerid);

SkyDive(playerid, Float:height);

SyncPlayer(playerid);









rit_health :

Introduction


This include provides you some player health related functions.Which are very
useful for roleplay servers as well as freeroam servers.


GetHealthLoss :- Returns the amount of health loss of a player.Returns Float value.

GivePlayerHealth :- Gives certain amount of health to player according to your
specification. Returns '0' if the amount of health is set
above 100.0.

EnableGod :- Gives God mode to player. Returns '0' if the player is not connected.

DisableGod :- Removes god mode from a player, as well as set player's health to
100.0. Returns '0' if the player is not connected.

TransferBlood :- This function transfers the blood from one player to another player.
Note: The player who is transferring the blood should contain blood more than
target players health loss.

playerid = The one who will give the blood.
targetid = The one who will accept the blood.
Returns -1 if both of the players are not connected.
Return 0 if playerid does not have suitable amount of blood to satisfy
the target or if loss of blood equals to '0'.

Kill :- Kills the player.





--------------------------------------------------------------------------------


Syntax:-

GetHealthLoss(playerid);

GivePlayerHealth(playerid, Float:amount);

EnableGod(playerid);

DisableGod(playerid);

TransferBlood(playerid,targetid);

Kill(playerid);









rit_misc:

Introduction


This include contains miscellaneous functions related to playe, which simplifies your
work too.

AddAllClass :- With this function you don't need write 299 lines of code, just
Just Add this function and you're done.

ClassCamSet :- With this function you simply set your camera facing angle,camera
position, and camera look at, just in online.
Instead of writing this :-

SetPlayerPos(playerid, 1479.1705,-905.9827,59.6022);
SetPlayerCameraPos(playerid, 1480.6584,-908.8497,59.6022);
SetPlayerFacingAngle(playerid,208.2598);
SetPlayerCameraLookAt(playerid, 1479.1705,-905.9827,59.6022);

You can simply add :-

ClassCamSet(playerid,1480.6584,-908.8497,59.6022,208.2598,1479.1705,-905.9827,59.6022);

"And you're done"

SnatchCashFromPlayer :- Snatches cash from the targetid and gives all his money to playerid.
i.e. who snatched it.

SetSkinForAll :- Sets skin for each and every player connected to the server.

FreezePlayer :- Freezes the targetid. Return 1 if connected ,if not Returns 0. (new)

UnFreezePlayer :- Un-freezes the targetid. Return 1 if connected ,if not Returns 0.(new)

FreezeAll :- Freezes all the players connected except the playerid who used this function.(new)

UnFreezeAll :- Un-freezes all. (new)



--------------------------------------------------------------------------------


Syntax:-

AddAllClass(Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);

ClassCamSet(playerid,Float:camx,Float:camy,Float:c amz,Float:fAngle,Float:lookx,Float:looky,Float:loo kz);

SnatchCashFromPlayer(playerid, targetid);

SetSkinForAll(skinid);

FreezePlayer(targetid);

UnFreezePlayer(targetid);

FreezeAll(playerid);

UnFreezeAll();







rit_range:

Introduction


This include contains functions related to Range, there are some very "useful" for "RolePlay"
servers. Video of SetRangeSkin -->

SendRangeMessageToPlayer :- This function sends message to a player present within
a specified range.

SendRangeMessageToAll :- This function sends message to all players present within
a specified range.

GivePlayerRangeWeapon :- Gives weapon to player present within a specified range.

RangeKill :- Kills the player present with a specified range.

RangeKick :- Kicks the player who enters a specified range.

SetRangeSkin :- Sets the skin of a who enter that range.
"Skin is settable" I have a video of it, look above.

AntiVehicleRange :- Creates an "anti-vehicle" range i.e. no one can enter that range with
a vehicle.

RangeTeleport :- Teleports all players who are present within a specified "range" from
"playerid".

AntiWeaponRange :- Creates an "anti-weapon" range i.e. if player enters that range he/she will
not be able to use weapon. (new)

TeleportationPortal :- Creates a "range portal" which is capable teleporting players from one place to another.
As soon as player step inside that specified range they get teleported to a specified position.(new)



--------------------------------------------------------------------------------


Syntax:-

SendRangeMessageToPlayer(playerid, Float:Range, Float:x, Float:y, Float:z, color, text[]);

SendRangeMessageToAll(Float:Range, Float:x, Float:y, Float:z, color, text[]);

GivePlayerRangeWeapon(playerid, weaponid,ammo, Float:Range, Float:x, Float:y, Float:z);

RangeKill(playerid, Float:Range, Float:x, Float:y, Float:z);

RangeKick(playerid, Float:Range, Float:x, Float:y, Float:z);

SetRangeSkin(playerid, skinid, Float:Range, Float:x, Float:y, Float:z);

AntiVehicleRange(playerid, Float:Range, Float:x, Float:y, Float:z);

RangeTeleport(playerid, Float:Range, Float:dx,Float:dy,Float:dz);

AntiWeaponRange(playerid, Float:Range, Float:x, Float:y, Float:z);

TeleportationPortal(playerid,Float:Range,Float:x,F loat:y,Float:z,Float:dx,Float:dy,:Float:dz,virtual ,interior);










rit_teles:

Introduction


This include contains functions related to player teleporation, which simplifies your
work in a much better way, you can easily make teleport players from one place to another.

TeleportAllForEvent :- With this function you can teleport all players to a specific position
present in your server."Special" thing about this function is you can set
"weapon allowance" with function and "Players won't get stuck with each other".
WeaponAllowance :

True: Players spawn at event with weapons.
False: Players spawn at event without weapons.

DuetTeleport :- This function teleports 2 players to a specific position.
Player itself and his "partner1".

TripletTeleport :- This function teleports 3 players to a specific position.
Player itself , his "partner1" and "partner2".

GroupTeleport :- This function teleports a "chunk" of player to a specified position
present within a range of "15.0" from the playerid.

DueDive :- Same as "DuetTeleport" just makes you skydive with your "partnet1".
"Height is settable". Automatically provides "Parachute" to players.

TripletDive :- Same as "TripletTeleport" just makes you skydive with your "partnet1" and "partner2".
"Height is settable" Automatically provides "Parachute" to players.

GroupDive :- This is one of my "favorite" functions, this function makes all the players skydive present within
a specified range. Automatically provides "Parachute" to players.
"Height is settable"
Range "is settable".

GoTo :- Teleports target to a player."Can be also used as GetHere command".


--------------------------------------------------------------------------------


Syntax:-

TeleportAllForEvent(Float:x, Float:y, Float:z, virtualworld, interior, bool:weaponallowance);

DuetTeleport(playerid, partnerid, Float:x, Float:y, Float:z, virtualworld, interior);

TripletTeleport(playerid, partnerid1, partnerid2, Float:x, Float:y, Float:z, virtualworld, interior);

GroupTeleport(playerid, Float:x, Float:y, Float:z, virtualworld, interior);

DuetDive(playerid, partnerid, Float:height);

TripletDive(playerid, partnerid1, partnerid2, Float:height);

GroupDive(playerid,Float:Range, Float:height);

GoTo(playerid,targetid);










rit_weap:

Introduction


This include contains functions related to player weapons, which simplifies your
work in a much better way.

GivePlayerWeapons :- Gives player 5 weapons "together".

SetPlayerWeapon :- Gives player a specified weapon and Removes all "other weapons" .Good for "DeathMatches".

SetPlayerWeapons :- Gives player "5"(FIVE) specified weapons and Removes all "other weapons" .Best for "DeathMatches".

SnatchWeaponFromTarget :- Snatches a weapon from a target holding a specified weapon , and gives the weapon to player who
snatched it i.e. "playerid".

SetAllSkill :- Sets all type of weapon skills to a player.


Functions You Know About :-

GiveBrassKnucle
GiveGolfClub
GiveNightStick
GiveKnife
GiveBat
GiveShovel
GivePoolCue
GiveKatana
GiveChainsaw
GiveDildo
GiveDildo2
GiveVibrator
GiveVibrator2
GiveFlower
GiveCane
GiveGrenade
GiveTearGas
GiveMolotov
GiveColt45
GiveSilenced
GiveDeagle
GiveShotgun
GiveSawn
GiveCombat
GiveUzi
GiveMP5
GiveAK47
GiveM4
GiveTec9
GiveRifle
GiveSniper
GiveRPG
GiveFlameThrower
GiveMini
GiveSprayCan
GiveFireExt
GiveCamera
GivePara






--------------------------------------------------------------------------------


Syntax:-

GivePlayerWeapons(playerid, weaponid1, ammo1,weaponid2, ammo2,weaponid3, ammo3,weaponid4, ammo4,weaponid5, ammo5)

SetPlayerWeapon(playerid,weaponid,ammo)

SetPlayerWeapons(playerid, weaponid1, ammo1,weaponid2, ammo2,weaponid3, ammo3,weaponid4, ammo4,weaponid5, ammo5)

SnatchWeaponFromTarget(playerid, targetid)

SettAllSkill(playerid ,level)

GiveBrassKnucle(playerid)
GiveGolfClub(playerid)
GiveNightStick(playerid)
GiveKnife(playerid)
GiveBat(playerid)
GiveShovel(playerid)
GivePoolCue(playerid)
GiveKatana(playerid)
GiveChainsaw(playerid)
GiveDildo(playerid)
GiveDildo2(playerid)
GiveVibrator(playerid)
GiveVibrator2(playerid)
GiveFlower(playerid)
GiveCane(playerid)
GiveGrenade(playerid, ammo)
GiveTearGas(playerid, ammo)
GiveMolotov(playerid , ammo)
GiveColt45(playerid, ammo)
GiveSilenced(playerid, ammo)
GiveDeagle(playerid, ammo)
GiveShotgun(playerid, ammo)
GiveSawn(playerid, ammo)
GiveCombat(playerid, ammo)
GiveUzi(playerid, ammo)
GiveMP5(playerid, ammo)
GiveAK47(playerid, ammo)
GiveM4(playerid, ammo)
GiveTec9(playerid, ammo)
GiveRifle(playerid, ammo)
GiveSniper(playerid, ammo)
GiveRPG(playerid, ammo)
GiveFlameThrower(playerid)
GiveMini(playerid, ammo)
GiveSprayCan(playerid)
GiveFireExt(playerid)
GiveCamera(playerid, ammo)
GivePara(playerid)




Credits:

Sa-Mp Team



GitHub:

RIT - GitHub



Download:

RIT.zip
Reply


Messages In This Thread
Rit Server Includes ( RIT ) - by Rittik - 12.07.2014, 15:27
Re: Rit Server Includes ( rSI ) - by amirab - 13.07.2014, 03:18
Re: Rit Server Includes ( rSI ) - by Pottus - 13.07.2014, 03:31
Re: Rit Server Includes ( rSI ) - by Rittik - 13.07.2014, 04:49
Re: Rit Server Includes ( rSI ) - by LivingLikeYouDo - 13.07.2014, 09:39
Re: Rit Server Includes ( rSI ) - by Pottus - 13.07.2014, 13:35
Re: Rit Server Includes ( rSI ) - by Rittik - 13.07.2014, 13:52
Respuesta: Rit Server Includes ( rSI ) - by aoEXE - 13.07.2014, 14:20
Re: Rit Server Includes ( rSI ) - by Rittik - 16.07.2014, 12:22
Re: Rit Server Includes ( rSI ) - by Rittik - 16.07.2014, 13:10
Re: Rit Server Includes ( rSI ) - by DRIFT_HUNTER - 16.07.2014, 18:34

Forum Jump:


Users browsing this thread: 1 Guest(s)