[AJUDA] bug /batercartao -
felipe_mr - 09.01.2012
ola eu estou com um bug de /batercartao tem dois comando o enter e o /batercartao se vocк digitar /batercartao vai tudo certinho mais se aperta enter o player fica para e so sai com o /sinc alguйm pode me ajudar o comando de /batercartao:
pawn Код:
if(strcmp(cmd, "/batercartao", true) == 0)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
MSGPLAYER(playerid,COLOR_YELLOW," Vocк nгo pode batercartao na cadeia!");
return 1;
}
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsACop(playerid))
{
if (PlayerToPoint(2, playerid,255.3,77.4,1003.6) || PlayerToPoint(2,playerid,-1616.1294,681.1594,7.1875) || PlayerToPoint(2,playerid,230.1107,165.2237,1003.0234) || PlayerToPoint(2, playerid,240.7396,112.9709,1003.2188) || PlayerToPoint(2, playerid,1530.5187,-1702.5320,6.2252) || PlayerToPoint(2, playerid,302.7606,-1529.7537,24.9219) || PlayerToPoint(2, playerid,-1345.8823,492.5301,11.2027)
|| PlayerToPoint(2, playerid,326.4911,307.0710,999.1484) || PlayerToPoint(2, playerid,-2022.5831,-114.2501,1035.1719) || PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "O Oficial %s do Governo bateu o cartгo e estб em serviзo.", sendername);
OOCNews(COLOR_LIGHTBLUE,string);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
OnDuty[playerid] = 1;
EmpregoDuty[playerid] = 2;
Copsronda += 1;
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "O Oficial %s do Governo estб de folga.", sendername);
OOCNews(COLOR_LIGHTBLUE,string);
OnDuty[playerid] = 0;
EmpregoDuty[playerid] = 0;
Copsronda -= 1;
}
}
else
{
MSGPLAYER(playerid, COLOR_GRAD2, " Vocк nгo estб em um vestiбrio !");
return 1;
}
}
else if(PlayerInfo[playerid][pMembro] == 4||PlayerInfo[playerid][pLider] == 4)
{
if(EmpregoDuty[playerid] == 1)
{
MSGPLAYER(playerid, COLOR_LIGHTBLUE, "* Agora Vocк Estб De Folga, e nгo receberб chamados!");
EmpregoDuty[playerid] = 0;
Medics -= 1;
}
else
{
MSGPLAYER(playerid, COLOR_LIGHTBLUE, "* Agora vocк estб de plantгo com o seu trabalho e irб receber chamadas de pessoas que precisam.");
EmpregoDuty[playerid] = 1;
format(string, sizeof(string), "[Anuncio] O Medico %s estб em servico, /servico medico.", sendername);
OOCNews(0x2993EDAA,string);
Medics += 1;
}
}
else if(PlayerInfo[playerid][pEmprego] == 5)
{
if(EmpregoDuty[playerid] == 1)
{
MSGPLAYER(playerid, COLOR_LIGHTBLUE, "* Agora Vocк Estб De Folga, e nгo receberб chamados!");
EmpregoDuty[playerid] = 0;
Mechanics -= 1;
}
else
{
MSGPLAYER(playerid, COLOR_LIGHTBLUE, "* Agora vocк estб de plantгo como mecвnico e irб receber chamadas de pessoas que precisam.");
EmpregoDuty[playerid] = 1;
format(string, sizeof(string), "[Anuncio] O Mecanico %s estб em servico, /servico mecanico.", sendername);
OOCNews(0x2993EDAA,string);
Mechanics += 1;
}
}
else
{
MSGPLAYER(playerid, COLOR_GRAD1, " Vocк nгo й Um Oficial/Mйdico/Mecвnico !");
}
}
return 1;
}
Re: [AJUDA] bug /batercartao -
humildadeforever - 09.01.2012
Poste a public OnPlayerKeyStateChange.
Re: [AJUDA] bug /batercartao -
sGarfield - 09.01.2012
o "enter" seria a tecla enter ?
caso sim, poste oque a Ana pediol
Re: [AJUDA] bug /batercartao -
Cristhian - 09.01.2012
post a callback OnPlayerKeyStateChange
Re: [AJUDA] bug /batercartao -
felipe_mr - 09.01.2012
como assim ?
isso? :
pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
new string[128];
if(newkeys & KEY_FIRE && newkeys & KEY_HANDBRAKE) {
if(RecentlyShot[playerid] == 0) {
RecentlyShot[playerid] = 1;
SetTimerEx("AntiSpam", 1000, false, "d", playerid);
if(GetPlayerWeapon(playerid) == 34) {
new Float:blahx, Float:blahy, Float:blahz;
HeadshotCheck(playerid, blahx, blahy, blahz);
}
}
}
sу tem isso com o pesquisar q eu achei
Re: [AJUDA] bug /batercartao -
humildadeforever - 09.01.2012
Falta coisa nessa public...
Re: [AJUDA] bug /batercartao -
felipe_mr - 09.01.2012
como o que ?
outro gm igual mais feito o download de outro site :
pawn Код:
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
new string[128];
if(newkeys & KEY_FIRE && newkeys & KEY_HANDBRAKE) {
if(RecentlyShot[playerid] == 0) {
RecentlyShot[playerid] = 1;
SetTimerEx("AntiSpam", 1000, false, "d", playerid);
if(GetPlayerWeapon(playerid) == 34) {
new Float:blahx, Float:blahy, Float:blahz;
HeadshotCheck(playerid, blahx, blahy, blahz);
}
}
}
Re: [AJUDA] bug /batercartao -
sGarfield - 09.01.2012
poste a public inteira.
Re: [AJUDA] bug /batercartao -
felipe_mr - 09.01.2012
achei essa
pawn Код:
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
OnPlayerCommandText(playerid,"/entrar");
OnPlayerCommandText(playerid,"/sair");
OnPlayerCommandText(playerid,"/beber");
OnPlayerCommandText(playerid,"/menucop");
if(PlayerToPoint(3,playerid,229.7267,165.0443,1003.0234) || PlayerToPoint(2, playerid,255.3,77.4,1003.6) || PlayerToPoint(2,playerid,-1616.1294,681.1594,7.1875) || PlayerToPoint(2,playerid,230.1107,165.2237,1003.0234) || PlayerToPoint(2, playerid,240.7396,112.9709,1003.2188)
|| PlayerToPoint(2, playerid,1530.5187,-1702.5320,6.2252) || PlayerToPoint(2, playerid,302.7606,-1529.7537,24.9219) || PlayerToPoint(2, playerid,-1345.8823,492.5301,11.2027) || PlayerToPoint(2, playerid,326.4911,307.0710,999.1484) || PlayerToPoint(2, playerid,-2022.5831,-114.2501,1035.1719) && IsACop(playerid))
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), " O Oficial %s do Governo bateu o cartгo e estб em serviзo", PlayerName(playerid));
OOCNews(COLOR_LIGHTBLUE,string);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
OnDuty[playerid] = 1;
EmpregoDuty[playerid] = 2;
Copsronda += 1;
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "O Oficial %s do Governo estб de folga", PlayerName(playerid));
OOCNews(COLOR_LIGHTBLUE,string);
OnDuty[playerid] = 0;
EmpregoDuty[playerid] = 0;
Copsronda -= 1;
}
}
Re: [AJUDA] bug /batercartao -
humildadeforever - 09.01.2012
Troca a parte que vocк postou por essa:
pawn Код:
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
OnPlayerCommandText(playerid,"/entrar");
OnPlayerCommandText(playerid,"/sair");
OnPlayerCommandText(playerid,"/beber");
OnPlayerCommandText(playerid,"/menucop");
if(PlayerToPoint(3,playerid,229.7267,165.0443,1003.0234) || PlayerToPoint(2, playerid,255.3,77.4,1003.6) || PlayerToPoint(2,playerid,-1616.1294,681.1594,7.1875) || PlayerToPoint(2,playerid,230.1107,165.2237,1003.0234) || PlayerToPoint(2, playerid,240.7396,112.9709,1003.2188)
|| PlayerToPoint(2, playerid,1530.5187,-1702.5320,6.2252) || PlayerToPoint(2, playerid,302.7606,-1529.7537,24.9219) || PlayerToPoint(2, playerid,-1345.8823,492.5301,11.2027) || PlayerToPoint(2, playerid,326.4911,307.0710,999.1484) || PlayerToPoint(2, playerid,-2022.5831,-114.2501,1035.1719) && IsACop(playerid))
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), " O Oficial %s do Governo bateu o cartгo e estб em serviзo", PlayerName(playerid));
OOCNews(COLOR_LIGHTBLUE,string);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
OnDuty[playerid] = 1;
EmpregoDuty[playerid] = 2;
Copsronda += 1;
TogglePlayerControllable(playerid,1);
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "O Oficial %s do Governo estб de folga", PlayerName(playerid));
OOCNews(COLOR_LIGHTBLUE,string);
OnDuty[playerid] = 0;
EmpregoDuty[playerid] = 0;
Copsronda -= 1;
TogglePlayerControllable(playerid,1);
}
}