25.05.2012, 01:22
pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
new string[128];
PlayerInactivity[playerid] = 0;
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
return cmd_sair(playerid);
}
if (newkeys == 16 && IsInBus[playerid] > 0)
{
new Float:X,Float:Y,Float:Z;
GetVehiclePos(IsInBus[playerid], X, Y, Z);
SetPlayerPos(playerid, X+4, Y, Z);
SetPlayerInterior(playerid, 0);
KillTimer(Timer1[playerid]);
KillTimer(Timer2[playerid]);
IsInBus[playerid] = 0;
}
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
cmd_equipar(playerid);
cmd_entrar(playerid);
cmd_sair(playerid);
cmd_autorizacao(playerid);
if(PlayerToPoint(2,playerid,-2033.4347,-117.3490,1035.1719))
return cmd_detran(playerid);
if(PlayerToPoint(2,playerid,1241.3771,-1691.7731,16.1926))
return cmd_equipe(playerid);
if(PlayerToPoint(2,playerid,1244.8221,-1691.6943,16.2019))
return cmd_creditos(playerid);
if(PlayerToPoint(3,playerid,1166.4720,-1329.6213,-0.8598))
return cmd_bcsamu(playerid);
if(PlayerToPoint(2,playerid,238.1998,81.0866,1005.0391) || PlayerToPoint(2,playerid,232.7777,172.3813,1003.0234) || PlayerToPoint(2,playerid,326.5955,306.8306,999.1484) || PlayerToPoint(2,playerid,246.1669,120.9470,1003.2421) || PlayerToPoint(2,playerid,1716.1597,-1642.2766,20.2258) || PlayerToPoint(2,playerid,2743.4658,-2453.7881,13.8623))
return cmd_batercartao(playerid);
if(PlayerToPoint(3,playerid,229.7267,165.0443,1003.0234) && IsACop(playerid))
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "Oficial %s bateu o cartгo e estб em serviзo,digite /servico policia.", PlayerName(playerid));
OOCNews(COLOR_DBLUE,string);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
OnDuty[playerid] = 1;
EmpregoDuty[playerid] = 2;
Copsronda += 1;
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "Oficial %s estб de folga e nгo vai mais receber seus chamados.", PlayerName(playerid));
OOCNews(COLOR_DBLUE,string);
OnDuty[playerid] = 0;
EmpregoDuty[playerid] = 0;
Copsronda -= 1;
}
}
if(InAFoodPlace[playerid] != 0)
{
if(PlayerToPoint(1.5,playerid,368.9714,-6.2486,1001.8516))
{
ShowPlayerDialog(playerid, 28, DIALOG_STYLE_LIST, "Cluckin' Bell", "Coraзгo no Espeto R$2\nCarne de Vaca R$4\nCarne de Jacarй R$5\nCarne de Frango R$3\nAgua R$1\nSuco R$1", "Selecionar", "Cancelar");
SetPlayerPos(playerid,368.9714,-6.2486,1001.8516);
SetPlayerFacingAngle(playerid, 357.0132);
}
if(PlayerToPoint(1.5,playerid,376.8571,-67.6620,1001.5151) || PlayerToPoint(1.5,playerid,683.9015,-456.7076,-25.6099))
{
ShowPlayerDialog(playerid, 29, DIALOG_STYLE_LIST, "Burger Shot", "X-Simples R$2\nX-Tudo R$4\nX-Especial R$5\nX-Frango R$3\nAgua R$1\nSuco R$1", "Selecionar", "Cancelar");
SetPlayerPos(playerid,376.8571,-67.6620,1001.5151);
SetPlayerFacingAngle(playerid, 357.0132);
}
if(PlayerToPoint(1.5,playerid,375.6895,-118.9683,1001.4995))
{
ShowPlayerDialog(playerid, 30, DIALOG_STYLE_LIST, "Well Stacked Pizza", "Presunto e Mussarela - Pequena R$2\nPresunto e Mussarela - Grande R$4\nFrango e Azeitona R$5\nBacon e Chocolate R$3\nAgua R$1\nSuco R$1", "Selecionar", "Cancelar");
SetPlayerPos(playerid,375.6895,-118.9683,1001.4995);
SetPlayerFacingAngle(playerid, 357.0132);
}
if(PlayerToPoint(1.5,playerid,379.0611,-186.6032,1000.6328))
{
ShowPlayerDialog(playerid, 31, DIALOG_STYLE_LIST, "Jim's sticky ring", "Rosquinha Pequena R$2\nRosquinha Normal R$4\nRosquinha de Chefe R$5\nSuper Rosquinha R$4\nAgua R$1\nSuco R$1", "Selecionar", "Cancelar");
SetPlayerPos(playerid,379.0611,-186.6032,1000.6328);
SetPlayerFacingAngle(playerid, 280);
}
SetCameraBehindPlayer(playerid);
}
if(PlayerToPoint(1.5,playerid,2224.1484,-1141.8772,1025.7969) || PlayerToPoint(1.0,playerid,1929.5409,-1785.1664,13.5469) || PlayerToPoint(1.0,playerid,2232.2886,-1162.6107,25.8906) || PlayerToPoint(1.0,playerid,1550.4796,-1669.7039,13.5624) || PlayerToPoint(1.5,playerid,957.4803,-48.7381,1001.1172)
|| PlayerToPoint(2,playerid,229.6725,153.8311,1003.0234) || PlayerToPoint(1.5,playerid,241.0845,115.2740,1003.2188) || PlayerToPoint(1.5,playerid,321.4753,305.5962,999.1484) || PlayerToPoint(1.5,playerid,-1347.6376,499.9476,11.1953) || PlayerToPoint(1.5, playerid,2308.7908,-13.2499,26.7422) || PlayerToPoint(1.5,playerid,1468.6473,-1767.3595,18.7958) || PlayerToPoint(1.5,playerid,648.8112,-520.1576,16.3359))
return cmd_banco(playerid);
if (PlayerToPoint(2, playerid, 361.8300,173.5202,1008.3828)) return cmd_getemprego(playerid);
if (PlayerToPoint(2, playerid, 1490.2411,1307.2179,1093.2891)) return cmd_licencas(playerid);
if (PlayerToPoint(2.0, playerid, -26.8819,-89.6936,1003.5469) || PlayerToPoint(2.0, playerid, -22.2540,-55.6456,1003.5469)
|| PlayerToPoint(2.0, playerid, -22.3265,-138.4765,1003.5469) || PlayerToPoint(2.0, playerid, -30.3140,-28.3121,1003.5573)
|| PlayerToPoint(2.0, playerid, 1508.4419,-1703.4607,14.0469) || PlayerToPoint(2.0, playerid, 1128.7734,-1651.9916,18.6182))
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Loja 24/7", "Celular\nAgenda\nDados\nCamisinha\n20 Crйditos\n50 Crйditos", "Confirmar", "Cancelar");
}
if (PlayerToPoint(2.0, playerid, 2176.6519,1619.0439,999.9766) || PlayerToPoint(2.0, playerid, 437.1187,-82.9036,999.5547))
{
ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Loja de Armas", "Kitvip\nEagle\nMP5\nShotgun\nAk-47\nM4\nRifle\nParaquedas\nTaco de Golfe\nCaceteti\nTaco de Baseball\nPб\nTaco de Sinuca\nVibrador 1\nVibrador 2\nVibrador 3\nVibrador 4\nBuque de Flores\nCano", "Confirmar", "Cancelar");
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, 768.2192,-3.9873,1000.7203))
{
ShowPlayerDialog(playerid, DIALOGLUTA, DIALOG_STYLE_LIST, "BLG Estilos De Luta", "Cotoveladas\nBoxe\nRua\nKickBoxing\nKarate\nNormal", "confirma", "Cancela");
}
if(PlayerToPoint(2.0, playerid, 2152.4727,-1014.0005,62.8375) || PlayerToPoint(2.0, playerid, 1450.4479,-2287.0803,13.5469) || PlayerToPoint(2.0, playerid, 1919.1384,-1415.4775,13.5703) || PlayerToPoint(2.0, playerid, 1123.7664,-1506.4692,15.7869))
{
if (PlayerInfo[playerid][pEmprego] == 4)
{
ShowPlayerDialog(playerid, 2572, DIALOG_STYLE_LIST, "Pegar Drogas", "Pegar Maconha\nPegar Cocaina\nPegar Crack\nEsconder Maconha\nEsconder Cocaina\nEsconder Crack\nPegar Safe Maconha\nPegar Safe Cocaina\nPegar Safe Crack", "Confirma", "Cancela");
}
else SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um vendedor de drogas");
}
if(PlayerToPoint(2.0,playerid,-2648.0940,1396.4666,906.4609) || PlayerToPoint(2.0,playerid,811.9582,-1100.8458,25.7857) || PlayerToPoint(2.0,playerid,675.0947,-1275.7603,13.6334) || PlayerToPoint(2.0,playerid,1738.6844,-1944.9553,13.5647))
{
if(PlayerInfo[playerid][pMembro] == 15 || PlayerInfo[playerid][pLider] == 15 || PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLider] == 16 || PlayerInfo[playerid][pMembro] == 17 || PlayerInfo[playerid][pLider] == 17)
{
ShowPlayerDialog(playerid, 2582, DIALOG_STYLE_LIST, "Mafia Menu", "Equipar\nPegar Materiais\nEsconder Materiais", "Confirma", "Cancela");
}
else SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um Mafioso");
}
if(PlayerToPoint(3.0,playerid,2026.2104,-1896.1097,13.5469) || PlayerToPoint(3.0,playerid,1240.5569,-2036.9919,59.9709))
{
if (PlayerInfo[playerid][pEmprego] == 7)
{
ShowPlayerDialog(playerid, 2586, DIALOG_STYLE_INPUT, "Pegar Materiais", "Digite a quantidade de materiais/nque deseja pegar", "Pegar", "Cancelar");
}
else SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um vendedor de armas");
}
if (PlayerToPoint(2.0, playerid, 1524.4977,-1677.9469,6.2188) || PlayerToPoint(2.0, playerid, 1565.1235,-1666.9944,28.3956) || PlayerToPoint(2.0, playerid, 246.2975,87.4735,1003.6406))
{
ShowPlayerDialog(playerid, 2585, DIALOG_STYLE_LIST, "Elevador Policial", "Garagem\nDepartamento\nCobertura", "Confirma", "Cancela");
}
if(PlayerToPoint(3.0,playerid,1990.8590,-1996.3722,13.5469) || PlayerToPoint(3.0,playerid,1240.5569,-2036.9919,59.9709))
{
if(MatsHolding[playerid] > 0)
{
new payout = (100)*(MatsHolding[playerid]);
format(gstring, sizeof(gstring), "* A Boca comprou %d Pacotes de vocк e te deu %d Materiais.", payout, MatsHolding[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, gstring);
PlayerInfo[playerid][pMats] += payout;
MatsHolding[playerid] = 0;
}
else SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem nenhum pacote !");
}
}
if((newkeys == KEY_HORN) && IsPlayerInAnyVehicle(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid)) { return cmd_portaoc(playerid); }
if(PlayerInfo[playerid][pMembro] == 21 || PlayerInfo[playerid][pLider] == 21) { return cmd_portaop(playerid); }
if(PlayerInfo[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23) { return cmd_portaor(playerid); }
if(PlayerInfo[playerid][pMembro] == 26 || PlayerInfo[playerid][pLider] == 26) { return cmd_portaoh(playerid); }
cmd_abastecer(playerid);
cmd_portaos(playerid);
}
return 1;
}
Se vier pra trollar, nem poste --'