CMD:convidar(playerid, params[]);
{
new idx;
new tmp[128];
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmd_convidar, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GREY, "USE: /convidar [playerid/Parte-do-Nick]");
return 1;
}
new para1;
para1 = ReturnUse(tmp);
if(Player[playerid][pLider] >= 1 || Player[playerid][pCargo] == 5)
{
new lolz = GetPlayerOrg(playerid);
if(TemVaga(lolz) == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Nгo hб mais vagas na lista use /limparvaga primeiro.");
return 1;
}
if(IsPlayerConnected(para1))
{
if(Player[para1][pOrg] != 0 || Player[para1][pLider] != 0)
{
SendClientMessage(playerid, COLOR_GREY, "Este player Jб participa de Org/Gang/Mafia.");
return 1;
}
if(para1 != INVALID_PLAYER_ID)
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Convite enviado.");
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string,sizeof(string),"{00FFFF}%s {FFFFFF}te convidou para ser um {00FFFF}%s.\n\n{FFFFFF}Para ser, clique em {00FF00}Sim.",sendername,GetOrgName(playerid));
ShowPlayerDialog(para1,4710,DIALOG_STYLE_MSGBOX,"Convite",string,"Sim","Nao");
InviteOffer[para1] = playerid;
InviteJob[para1] = lolz;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Somente lнderes podem usar este comando !");
}
}
return 1;
}
new lolz = GetPlayerOrg(playerid);
if(TemVaga(lolz) == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparvaga primeiro.");
return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
OnPlayerCommandText(playerid, cmdtext);
}
return 1;
}
o que tem nesta public GetPlayerOrg(playerid); ? e pelo amor use um processador de comando '-'
|