[Ajuda] Cria 2 comandos.
#6

CMD:colete(playerid, params[])
{
if(!VerificarRival(playerid))return SendClientMessage(playerid, COLOR_ERRO, "ERRO: Vocк nгo pode usar este comando com alguйm que nгo й de sua facзгo prуximo.");
new health, giveplayer[MAX_PLAYER_NAME+1], sendername[MAX_PLAYER_NAME+1], string[264], giveplayerid;
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
if(sscanf(params, "ud", giveplayerid, health)) return SendClientMessage(playerid, COLOR_ERRO, "[ERRO]: Use '/colete' [id] [Quantidade]");
if(Jogador[playerid][Logado] == true)
{
if(Jogador[playerid][pAdmin] >= 1 || Jogador[playerid][pBOPE] >= 4 || Jogador[playerid][pPCRJ] >= 4 || Jogador[playerid][pPMRJ] >= 4 || Jogador[playerid][pHelper] >= 4 || Jogador[playerid][pCargo] >= 3 || Jogador[playerid][pCargo] >= 4 || Jogador[playerid][pDono] >= 1 || Jogador[playerid][pLider] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
SetPlayerArmour(giveplayerid,health);
GetPlayerName(giveplayerid, giveplayer,sizeof(giveplayer));
format(string, 256, "» %s deu colete para %s.", getPName(playerid), giveplayer);
MensagemLocal(giveplayerid, COR_ROXO, string, 60);
}
else
{
SendClientMessage(playerid, COLOR_ERRO, "ERRO: Este jogador nгo estб Logado!");
}
}
else
{
SendClientMessage(playerid, COLOR_ERRO, "ERRO: Vocк nгo tem permissгo para usar este comando!");
}
}
else
{
SendClientMessage(playerid, COLOR_ERRO, "ERRO: Vocк tem que estar logado para usar este comando!");
}
return 1;
}
///

stock VerificarRival(id)
{
for(new i=0; i <= MAX_PLAYERS; i++)
if(GetDistanceBetweenPlayers(id, i) <= 20)
{
if(Jogador[id][pFACCOES] == Jogador[i][pFACCOES])
{
}
else
{
return false;
}
}
return true;
}
Reply


Messages In This Thread
Cria 2 comandos. - by DaRoma - 24.03.2016, 23:18
Re: Cria 2 comandos. - by Whoo - 24.03.2016, 23:24
Re: Cria 2 comandos. - by DaRoma - 24.03.2016, 23:51
Re: Cria 2 comandos. - by F1N4L - 25.03.2016, 00:07
Re: Cria 2 comandos. - by DaRoma - 25.03.2016, 00:08
Re: Cria 2 comandos. - by social - 26.04.2016, 13:45
Re: Cria 2 comandos. - by Monotox - 26.04.2016, 18:21
Re: Cria 2 comandos. - by RiqueP - 27.04.2016, 00:06
Re: Cria 2 comandos. - by RiqueP - 27.04.2016, 00:09

Forum Jump:


Users browsing this thread: 1 Guest(s)