pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
OnPlayerCommandText(playerid,"/sair");
}
if((newkeys == KEY_SECONDARY_ATTACK))
{
if(PlayerToPoint(1.0,playerid,247.7513,71.8837,1003.6406))
{
SetPlayerPos(playerid, 247.7513,71.8837,1003.6406);
SetPlayerFacingAngle(playerid,2.9147);
ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("LimparAnim", 2000, false, "i", playerid);
OnPlayerCommandText(playerid,"/pp");
}
if(PlayerToPoint(1.0,playerid,245.3939,73.8076,1003.6406))
{
SetPlayerPos(playerid, 245.3939,73.8076,1003.6406);
SetPlayerFacingAngle(playerid,90.6907);
ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("LimparAnim", 2000, false, "i", playerid);
OnPlayerCommandText(playerid,"/pp1");
}
if(PlayerToPoint(1.0,playerid,247.2543,77.1084,1003.6406))
{
SetPlayerPos(playerid, 247.2543,77.1084,1003.6406);
SetPlayerFacingAngle(playerid,276.9771);
ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("LimparAnim", 2000, false, "i", playerid);
OnPlayerCommandText(playerid,"/pv");
}
if(PlayerToPoint(1.0,playerid,248.9982,74.5119,1003.6406))
{
SetPlayerPos(playerid, 248.9982,74.5119,1003.6406);
SetPlayerFacingAngle(playerid,78.9719);
ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("LimparAnim", 2000, false, "i", playerid);
OnPlayerCommandText(playerid,"/pv");
}
if(PlayerToPoint(1.0,playerid,249.7362,64.5239,1003.6406))
{
SetPlayerPos(playerid, 249.7362,64.5239,1003.6406);
SetPlayerFacingAngle(playerid,271.2326);
ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("LimparAnim", 2000, false, "i", playerid);
OnPlayerCommandText(playerid,"/pr");
}
if(PlayerToPoint(1.0,playerid,251.4877,64.6306,1003.6406))
{
SetPlayerPos(playerid, 251.4877,64.6306,1003.6406);
SetPlayerFacingAngle(playerid,97.8139);
ApplyAnimation(playerid, "HEIST9","Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
SetTimerEx("LimparAnim", 2000, false, "i", playerid);
OnPlayerCommandText(playerid,"/pr");
}
}
if(PlayerToPoint(5.0,playerid,1479.1945,-1638.8873,14.1484))
{
new DinheiroCaixinha = 1000 + random(400);
new RespeitoCaixinha = random(2);
if(PlayerInfo[playerid][pCaixinha] == char)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк pegou uma Caixinha hб pouco tempo, volte novamente apуs o prуximo salбrio!");
return 1;
}
else
{
new string[128];
PlayerInfo[playerid][pCaixinha] = char;
format(string, sizeof(string), "Player: %s pegou uma Caixinha, com: R$[%d] Respeito[%d], vб б pracinha da Prefeitura e pegue a sua!.",PlayerName(playerid),DinheiroCaixinha, RespeitoCaixinha);
SendClientMessageToAll(0x9C71A8FF,string);
GivePlayerMoneyEx(playerid, DinheiroCaixinha);
PlayerInfo[playerid][pExp] += RespeitoCaixinha;
SendClientMessage(playerid, 0x8F0000FF, "Vocк jб ganhou uma caixinha de presente,volte novamento apуs o prуximo salбrio!");
format(string, sizeof(string), "{Na caixinha continha R$[%d] Respeito[%d]!",
DinheiroCaixinha, RespeitoCaixinha);
SendClientMessage(playerid, COLOR_RED, string);
}
}
Esta ai nessa public e no final dela