Como arrumo Isso ? -
felipe_mr - 02.10.2012
O que falta Para ficar certo para quando apertar f aparecer o dialog /equipar e ou /batercartao:
pawn Код:
if(strcmp(cmd, "/batercartao", true) == 0)
{
new Dialog[1507];
if(IsPlayerConnected(playerid))
{
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,1661.6528,-1692.3926,20.4526) || PlayerToPoint(2, playerid,-1345.8823,492.5301,11.2027) || PlayerToPoint(2, playerid,303.6393,-1526.9138,24.9219)
|| 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;
TogglePlayerControllable(playerid,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;
TogglePlayerControllable(playerid,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
{
ShowPlayerDialog(playerid, 1507, DIALOG_STYLE_MSGBOX, "Equipamentos", Dialog, "Batercartao", "Fechar");
}
return true;
}
Re: Como arrumo Isso ? -
MatheusAlcapone - 02.10.2012
Na public OnPlayerKeyStateChange ponhe isso:
pawn Код:
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
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,1661.6528,-1692.3926,20.4526) || PlayerToPoint(2, playerid,-1345.8823,492.5301,11.2027) || PlayerToPoint(2, playerid,303.6393,-1526.9138,24.9219)
|| PlayerToPoint(2, playerid,326.4911,307.0710,999.1484) || PlayerToPoint(2, playerid,-2022.5831,-114.2501,1035.1719) || PlayerInfo[playerid][pLocal] != 255)
{
ShowPlayerDialog(playerid, 1507, DIALOG_STYLE_MSGBOX, "Equipamentos", Dialog, "Batercartao", "Fechar");
}
else
{
SendClientMessage(playerid, -1, "Vocк nгo esta em um lugar para bater cartao");
}
Re: Como arrumo Isso ? -
felipe_mr - 02.10.2012
Ja arrumei
Re: Como arrumo Isso ? -
ViictorDaay- - 02.10.2012
Falta de chave.
Re: Como arrumo Isso ? -
-Rafinha_FusioN- - 02.10.2012
Код:
if(strcmp(cmd, "/batercartao", true) == 0)
{
if(PlayerInfo[playerid][pJailed] != 0)
{
SendClientMessage(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,-1569.1663,698.4446,-4.9063) || PlayerToPoint(2, playerid,255.0167,76.0073,1004.3107) || 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,1635.2003,-1822.0234,13.5331) || PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "Oficial %s bateu o cartгo e estб em serviзo,digite /servico policia.", sendername);
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.", sendername);
OOCNews(COLOR_DBLUE,string);
OnDuty[playerid] = 0;
EmpregoDuty[playerid] = 0;
Copsronda -= 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Vocк nгo estб em um vestiбrio !");
return 1;
}
}
Re: Como arrumo Isso ? -
felipe_mr - 02.10.2012
Olha eu aperto o F ai o player ja bate cartao automatico e n funfa nem o batercartao nem o equipar no dialog e o dialog dessa parte da erro
pawn Код:
ShowPlayerDialog(playerid, 1507, DIALOG_STYLE_MSGBOX, "Equipamentos",/* Dialog,*/ "Equipar", "Batercartao");
pawn Код:
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
OnPlayerCommandText(playerid,"/entrar");
OnPlayerCommandText(playerid,"/sair");
OnPlayerCommandText(playerid,"/beber");
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,1661.6528,-1692.3926,20.4526) || PlayerToPoint(2, playerid,-1345.8823,492.5301,11.2027) || PlayerToPoint(2, playerid,303.6393,-1526.9138,24.9219)
|| PlayerToPoint(2, playerid,326.4911,307.0710,999.1484) || PlayerToPoint(2, playerid,-2022.5831,-114.2501,1035.1719) || PlayerInfo[playerid][pLocal] != 255)
{
ShowPlayerDialog(playerid, 1507, DIALOG_STYLE_MSGBOX, "Equipamentos", Dialog, "Equipar", "Batercartao");
}
else
{
SendClientMessage(playerid, -1, "Vocк nгo esta em um lugar para bater cartao");
}
{
//O equipar
if(strcmp(cmd, "/batercartao", true) == 0)
{
new Dialog[1507];
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,1661.6528,-1692.3926,20.4526) || PlayerToPoint(2, playerid,-1345.8823,492.5301,11.2027) || PlayerToPoint(2, playerid,303.6393,-1526.9138,24.9219)
|| 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;
TogglePlayerControllable(playerid,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;
TogglePlayerControllable(playerid,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 !");
}
}
ShowPlayerDialog(playerid, 1507, DIALOG_STYLE_MSGBOX, "Equipamentos", Dialog, "Batercartao", "Fechar");
return 1;
}
Re: Como arrumo Isso ? -
felipe_mr - 02.10.2012
Alguem me ajuda ?
Re: Como arrumo Isso ? -
felipe_mr - 02.10.2012
?