19.06.2013, 22:16
Como acho a Stock do demitir ? vo colocar o demitir so pra ter noзгo sla.
Код:
if(strcmp(cmd, "/Demitir", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "/Demitir [ID/NICK] [Motivo]"); return 1; } new para1; para1 = ReturnUser(tmp); if (PlayerInfo[playerid][pLider] > 0 || PlayerInfo[playerid][pCargo] == 5) { new lolz = GetPlayerOrg(playerid); if(PlayerInfo[para1][pMembro] != lolz) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode demitir quem nгo й da sua org."); return 1; } if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { if (PlayerInfo[para1][pMembro] > 0) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /Demitir [ID/NICK] [Motivo]"); return 1; } DemitirInfoOrg(PlayerName(para1)); format(string, sizeof(string), "* Vocк foi demitido pelo lнder %s Motivo: %s.", sendername, (result)); SendClientMessage(para1, COLOR_LIGHTBLUE, string); SendClientMessage(para1, COLOR_LIGHTBLUE, "* Agora vocк й um civil novamente."); gTeam[para1] = 3; PlayerInfo[para1][pTeam] = 3; PlayerInfo[para1][pMembro] = 0; PlayerInfo[para1][pCargo] = 0; if(PlayerInfo[para1][pSex] == 1) { PlayerInfo[para1][pSkin] = 293; } else { PlayerInfo[para1][pSkin] = 12; } SetSpawnInfo(para1, gTeam[para1], PlayerInfo[para1][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0); MedicBill[para1] = 0; SpawnPlayer(para1); format(string, sizeof(string), "Vocк demitiu %s, Motivo: %s.", giveplayer, result); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); return 1; } } } }//not connected } else { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo й um lнder!"); } return 1; }