Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //////////////////////////I===========//////////////////////////////////
- //////////////////////////I/////////////////////////////////////////////
- //////////////////////////I/////////////////////////////////////////////
- //////////////////////////I===========ILTERSCRIPT///////////////////////
- //////////////////////////I///////////By Rudy_ aka Leon/////////////////
- //////////////////////////I///////////Enjoy It//////////////////////////
- //////////////////////////I/////////////////////////////////////////////
- //////////////////////////I/////////////////////////////////////////////
- /* Features
- *Advanced kill command
- *Join/Leave/Kicked/Banned Messages
- *Afk - Back Command with 3d Labels
- *Will be adding More*/
- #include <a_samp>
- #include <core>
- #include <float>
- #include <streamer>
- new bool:isafk[MAX_PLAYERS];
- new Float:pHealth;
- new Text3D:label[MAX_PLAYERS];
- #define FILTERSCRIPT
- #if defined FILTERSCRIPT
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_ORANGE 0xF
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" FilterScript By Rudy_ Aka Leon");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid,COLOR_GREY, "FilterScript By Rudy_ aka Leon Loaded");
- new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, sizeof(string), "%s has joined the server", pname);
- SendClientMessageToAll(COLOR_ORANGE, string);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
- GetPlayerName(playerid, pname, sizeof(pname));
- switch(reason)
- {
- case 0: format(string, sizeof(string), "%s has (Crashed)", pname);
- case 1: format(string, sizeof(string), "%s has Left the server", pname);
- case 2: format(string, sizeof(string), "%s has (Kicked/Banned)", pname);
- }
- SendClientMessageToAll(COLOR_ORANGE, string);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/kill", cmdtext, true, 6) == 0)
- {
- SetPlayerHealth(playerid, 0.00);
- new PlayerName[MAX_PLAYER_NAME];
- new string[256];
- GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
- format(string,sizeof(string), "%s has Sucided", PlayerName);
- SendClientMessageToAll(0xFFBB00, string);
- return 1;
- }
- if(strcmp("/Afk", cmdtext, true, 4) == 0)
- {
- new name[MAX_PLAYER_NAME];
- if(isafk[playerid] == false)
- {
- isafk[playerid] = true;
- new string[256];
- GetPlayerHealth(playerid, pHealth);
- SetPlayerInterior(playerid, 10);
- SetPlayerHealth(playerid, 99999);
- label[playerid] = Create3DTextLabel("AFK",COLOR_GREY,30.0,40.0,50.0,40.0,0);
- Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
- GetPlayerName(playerid, name, MAX_PLAYER_NAME);
- format(string, sizeof(string), "%s Is Now AFK",name);
- printf(string);
- SendClientMessage(playerid, COLOR_ORANGE, "You Are now AFK, /Back to get back");
- SendClientMessageToAll(COLOR_ORANGE, string);
- TogglePlayerControllable(playerid,0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "Your Already AFK!");
- }
- return 1;
- }
- if(strcmp("/Back", cmdtext, true, 4) == 0)
- {
- new name[MAX_PLAYER_NAME];
- if(isafk[playerid] == true)
- {
- new string[256];
- isafk[playerid] = false;
- GetPlayerName(playerid, name, MAX_PLAYER_NAME);
- SetPlayerInterior(playerid, 0);
- format(string, sizeof(string), "%s Is No Longer AFK.",name);
- SendClientMessage(playerid, COLOR_ORANGE, "Your Back");
- SendClientMessageToAll(COLOR_ORANGE, string);
- SetPlayerHealth(playerid, pHealth);
- printf(string);
- Delete3DTextLabel(Text3D:label[playerid]);
- TogglePlayerControllable(playerid,1);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GREY, "You are Not AFK");
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment