Comandos Profissгo Policial. -
xxRaioxx - 29.07.2013
Olб,eu jб criei todas Organizaзхes e agora estou nas profissхes,e eu queria saber como coloca esses comandos na profissгo de policial:
1 == /prender [ID]
2 == /algemar [ID]
3 == /procurar [ID] [MOTIVO]
4 == /multar [ID] [QUANTIA]
Sу esses,alguйm ajuda?
OBS == Eu uso ZCMD.
Re: Comandos Profissгo Policial. -
Coe1 - 29.07.2013
Exemplos:
Procurar:
pawn Код:
CMD:procurar(playerid, params[])
{
if(!IsCop(playerid)) return SendClientMessage(playerid,C_MSG,"e.e tu nem й policial huehue");
{
new iddele,
motivo,
msg[100],
msg2[100]
;
if(sscanf(params,"us[50]",iddele,motivo)) return SendClientMessage(playerid,ERRO,"Uso correto: /procurar [ ID ] [ Motivo ]");
if(!IsPlayerConnected(iddele)) return SendClientMessage(playerid,ERRO,"ID nгo conectado e.e");
if(iddele == playerid) return SendClientMessage(playerid,ERRO,"e.e Vocк nгo pode se procurar e.e");
if(GetPlayerWantedLevel(iddele) == 1)
{
SetPlayerWantedLevel(iddele, 2);
}
if(GetPlayerWantedLevel(iddele) == 2)
{
SetPlayerWantedLevel(iddele, 3);
}
if(GetPlayerWantedLevel(iddele) == 3)
{
SetPlayerWantedLevel(iddele, 4);
}
if(GetPlayerWantedLevel(iddele) == 4)
{
SetPlayerWantedLevel(iddele, 5);
}
if(GetPlayerWantedLevel(iddele) == 5)
{
SetPlayerWantedLevel(iddele,6);
}
format(msg,sizeof(msg),"[ PROCURADO ] O policial %s procurou o jogador %s pelo motivo: [ %s ]",getName(playerid), getName(iddele),motivo);
format(msg2,sizeof(msg),"[ PROCURADO ] Vocк procurou o jogador %s pelo motivo: [ %s ]",getName(iddele),motivo);
SendClientMessage(iddele,LCLARO,msg);
SendClientMessage(playerid,LCLARO,msg2);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][Admin] >= 1)
{
new msg3[75];
format(msg3,sizeof(msg3),"[ SERVER ADMIN ] O policial %s procurou o jogador %s pelo motivo: %s",getName(playerid),getName(iddele),motivo);
SendClientMessage(i,LCLARO,msg3);
}
}
}
return true;
}
IsCop:
pawn Код:
forward IsCop(playerid); // top of game mode
public IsCop(playerid)
{
if(Profissao[playerid] == ProfissaoPolicial1|| Profissao[playerid] == ProfissaoPolicial2 || /* Aqui por final vocк coloca a variбvel de admin para que o admin possa utilizar outros comandos como procurar prender etc. */)
{
return true;
}
return false;
}
Olhe como feito e faзa o resto, utilizar parвmetros nгo й um bicho de sete cabeзas.
Re: Comandos Profissгo Policial. -
darkxdll - 29.07.2013
Jб tem esses comandos ai prontos ?
Se tiver й sу usar uma "verificaзгo" no jogador quando ele digitar o comando.
PHP код:
CMD:meucomando(playerid)
{
if(variavelProfissao[playerid] != DefinicaoPM) return SendClientMessage(playerid,-1,"Tu nгo йs COP");
//se ele for coloque as funзхes do comando aqui.
return 1;
}