27.04.2012, 15:18
Seguinte tava tentando colocar o /batercartao pra setar skin da org deu certo, mas quando voce bate cartao 2x era pra retirar a farda mas nao ta retirando.
pawn Код:
}
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,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,1709.7542,-1642.8513,20.2188))
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "Oficial %s Colocou Sua Farda.", sendername);
OOCNews(COLOR_LIGHTRED,string);
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
OnDuty[playerid] = 1;
EmpregoDuty[playerid] = 2;
Copsronda += 1;
}
if (PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1)//Policia Militar
{
if(PlayerInfo[playerid][pCargo] == 1) { SetPlayerSkin(playerid, 265); }
if(PlayerInfo[playerid][pCargo] == 2) { SetPlayerSkin(playerid, 266); }
if(PlayerInfo[playerid][pCargo] == 3) { SetPlayerSkin(playerid, 267); }
if(PlayerInfo[playerid][pCargo] == 4) { SetPlayerSkin(playerid, 280); }
if(PlayerInfo[playerid][pCargo] == 5) { SetPlayerSkin(playerid, 283); }
if(PlayerInfo[playerid][pCargo] == 6) { SetPlayerSkin(playerid, 283); }
if(PlayerInfo[playerid][pSex] == 2) { SetPlayerSkin(playerid, 190); }
SetPlayerColor(playerid,COR_PM);
}
if (PlayerInfo[playerid][pMembro] == 2 || PlayerInfo[playerid][pLider] == 2)//BOPE
{
if(PlayerInfo[playerid][pCargo] == 1) { SetPlayerSkin(playerid, 285); }
if(PlayerInfo[playerid][pCargo] == 2) { SetPlayerSkin(playerid, 285); }
if(PlayerInfo[playerid][pCargo] == 3) { SetPlayerSkin(playerid, 285); }
if(PlayerInfo[playerid][pCargo] == 4) { SetPlayerSkin(playerid, 285); }
if(PlayerInfo[playerid][pCargo] == 5) { SetPlayerSkin(playerid, 290); }
if(PlayerInfo[playerid][pCargo] == 6) { SetPlayerSkin(playerid, 290); }
if(PlayerInfo[playerid][pSex] == 2) { SetPlayerSkin(playerid, 298); }
SetPlayerColor(playerid,COR_BOPE);
}
if (PlayerInfo[playerid][pMembro] == 3 || PlayerInfo[playerid][pLider] == 3)//EXERCITO
{
if(PlayerInfo[playerid][pCargo] == 1) { SetPlayerSkin(playerid, 287); }
if(PlayerInfo[playerid][pCargo] == 2) { SetPlayerSkin(playerid, 287); }
if(PlayerInfo[playerid][pCargo] == 3) { SetPlayerSkin(playerid, 287); }
if(PlayerInfo[playerid][pCargo] == 4) { SetPlayerSkin(playerid, 287); }
if(PlayerInfo[playerid][pCargo] == 5) { SetPlayerSkin(playerid, 287); }
if(PlayerInfo[playerid][pCargo] == 6) { SetPlayerSkin(playerid, 287); }
if(PlayerInfo[playerid][pSex] == 2) { SetPlayerSkin(playerid, 191); }
SetPlayerColor(playerid,COR_EXE);
}
if (PlayerInfo[playerid][pMembro] == 16 || PlayerInfo[playerid][pLider] == 16)//P.Civil
{
if(PlayerInfo[playerid][pCargo] == 1) { SetPlayerSkin(playerid, 59); }
if(PlayerInfo[playerid][pCargo] == 2) { SetPlayerSkin(playerid, 59); }
if(PlayerInfo[playerid][pCargo] == 3) { SetPlayerSkin(playerid, 60); }
if(PlayerInfo[playerid][pCargo] == 4) { SetPlayerSkin(playerid, 124); }
if(PlayerInfo[playerid][pCargo] == 5) { SetPlayerSkin(playerid, 186); }
if(PlayerInfo[playerid][pCargo] == 6) { SetPlayerSkin(playerid, 186); }
if(PlayerInfo[playerid][pSex] == 2) { SetPlayerSkin(playerid, 141); }
SetPlayerColor(playerid,COR_PC);
}
if (PlayerInfo[playerid][pMembro] == 11 || PlayerInfo[playerid][pLider] == 11)//P.Federal
{
if(PlayerInfo[playerid][pCargo] == 1) { SetPlayerSkin(playerid, 286); }
if(PlayerInfo[playerid][pCargo] == 2) { SetPlayerSkin(playerid, 286); }
if(PlayerInfo[playerid][pCargo] == 3) { SetPlayerSkin(playerid, 286); }
if(PlayerInfo[playerid][pCargo] == 4) { SetPlayerSkin(playerid, 112); }
if(PlayerInfo[playerid][pCargo] == 5) { SetPlayerSkin(playerid, 295); }
if(PlayerInfo[playerid][pCargo] == 6) { SetPlayerSkin(playerid, 295); }
if(PlayerInfo[playerid][pSex] == 2) { SetPlayerSkin(playerid, 224); }
SetPlayerColor(playerid,COR_PF);
}
if (PlayerInfo[playerid][pMembro] == 23 || PlayerInfo[playerid][pLider] == 23)//INTERPOL
{
if(PlayerInfo[playerid][pCargo] == 1) { SetPlayerSkin(playerid, 282); }
if(PlayerInfo[playerid][pCargo] == 2) { SetPlayerSkin(playerid, 280); }
if(PlayerInfo[playerid][pCargo] == 3) { SetPlayerSkin(playerid, 280); }
if(PlayerInfo[playerid][pCargo] == 4) { SetPlayerSkin(playerid, 284); }
if(PlayerInfo[playerid][pCargo] == 5) { SetPlayerSkin(playerid, 288); }
if(PlayerInfo[playerid][pCargo] == 6) { SetPlayerSkin(playerid, 288); }
if(PlayerInfo[playerid][pSex] == 2) { SetPlayerSkin(playerid, 91); }
SetPlayerColor(playerid,COR_INTERPOL);
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "Oficial %s Retirou Sua Farda.", sendername);
OOCNews(COLOR_LIGHTRED,string);
ResetPlayerWeaponsEx(playerid);
OnDuty[playerid] = 0;
EmpregoDuty[playerid] = 0;
Copsronda -= 1;
SetPlayerColor(playerid,COLOR_WHITE);
if(PlayerInfo[playerid][pSex] ==1) { SetPlayerSkin(playerid, 3); }
if(PlayerInfo[playerid][pSex] == 2) { SetPlayerSkin(playerid, 216); }
}
}
else
{
SendClientMessage(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)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Agora Vocк Estб De Folga, e nгo receberб chamados!");
EmpregoDuty[playerid] = 0;
Medics -= 1;
}
else
{
SendClientMessage(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(COR_AZTECAS,string);
Medics += 1;
}
}
else if(PlayerInfo[playerid][pMembro] == 24||PlayerInfo[playerid][pLider] == 24)
{
if(EmpregoDuty[playerid] == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Agora Vocк Estб De Folga, e nгo receberб chamados!");
EmpregoDuty[playerid] = 0;
Mechanics -= 1;
}
else
{
SendClientMessage(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(COR_AZTECAS,string);
Mechanics += 1;
}
}
else
{
//SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo e de um emprego formal!");
}
}
return 1;
}