Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #include <sscanf>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by Danniel ");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- CMD:agendarcadeia(sscanf,playerid, params[])
- {
- if(IsPlayerConnected(playerid))
- {
- new playa[64];
- new money;
- playa = strtok(cmdtext, idx);
- tmp = strtok(cmdtext, idx);
- if(!strlen(playa))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /agendarcadeia [Nome] [Tempo(Minutos)] [Motivo]");
- return 1;
- }
- money = strval(tmp);
- if (PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1341)
- {
- SendClientMessage(playerid, COLOR_GRAD1, "Você não está trabalhando! (/trabalhar)");
- return 1;
- }
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "USE: /cadeia [id] [Tempo(Minutos)] [motivo]");
- return 1;
- }
- new arquivo[64];
- format(arquivo, sizeof(arquivo), "AgendarCadeia/%s.log",playa);
- GetPlayerName(playerid, sendername, sizeof(sendername));
- if(!dini_Exists(arquivo))
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Este Player Não está Registrado no Servidor!");
- return true;
- }
- format(arquivo, sizeof(arquivo), "AgendadorCadeia%s.log",playa);
- if(dini_Exists(arquivo))
- {
- dini_Set(arquivo,"Admin",sendername);
- dini_Set(arquivo,"Motivo",result);
- dini_IntSet(arquivo,"Tempo",money);
- }
- else
- {
- dini_Create(arquivo);
- dini_Set(arquivo,"Admin",sendername);
- dini_Set(arquivo,"Motivo",result);
- dini_IntSet(arquivo,"Tempo",money);
- }
- format(gstring,sizeof(gstring), "AdmAviso: %s Agendou %s, Tempo %d Minutos, Motivo: %s", sendername,playa,money,result);
- ABroadCast(COLOR_YELLOW,gstring,1);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD1, " Você não tem permissao para usar esse comando!");
- }
- }
- return 1;
- }
- public StatusPlayer(idcheck, playerid)
- {
- new arquivo[64], dannielowna, NomedaOrg[64], DemitiuMotivo[64],
- DemitiuNome[64], PresoMotivo[64], PresoNome[64];
- if(idcheck == 1)
- {
- format(arquivo, sizeof(arquivo), "Agendados/JAIL%s.ini",PlayerName(playerid));
- if(dini_Exists(arquivo))
- {
- strmid(PresoNome, dini_Get(arquivo,"Admin"), 0, strlen(dini_Get(arquivo,"Admin")), 255);
- strmid(PresoMotivo, dini_Get(arquivo,"Motivo"), 0, strlen(dini_Get(arquivo,"Motivo")), 255);
- dannielowna = dini_Int(arquivo,"Tempo");
- format(gstring, sizeof(gstring), "* Admin %s Agendou Sua Prisão, Motivo: %s.", PresoNome,PresoMotivo);
- SendClientMessage(playerid, COLOR_LIGHTRED, gstring);
- format(gstring, sizeof(gstring), "Você foi preso por %d Minutos Automaticamente, Agendado pelo Admin.", dannielowna);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, gstring);
- GameTextForPlayer(playerid, "~b~Bem Vindo a ~n~~r~~h~Cadeia Admin", 5000, 3);
- WantedPoints[playerid] = 0;
- ResetPlayerWeapons(playerid);
- SetPlayerWantedLevel(playerid, 0);
- PlayerInfo[playerid][pJailed] = 2;
- PlayerInfo[playerid][pJailTime] = dannielowna * 60;
- SetPlayerPos(playerid, 346.5848, 306.1026, 999.1484);
- SetPlayerInterior(playerid,6);
- format(gstring, sizeof(gstring), "AdmAviso: {80E3FF}%s {E84F33} Está Agendado e Foi preso, Motivo: %s",PlayerName(playerid) ,PresoMotivo);
- ABroadCast(COLOR_LIGHTRED,gstring,1);
- fremove(arquivo);
- }
- return 1;
- }
- #endif
- //Baixado na www.HomeHots.net, Sistema criado por Danniel_Style, não retire os créditos!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement