Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*-------------------------------------------------------------------------------------------------------------------------------------
- FILTERSCRIPT - IG'S STATUS
- FAMILIASAMP.COM
- --------------------------------------------------------------------------------------------------------------------------------------------------------------*/
- // Includes
- #include <a_samp>
- #include <zcmd>
- // Forwards
- forward Atualizar(playerid);
- forward IGJogadores();
- // Defines as TextDraws
- new
- PlayerText:IGStatus[MAX_PLAYERS][5],
- bool:Status[MAX_PLAYERS]
- ;
- // Define DrunkLevelLastt
- new DrunkLevelLastt[MAX_PLAYERS], FPS[MAX_PLAYERS];
- CMD:status(playerid){
- if(!Status[playerid]){
- Status[playerid] = true;
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[0][playerid]);
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[1][playerid]);
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[2][playerid]);
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[3][playerid]);
- GameTextForPlayer(playerid, "~w~~h~Status: ~r~~h~Desativado~w~~h~.", 2000, 4);
- PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
- }
- else
- {
- Status[playerid] = false;
- PlayerTextDrawShow(playerid, PlayerText:IGStatus[0][playerid]);
- PlayerTextDrawShow(playerid, PlayerText:IGStatus[1][playerid]);
- PlayerTextDrawShow(playerid, PlayerText:IGStatus[2][playerid]);
- PlayerTextDrawShow(playerid, PlayerText:IGStatus[3][playerid]);
- GameTextForPlayer(playerid, "~w~~h~Status: ~g~~h~Ativado~w~~h~.", 2000, 4);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- }
- return 1;
- }
- // Public
- public OnFilterScriptInit(){
- print("-----------------------------------");
- print(" |FS| IG'Status Ativado | 2015 |");
- print("-----------------------------------");
- return 1;
- }
- // Public
- public OnFilterScriptExit(){
- print("-----------------------------------");
- print(" |FS| IG'Status Desativado");
- print("----------------------------------");
- return 1;
- }
- // Public
- public OnPlayerConnect(playerid){
- SetTimerEx("Atualizar",1000,true,"i", playerid);
- Status[playerid] = false;
- IGStatus[0][playerid] = CreatePlayerTextDraw(playerid,145.000000,347.000000,"_");
- IGStatus[1][playerid] = CreatePlayerTextDraw(playerid,200.000000,333.000000,".");
- IGStatus[2][playerid] = CreatePlayerTextDraw(playerid,145.000000,414.000000,".");
- IGStatus[3][playerid] = CreatePlayerTextDraw(playerid,154.000000,332.000000,"STATUS");
- PlayerTextDrawUseBox(playerid, IGStatus[0][playerid],1);
- PlayerTextDrawBoxColor(playerid, IGStatus[0][playerid],0x00000066);
- PlayerTextDrawTextSize(playerid, IGStatus[0][playerid],196.000000,14.000000);
- PlayerTextDrawUseBox(playerid, IGStatus[1][playerid],1);
- PlayerTextDrawBoxColor(playerid, IGStatus[1][playerid],0x000000ff);
- PlayerTextDrawTextSize(playerid, IGStatus[1][playerid],141.000000,24.000000);
- PlayerTextDrawUseBox(playerid, IGStatus[2][playerid],1);
- PlayerTextDrawBoxColor(playerid, IGStatus[2][playerid],0x000000ff);
- PlayerTextDrawTextSize(playerid, IGStatus[2][playerid],196.000000,4.000000);
- PlayerTextDrawAlignment(playerid, IGStatus[0][playerid],0);
- PlayerTextDrawAlignment(playerid, IGStatus[1][playerid],0);
- PlayerTextDrawAlignment(playerid, IGStatus[2][playerid],0);
- PlayerTextDrawAlignment(playerid, IGStatus[3][playerid],0);
- PlayerTextDrawBackgroundColor(playerid, IGStatus[0][playerid],0xffffffff);
- PlayerTextDrawBackgroundColor(playerid, IGStatus[1][playerid],0x000000ff);
- PlayerTextDrawBackgroundColor(playerid, IGStatus[2][playerid],0x000000ff);
- PlayerTextDrawBackgroundColor(playerid, IGStatus[3][playerid],0x000000ff);
- PlayerTextDrawFont(playerid, IGStatus[0][playerid],2);
- PlayerTextDrawLetterSize(playerid, IGStatus[0][playerid],0.199999,1.400000);
- PlayerTextDrawFont(playerid, IGStatus[1][playerid],3);
- PlayerTextDrawLetterSize(playerid, IGStatus[1][playerid],-0.000000,1.000000);
- PlayerTextDrawFont(playerid, IGStatus[2][playerid],3);
- PlayerTextDrawLetterSize(playerid, IGStatus[2][playerid],-0.000000,-0.200000);
- PlayerTextDrawFont(playerid, IGStatus[3][playerid],2);
- PlayerTextDrawLetterSize(playerid, IGStatus[3][playerid],0.199999,1.000000);
- PlayerTextDrawColor(playerid, IGStatus[0][playerid],0xffffffff);
- PlayerTextDrawColor(playerid, IGStatus[1][playerid],0xffffffff);
- PlayerTextDrawColor(playerid, IGStatus[2][playerid],0xffffffff);
- PlayerTextDrawColor(playerid, IGStatus[3][playerid],0xffffffff);
- PlayerTextDrawSetOutline(playerid, IGStatus[1][playerid],1);
- PlayerTextDrawSetOutline(playerid, IGStatus[2][playerid],1);
- PlayerTextDrawSetProportional(playerid, IGStatus[0][playerid],1);
- PlayerTextDrawSetProportional(playerid, IGStatus[1][playerid],1);
- PlayerTextDrawSetProportional(playerid, IGStatus[2][playerid],1);
- PlayerTextDrawSetProportional(playerid, IGStatus[3][playerid],1);
- PlayerTextDrawSetShadow(playerid, IGStatus[0][playerid],0);
- PlayerTextDrawSetShadow(playerid, IGStatus[2][playerid],0);
- return 1;
- }
- // Public
- public OnPlayerSpawn(playerid){
- Atualizar(playerid);
- if(!Status[playerid]){
- PlayerTextDrawShow(playerid, PlayerText:IGStatus[0][playerid]);
- PlayerTextDrawShow(playerid, PlayerText:IGStatus[1][playerid]);
- PlayerTextDrawShow(playerid, PlayerText:IGStatus[2][playerid]);
- PlayerTextDrawShow(playerid, PlayerText:IGStatus[3][playerid]);
- }
- else
- SendClientMessage(playerid, -1, "{ffffff}|IG| {ff0000}Seu status se encontra desativado, digite {ffffff}/status {ff0000}para ativa-lo novamente.");
- return 1;
- }
- // Public
- public OnPlayerRequestClass(playerid, classid){
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[0][playerid]);
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[1][playerid]);
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[2][playerid]);
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[3][playerid]);
- return 1;
- }
- // Public
- public OnPlayerDeath(playerid, killerid, reason){
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[0][playerid]);
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[1][playerid]);
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[2][playerid]);
- PlayerTextDrawHide(playerid, PlayerText:IGStatus[3][playerid]);
- return 1;
- }
- // Public
- public OnPlayerUpdate(playerid){
- new drunknew = GetPlayerDrunkLevel(playerid);
- if(drunknew < 100) return SetPlayerDrunkLevel(playerid, 2000);
- else
- {
- if (DrunkLevelLastt[playerid] != drunknew){
- new IGfps = DrunkLevelLastt[playerid] - drunknew;
- if ((IGfps > 0) && (IGfps < 200)) FPS[playerid] = IGfps;
- DrunkLevelLastt[playerid] = drunknew;
- }
- }
- return 1;
- }
- // Public que ira atualizar seus scores,ping,fps e a quantia de jogadores
- public Atualizar(playerid){
- new Format[128];
- format(Format, sizeof(Format), "~g~Score: ~w~%d~n~~g~Ping: ~w~%d~n~~g~Fps: ~w~%d~n~~g~Jogadores~n~~w~ %d/%d", GetPlayerScore(playerid), GetPlayerPing(playerid), FPS[playerid], IGJogadores(), GetMaxPlayers());
- PlayerTextDrawSetString(playerid, IGStatus[0][playerid], Format);
- return true;
- }
- // Public que ira contar os jogadores do servidor
- public IGJogadores(){
- new Jogadores = 0;
- for(new i = 0; i < MAX_PLAYERS; i++){
- if(IsPlayerConnected(i) && !IsPlayerNPC(i)){
- Jogadores++;
- }
- }
- return Jogadores;
- }
- // Stock
- stock GetPlayerFPS(playerid)
- {
- SetPVarInt(playerid, "DrunkL", GetPlayerDrunkLevel(playerid));
- if(GetPVarInt(playerid, "DrunkL") < 100){
- SetPlayerDrunkLevel(playerid, 2000);
- }
- else
- {
- if(GetPVarInt(playerid, "LDrunkL") != GetPVarInt(playerid, "DrunkL")){
- SetPVarInt(playerid, "FPS", (GetPVarInt(playerid, "LDrunkL") - GetPVarInt(playerid, "DrunkL")));
- SetPVarInt(playerid, "LDrunkL", GetPVarInt(playerid, "DrunkL"));
- if((GetPVarInt(playerid, "FPS") > 0) && (GetPVarInt(playerid, "FPS") < 256)){
- return GetPVarInt(playerid, "FPS") - 1;
- }
- }
- }
- return 0;
- }
- /*------------------------------------------------------------------------------------------------------------------------------------------------------------
- ################################################################||Estradeiros Truck Server||##################################################################
- ######################################################||Facebook: www.facebook.com/igor.luiz.7773||###########################################################
- #################################################################||Skype: Igor.luiz122||######################################################################
- -------------------------------------------------------------------------------------------------------------------------------------------------------------*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement