Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ~~~~~~~~~~~~~~~~~~~~ » Sistema de prisão - Por bebida! « ~~~~~~~~~~~~~~~~~~~~
- Bom, fiz esse sistema para testar umas coisas. Só que no fim, acabou saindo isso.
- Autor: Hardware - Bryan
- Contato: mac-samp@hotmail.com
- Quer usar esse sitema? Use, sem problem algum, mas não retire os créditos.
- */
- #include <a_samp>
- #include "../include/gl_common.inc"
- new
- procurado[MAX_PLAYERS]
- ;
- public OnGameModeInit()
- {
- //Prisão:
- printf("\n--------------------------------------");
- printf(" [FS] SPrisão Bebida");
- printf(" Autor: Hardware - Bryan");
- printf("--------------------------------------\n");
- CreateObject(2951, 2257.747070, 1017.940002, 78.554688, 0.000000, 0.000000, 22.000000); //object (a51_labdoor) (1)
- CreateObject(2951, 2262.928711, 1019.919434, 78.554688, 0.000000, 0.000000, 21.994629); //object (a51_labdoor) (2)
- CreateObject(2951, 2268.043701, 1021.883301, 78.554688, 0.000000, 0.000000, 21.994629); //object (a51_labdoor) (3)
- CreateObject(2951, 2273.290039, 1024.149658, 78.554688, 0.000000, 0.000000, 21.994629); //object (a51_labdoor) (4)
- CreateObject(2951, 2276.812012, 1022.577576, 78.554688, 0.000000, 0.000000, 287.994629); //object (a51_labdoor) (5)
- CreateObject(2951, 2278.491455, 1017.513916, 78.554688, 0.000000, 0.000000, 287.990112); //object (a51_labdoor) (6)
- CreateObject(2951, 2280.141357, 1012.578308, 78.554688, 0.000000, 0.000000, 287.990112); //object (a51_labdoor) (7)
- CreateObject(2951, 2278.230957, 1008.947998, 78.554688, 0.000000, 0.000000, 199.990112); //object (a51_labdoor) (8)
- CreateObject(2951, 2272.987549, 1007.086792, 78.554688, 0.000000, 0.000000, 199.989624); //object (a51_labdoor) (9)
- CreateObject(2951, 2267.847412, 1005.301941, 78.554688, 0.000000, 0.000000, 199.989624); //object (a51_labdoor) (10)
- CreateObject(2951, 2262.791992, 1003.570679, 78.554688, 0.000000, 0.000000, 199.990112); //object (a51_labdoor) (11)
- CreateObject(2951, 2259.104248, 1005.134216, 78.554688, 0.000000, 0.000000, 109.989624); //object (a51_labdoor) (12)
- CreateObject(2951, 2257.259033, 1010.333984, 78.554688, 0.000000, 0.000000, 109.984161); //object (a51_labdoor) (13)
- CreateObject(2951, 2255.588867, 1014.873596, 78.554688, 0.000000, 0.000000, 109.989624); //object (a51_labdoor) (14)
- CreateObject(1452, 2277.671631, 1010.760376, 79.613716, 0.000000, 0.000000, 288.000000); //object (DYN_OUTHOUSE) (1)
- CreateObject(2935, 2258.395508, 1012.411560, 83.737259, 0.000000, 0.000000, 20.000000); //object (kmb_container_yel) (1)
- CreateObject(2935, 2260.633789, 1006.451416, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (2)
- CreateObject(2935, 2257.713867, 1014.500183, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (3)
- CreateObject(2935, 2260.637451, 1015.711365, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (4)
- CreateObject(2935, 2263.136719, 1008.911682, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (5)
- CreateObject(2935, 2263.710449, 1007.454834, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (6)
- CreateObject(2935, 2266.625000, 1008.601563, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (7)
- CreateObject(2935, 2264.198242, 1014.741089, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (8)
- CreateObject(2935, 2263.439453, 1016.801270, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (9)
- CreateObject(2935, 2266.441895, 1017.745728, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (10)
- CreateObject(2935, 2268.736084, 1011.715271, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (11)
- CreateObject(2935, 2269.775391, 1008.750977, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (12)
- CreateObject(2935, 2272.617188, 1009.698120, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (13)
- CreateObject(2935, 2270.369385, 1016.060181, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (14)
- CreateObject(2935, 2269.283691, 1019.013550, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (15)
- CreateObject(2935, 2272.237305, 1020.096924, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (16)
- CreateObject(2935, 2274.758301, 1013.576416, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (17)
- CreateObject(2935, 2275.461914, 1010.967285, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (18)
- CreateObject(2935, 2278.435547, 1012.363892, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (19)
- CreateObject(2935, 2275.991455, 1018.996704, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (20)
- CreateObject(2935, 2275.224121, 1021.237183, 83.737259, 0.000000, 0.000000, 19.995117); //object (kmb_container_yel) (21)
- CreateObject(931, 2259.514160, 1017.240784, 79.616592, 0.000000, 0.000000, 20.000000); //object (RACK3) (1)
- CreateObject(1771, 2274.431885, 1020.631409, 79.188354, 0.000000, 0.000000, 20.000000); //object (CJ_bunk_bed1) (1)
- CreateObject(1771, 2272.849854, 1019.948059, 79.188354, 0.000000, 0.000000, 19.995117); //object (CJ_bunk_bed1) (2)
- CreateObject(1771, 2271.267822, 1019.264465, 79.188354, 0.000000, 0.000000, 19.995117); //object (CJ_bunk_bed1) (3)
- CreateObject(1771, 2269.389160, 1018.416809, 79.188354, 0.000000, 0.000000, 19.995117); //object (CJ_bunk_bed1) (4)
- CreateObject(2297, 2259.832520, 1005.374512, 78.554688, 0.000000, 0.000000, 66.000000); //object (TV_UNIT_2) (1)
- CreateObject(2514, 2277.421875, 1010.667114, 78.554688, 0.000000, 0.000000, 290.000000); //object (CJ_TOILET1) (1)
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new tmp[256],idx,cmd[128];
- cmd = strtok(cmdtext,idx);
- if(!strcmp(cmdtext,"/presos",true))
- {
- for(new i=0; i <MAX_PLAYERS; i++)
- if(GetPlayerWantedLevel(i)>=3)
- {
- new nick[64];
- GetPlayerName(i,nick,sizeof(nick));
- SendClientMessage(playerid,0xE8E800AA,"• Presos: •");
- format(nick,sizeof(nick),"%s",nick);
- SendClientMessage(playerid,0x666666AA,nick);
- }
- else
- {
- SendClientMessage(playerid,0xFFFFFFAA,"• ~~~~~~~ Não há nenhum jogador preso ~~~~~~~~ •");
- return 0;
- }
- return 1;
- }
- if(!strcmp(cmd,"/pagarfianca",true))
- {
- new id;
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp)) return SendClientMessage(playerid,0xFF8080AA,"» Use:{FFFFFF}/pagarfianca [id]");
- id = strval(tmp);
- if(IsPlayerConnected(id) == 0) return SendClientMessage(playerid,0xFF0000AA,"[ERRO] Player não conectado!");
- if(playerid == id) return SendClientMessage(playerid,0xFF0000AA,"[ERRO] Você não pode soltar a sí mesmo!");
- if(GetPlayerMoney(playerid)>=1500)
- {
- new nickp[64],mnick[MAX_PLAYER_NAME], msg[128];
- GetPlayerName(id,nickp,sizeof(nickp));
- GetPlayerName(playerid,mnick,sizeof(mnick));
- format(msg,sizeof(msg),"[INFO] O player %s te soltou ta cadeia.",mnick);
- SendClientMessage(id,0x408080AA,msg);
- SendClientMessage(id,0x408080AA,"[INFO] Você está solto, mas não faça isso novamente!");
- format(msg,sizeof(msg),"[INFO] Você soltou o player %s.", nickp);
- SendClientMessage(playerid,0x408080AA,msg);
- SetPlayerPos(id,2079.7571,1337.5437,10.8203);
- SetPlayerDrunkLevel(playerid,0);
- SetPlayerWantedLevel(playerid,0);
- }
- else
- {
- SendClientMessage(playerid,0xFF0000AA,"[ERRO] Você não tem dinheiro para soltar alguém da prisão!");
- }
- return 1;
- }
- if(!strcmp(cmd,"/procurar",true))
- {
- new id;
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp)) return SendClientMessage(playerid,0xFF8080AA,"{FFFFFF}[X]{FF8080} Use: /procurar [id]");
- id = strval(tmp);
- if(IsPlayerConnected(id) == 0) return SendClientMessage(playerid,0xFF0000AA,"[ERRO] Jogador não conectado!");
- if(playerid == id) return SendClientMessage(playerid,0xFF0000AA,"[ERRO] Você não pode procurar a sí mesmo.");
- new nick[MAX_PLAYER_NAME],pnome[MAX_PLAYER_NAME],msg[128];
- GetPlayerName(playerid,nick,sizeof(nick));
- GetPlayerName(id,pnome,sizeof(pnome));
- procurado[id]=1;
- format(msg,sizeof(msg),"[INFO] Você está sendo procurado por %s",nick);
- SendClientMessage(id,0x008000AA,msg);
- format(msg,sizeof(msg),"[INFO] Você colocou o player %s na lista de procurados",pnome);
- SendClientMessage(playerid,0x008000AA,msg);
- return 1;
- }
- if(!strcmp(cmd,"/desprocurar",true))
- {
- new id;
- tmp = strtok(cmdtext,idx);
- if(!strlen(tmp)) return SendClientMessage(playerid,0xFF8080AA,"{FFFFFF}[X]{FF8080} Use: /desprocurar [id]");
- id = strval(tmp);
- if(IsPlayerConnected(id) == 0) return SendClientMessage(playerid,0xFF0000AA,"[ERRO] Jogador não conectado!");
- if(playerid == id) return SendClientMessage(playerid,0xFF0000AA,"[ERRO] Você não pode desprocurar a sí mesmo.");
- new nick[MAX_PLAYER_NAME],pnome[MAX_PLAYER_NAME],msg[128];
- GetPlayerName(playerid,nick,sizeof(nick));
- GetPlayerName(id,pnome,sizeof(pnome));
- procurado[id]=0;
- format(msg,sizeof(msg),"[INFO] Você foi retirado da lista de procurados por %s",nick);
- SendClientMessage(id,0x008000AA,msg);
- format(msg,sizeof(msg),"[INFO] Você retirou o player %s da lista de procurados",pnome);
- SendClientMessage(playerid,0x008000AA,msg);
- return 1;
- }
- if(!strcmp(cmdtext,"/comandosP",true))
- {
- SendClientMessage(playerid,0x0080FFAA,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- SendClientMessage(playerid,0xFFFFFFAA,"/presos || /pagarfianca || /procurar || /desprocurar");
- SendClientMessage(playerid,0x0080FFAA,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
- return 1;
- }
- return 0;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER && GetPlayerDrunkLevel(playerid) > 1999)
- {
- SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+1);
- SendClientMessage(playerid,0x8080FFAA,"[ERRO] Você não pode dirigir estando bêbado. E por isso está com +1 estrela de procurado.");
- RemovePlayerFromVehicle(playerid);
- if(GetPlayerWantedLevel(playerid)>=3)
- {
- SendClientMessage(playerid,0xFF0000AA,"[INFO] Fique aí na cadeia para pensar um pouco antes de dirigir alcoolizado.");
- SetPlayerPos(playerid,2272.1833496094,1011.5466918945,79.92834472656);
- SetPlayerInterior(playerid,0);
- SetTimerEx("SoltarPreso",60*1000,false,"i",playerid);
- }
- }
- return 1;
- }
- forward SoltarPreso(playerid);
- public SoltarPreso(playerid)
- {
- SetPlayerPos(playerid,2079.7571,1337.5437,10.8203);
- SendClientMessage(playerid,0x00A600AA,"[INFO] Você foi solto, não dirija bêbado novamente!");
- SetPlayerDrunkLevel(playerid,0);
- SetPlayerWantedLevel(playerid,0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement