Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- MasterJoker's Useful Function Include
- Supportable SAMP version: 0.3c - Present
- Version 1.1
- Version v1.1 Current Function: Available useful Function
- Release Date: January 26, 2012
- Brought you by Mr.SmileWinky!
- */
- #if defined _MJUF_included
- #endinput
- #endif
- #define _MJUF_included
- #if defined MJUF
- #error MJUF are already defined.
- #endif
- #include <a_samp>
- forward Trap(playerid);
- #define white "{FFFFFF}"
- #define COLOR_RED 0xFF0000FF
- /* publics */
- public Trap(playerid)
- {
- SendClientMessage(playerid, COLOR_RED, "Hidden Trap activated!, you have been killed!");
- SetPlayerHealth(playerid, 0);
- TogglePlayerControllable(playerid, 0);
- printf("MasterJoker's Useful Function Hidden Trap activated!");
- return 1;
- }
- /* stock function */
- stock CreateTeleportPosition(playerid, Float:x, Float:y, Float:z, Float:ang)
- {
- SetPlayerPos(playerid, Float:x, Float:y, Float:z);
- SetPlayerFacingAngle(playerid, Float:ang);
- return 1;
- }
- stock CreateBotChatter(COLOR, const Botname[], const text[])
- {
- new string[321];
- format(string,sizeof(string), "[MJUFINC][BOT] %s: "white"%s", Botname, text);
- SendClientMessageToAll(COLOR, string);
- print(string);
- return 1;
- }
- stock KickAll()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (i != i))
- {
- Kick(i);
- }
- }
- printf("MasterJoker's Useful Function Include Kick has been used");
- return 1;
- }
- stock BanAll(const reason[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && (i != i))
- {
- BanEx(i, reason);
- }
- }
- printf("MasterJoker's Useful Function Include Ban has been used");
- return 1;
- }
- stock IncreaseHealth(playerid, Float:health)
- {
- new Float:mycurrenthp;
- GetPlayerHealth(playerid, mycurrenthp);
- SetPlayerHealth(playerid, mycurrenthp + health);
- printf("MasterJoker's Useful Function Increase Health Generator has been used");
- return 1;
- }
- stock DecreaseHealth(playerid, Float:health)
- {
- new Float:mycurrenthp2;
- GetPlayerHealth(playerid, mycurrenthp2);
- SetPlayerHealth(playerid, mycurrenthp2 - health);
- printf("MasterJoker's Useful Function Decrease Health Generator has been used");
- return 1;
- }
- stock IncreaseArmour(playerid, Float:armour)
- {
- new Float:mycurrentarmour;
- GetPlayerHealth(playerid, mycurrentarmour);
- SetPlayerHealth(playerid, mycurrentarmour + armour);
- printf("MasterJoker's Useful Function Increase Armour Generator has been used");
- return 1;
- }
- stock DecreaseArmour(playerid, Float:armour)
- {
- new Float:mycurrentarmour2;
- GetPlayerHealth(playerid, mycurrentarmour2);
- SetPlayerHealth(playerid, mycurrentarmour2 - armour);
- printf("MasterJoker's Useful Function Decrease Armour Generator has been used");
- return 1;
- }
- stock IncreaseScore(playerid, score)
- {
- new mycurrentscore = GetPlayerScore(playerid);
- if(score > -1000000 || score < 1000000) return printf("MJUF Include Error: You cannot set IncreaseScore with Invalid Value");
- SetPlayerScore(playerid, mycurrentscore + score);
- printf("MasterJoker's Useful Function Increase Score Generator has been used");
- return 1;
- }
- stock DecreaseScore(playerid, score)
- {
- new mycurrentscore2 = GetPlayerScore(playerid);
- if(score > 0 || score < 1000000) return printf("MJUF Include Error: You cannot set DecreaseScore with Invalid Value");
- SetPlayerScore(playerid, mycurrentscore2 - score);
- printf("MasterJoker's Useful Function Decrease Score Generator has been used");
- return 1;
- }
- stock MJUFCredits(playerid, COLOR)
- {
- SendClientMessage(playerid, COLOR, "------------------------");
- SendClientMessage(playerid, COLOR, "MasterJoker's Useful Function Include v1.1");
- SendClientMessage(playerid, COLOR, "Credits to MasterJoker for the script include");
- SendClientMessage(playerid, COLOR, "Copyrighted (2012)");
- SendClientMessage(playerid, COLOR, "------------------------");
- return 1;
- }
- stock CreateDYOFC(playerid, text[])
- {
- new string[310],pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), "[F] %s "white"(%d): %s", pname, playerid, text);
- SendClientMessageToAll(GetPlayerColor(playerid), string);
- return 1;
- }
- stock AddBanClan(playerid, clan[])
- {
- new pname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- if(strfind(pname, clan ,true) != (-1))
- {
- BanEx(playerid, "MJUF: Banned Clan");
- printf("MasterJoker's Useful Function Anti-Banclan Detector has detect the banned clan!");
- }
- else return 1;
- return 1;
- }
- stock CreateHiddenTrapPos(playerid, Float:range, Float:x, Float:y, Float:z)
- {
- if(IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z))
- {
- SendClientMessage(playerid, COLOR_RED, "You enter the Hidden Trap Position, you will killed in 1 mins");
- TogglePlayerControllable(playerid, 1);
- SetTimer("Trap", 60000, false);
- printf("MJUF Include: Someone has enter the Hidden Trap! he will be killed in 60 secs");
- }
- else return 1;
- return 1;
- }
- stock MJUFGeneratorOn()
- {
- printf("MJ's Useful Function (Filterscript Test) has been plugin to your server (Ready to used!)");
- SendRconCommand("loadfs MJUFTest");
- return 1;
- }
- stock MJUFGeneratorOFF()
- {
- printf("MJ's Useful Function (Filterscript Test) has been ejected! (No longer used!)");
- SendRconCommand("unloadfs MJUFTest");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement