16.11.2012, 10:31
R.U.E (Romel's Useful Environemnt)
Make everything easy!
Make everything easy!
Last Updated: 16/11/2012
Requirements in order to understand the script
• 3% knowledge in scripting
• Have a brain with knowledge of scripting.
Introduction
I create this 3 days ago, Well i've to do many activities during my in-active day so i'm not able to release it, Now i can release it.
Reason:
I release this to make the scripting time easy, It is also in short line!!, 1 Bug has been fixed in v1.0, It was SpawnPlayer, 1 callback added which is OnPlayerSkinChangeState, and 1 new function which checks if player is in the water. This is Environment Scripting Friendly!!
Explanation
Env_Debug(enable = 1);
- Automatically the Env_Debug is on it's own, You can manually controlling the debug checking by doing Env_Debug OnGameModeInit/OnFilterScriptInit
SpawnPlayerEx(playerid);
- Spawns the playerid, This code has been repair little bit, (Still recommended fix.inc if you want to fix the SpawnPlayer problem on vehicle), It sets 3.5 mileseconds timer when the player is in vehicle, when the function called, the timer forces player to leave the vehicle, After the timer is called, He will be respawn automatically after the exit.
gVersion(playerid);
- Returns the playerid's SA-MP version, You don't need to create a string and use it on GetPlayerVersion!!
SetPlayerSkinEx(playerid, skin);
- Set's the playerid skin, This code has been modify little bit, OnPlayerSkinChangeState is called when the function is use, The callback parameters is
Код:
playerid, oldskin, newskin
GivepHealth(playerid, health);
- Add +health to the playerid's current health
TakepHealth(playerid, health);
- Decrease -health to the playerid's current health.
gName(playerid);
- Returns playerid's name, You don't need to create string and use it on GetPlayerName, Note this doesn't support the RP Name checking.
SaveFile(filename[], text[]);
- Creates new file with the name using filename[], and writes a word using text[], No need to use /r/n, It is automatically script in the include, if you don't add .txt or .ini in the filename[], The result will be
Код:
filename FORMAT: File (File is unknown format)
- Original Creator: DracoBlue
- Difference: Nothing.
Click me for more information.
Cannot explain this one, Not familar with dcmd.
gIp(playerid);
- Returns playerid's ip, No need to create new string and use it to GetPlayerIp.
IsPlayerName(playerid, const name[]);
- Use to check if player has the name, Very useful for scripters looking for this.
Usage:
Код:
if(IsPlayerName(playerid, "Jake_Hero")) { SendClientMessage(playerid, -1, "You are nub, Nah Just bitching whahahaha!"); }
♦ Notes
• You've to keep in mind that you need to wait 3.5 seconds (If you are in any vehicle), To spawn
• IsPlayerInWater is only called when player is pressing SPRINT (or playing the swim animation)
• TakepHealth (Maybe?) set's your health to 0, If this note is correct please report it.
That's all note i will leave to you when you use R.U.E
♦ Bugs
There is no current bugs (Base in my experience)
If there is any, Please post in this topic, Or PM it to me.
♦ Suggestions
We have to keep receiving suggestions in order to keep the development of R.U.E.
Please post in this topic if you have any suggestions.
Downloadlinks
Current have 2 links, Mirror is not allowed!
Pastebin (v1.0)
Solidfiles (v1.0)
Thank you for using R.U.E, Have fun!!