19.06.2013, 00:45
Ai o Code:
Код:
if(strcmp(cmd, "/convidar", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /convidar [playerid/Parte-do-Nick]"); return 1; } new para1; para1 = ReturnUser(tmp); if (PlayerInfo[playerid][pLider] >= 1 || PlayerInfo[playerid][pCargo] == 5) { new lolz = GetPlayerOrg(playerid); if(TemVaga(lolz) == 0) { SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparvaga primeiro."); return 1; } if(IsPlayerConnected(para1)) { if(PlayerInfo[para1][pMembro] != 0 || PlayerInfo[para1][pLider] != 0) { SendClientMessage(playerid, COLOR_GREY, "Este player jб participa de Org/Gang/Mafia."); return 1; } if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* %s te convidou para entrar para: %s (digite /aceitar convite) para aceitar.", PlayerName(playerid), NomeORG(playerid)); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "* Vocк convidou %s para sua organizaзгo: %s.", giveplayer,NomeORG(playerid)); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); InviteOffer[para1] = playerid; InviteJob[para1] = lolz; } }//not connected } else { SendClientMessage(playerid, COLOR_GREY, " Somente lнderes podem usar este comando !"); } } return 1; }