21.06.2012, 16:02
Ola galera,estou com um problema com VIP e Socios em meu server,eu tento usar os comandos:
/darvip /darsocio /limparvip /retirarsocio,mas diz que nao tenho autorizaзao para isso...Estou logado como adm 1342,e nao da para logar na rcon,pois quando logo e ban automatico.
/darsocio
/RetirarSocio
/Darvip
/limparvip
/darvip /darsocio /limparvip /retirarsocio,mas diz que nao tenho autorizaзao para isso...Estou logado como adm 1342,e nao da para logar na rcon,pois quando logo e ban automatico.
/darsocio
Код:
if(strcmp(cmd, "/darsocio", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id]"); return 1; } new para1; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if (PlayerInfo[playerid][pAdmin] >= 1337) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pSocio] = 1; format(string, sizeof(string), "Vocк ganhou VIP socio do admin %s", sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "Vocк deu VIP socio para %s.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } } else { SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!"); } } return 1; }
Код:
if(strcmp(cmd, "/retirarsocio", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /retirarsocio [id]"); return 1; } new para1; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if (PlayerInfo[playerid][pAdmin] >= 1341) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pSocio] = 0; format(string, sizeof(string), "Seu Socio Foi retirado pelo adm %s", sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "Vocк retirou o Socio de %s.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } } } else { SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!"); } } return 1; }
Код:
if(strcmp(cmd, "/darvip", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, 256); if(PlayerInfo[playerid][pAdmin] < 1341) { VipVaga(); if(VagaSobrando == 0) { SendClientMessage(playerid, COLOR_GRAD1, "Nгo hб mais vagas na lista use /limparvip primeiro."); return true; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Nivel]"); return true; } new para1; new level; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id] [Nivel]"); return true; } level = strval(tmp); GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { format(string, sizeof string, "Vocк deu VIP Nнvel %d para %s", level, giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); format(string, sizeof string, "Vocк ganhou VIP Nнvel %d do admin %s", level, sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); getdate(year, month, day); gettime(hour,minute,second); format(string, sizeof(string), "%s deu vip ao %s nнvel %d (%d/%d/%d - %d:%d)",sendername,giveplayer,level,day, month, year,hour, minute); VipsLog(string); PlayerInfo[para1][pVIP] = level; new var03 = 0; for(new i = 0; i < sizeof(VipInfo); i++) { if(strcmp(giveplayer,VipInfo[i][vNick],true)==0) { VipInfo[i][vTipo] = level; SaveVip(); var03 = 1; break; } } if(var03 == 0) { for(new i = 0; i < sizeof(VipInfo); i++) { if(strcmp("Ninguem",VipInfo[i][vNick],true)==0) { strmid(VipInfo[i][vNick], giveplayer, 0, strlen(giveplayer), 255); VipInfo[i][vTipo] = level; SaveVip(); break; } } } } } } else { SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!"); } } return true; }
Код:
if(strcmp(cmd, "/limparvip", true) == 0) { if(strcmp(PlayerName(playerid),"xFox_Staff",true)==0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /limparvip [Vaga]"); return true; } new Vagao = strval(tmp); if(Vagao < 0 || Vagao > 50) { SendClientMessage(playerid, COLOR_GREY, "Vaga mнnima 0 mбximo 50!"); return true; } if(IsPlayerOnline(VipInfo[Vagao][vNick])) { new id=GetPlayerID(VipInfo[Vagao][vNick]); PlayerInfo[id][pVIP] = 0; SendClientMessage(id, COLOR_YELLOW, "Vocк perdeu seu VIP, renove-o e receba seus benefнcios de volta"); } getdate(year, month, day); gettime(hour,minute,second); format(string, sizeof(string), "%s limpou vip vaga %d de %s (%d/%d/%d - %d:%d)",PlayerName(playerid),Vagao,VipInfo[Vagao][vNick],day, month, year,hour, minute); VipsLog(string); strmid(VipInfo[Vagao][vNick], "Ninguem", 0, strlen("Ninguem"), 255); VipInfo[Vagao][vTipo] = 0; SaveVip(); format(string, sizeof(string), "Vocк Limpou A Vaga VIP Nє %d",Vagao); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); return true; } else { SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar este comando!"); return true; } }