Nгo entra no F -
Fire_Hell - 21.07.2012
Gente, depois que eu botei no cуdigo de Bater cartгo apenas para Cop bater cartгo no F, aconteceu isso no server todo.
Nгo da de entrar ou sair em interiores apertando F ou Enter.
Bom, sei que foi o comando de Batercartгo, porque ja tirei e testei.
Entгo, eu botei apenas para Cops batercartгo no F, porque todos davam dando de bater cartгo.
Aqui estб o cуdigo, se alguem poder me ajudar eu agradeceria muito.
pawn Код:
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if (PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pLider] == 2 || PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3 || PlayerInfo[playerid][pMembro] == 11 || PlayerInfo[playerid][pLider] == 11 || PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLider] == 16)
{
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));
TogglePlayerControllable(playerid, true);
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));
TogglePlayerControllable(playerid, true);
OOCNews(COLOR_LIGHTBLUE,string);
OnDuty[playerid] = 0;
EmpregoDuty[playerid] = 0;
Copsronda -= 1;
}
}
}
Obrigado.
Re: Nгo entra no F -
[R] ousenber [K] - 21.07.2012
pawn Код:
if(newkeys == 16 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
OnPlayerCommandText(playerid,"/entrar");
OnPlayerCommandText(playerid,"/sair");
OnPlayerCommandText(playerid,"/beber");
if (PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1 || PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pLider] == 2 || PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3 || PlayerInfo[playerid][pMembro] == 11 || PlayerInfo[playerid][pLider] == 11 || PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLider] == 16)
{
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));
TogglePlayerControllable(playerid, true);
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));
TogglePlayerControllable(playerid, true);
OOCNews(COLOR_LIGHTBLUE,string);
OnDuty[playerid] = 0;
EmpregoDuty[playerid] = 0;
Copsronda -= 1;
}
}
}
Tenta agora.
AW: Nгo entra no F -
Fire_Hell - 21.07.2012
Vlw, deu.