[Ajuda] pergunta
#1

acredito ser so uma falha no testo tipo do /retirarvip id e nгo sai entгo fui no pawn e olhei e percebi que falta uma coisa no /vip seria oque tem no /socio:

Код:
if(strcmp(cmd, "/retirarsocio", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id]");
				return true;
			}
			new para1;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			GetPlayerName(playerid, sendername, 256);
    		if(IsPlayerConnected(playerid))
	    	{
	        if(PlayerInfo[playerid][pAdmin] < 1341)
	    	{
				SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse comando.");
				return 1;
	    	}
			    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 true;
	}
como editaria isso para vip em vez de socio? oque parece estar faltando o de vip!!!
tentei trocar as palavras mais nгo obtive sucesso
Reply
#2

precisamos saber as variaveis de ser VIP, veja num comando vip isso.
Reply
#3

Quote:
Originally Posted by PT
Посмотреть сообщение
precisamos saber as variaveis de ser VIP, veja num comando vip isso.
desculpe minha ignorвncia esqueci de colocar

Код:
if (PlayerInfo[playerid][pVIP] >= 1)
Reply
#4

Em vez disto:
PlayerInfo[para1][pSocio] = 0;

isto:
pawn Код:
PlayerInfo[para1][pVIP] = 0;
Reply
#5

Quote:
Originally Posted by DanDRT
Посмотреть сообщение
Em vez disto:
PlayerInfo[para1][pSocio] = 0;

isto:
pawn Код:
PlayerInfo[para1][pVIP] = 0;
mais nгo mudaria por causa da variбvel nгo?

tipo:
Код:
PlayerInfo[para1][pVIP] = 1;
Reply
#6

Quote:
Originally Posted by AssasinoLM
Посмотреть сообщение
mais nгo mudaria por causa da variбvel nгo?

tipo:
Код:
PlayerInfo[para1][pVIP] = 1;
nao, faz apenas o que o Dan disse..
Reply
#7

opa desculpa nao tinha visto olha so como tar em vez de retirar ta limpar entao fica complicado pq como vou saber qual e a vaga da pessoa tem como colocar em vez disso fazer como o socio? /retirarvip (id) tem como?

Код:
if (strcmp(cmd, "/limparvip", true) == 0)
	{
		if(PlayerInfo[playerid][pAdmin] < DONO)
		{
			SendClientMessage(playerid, COLOR_GRAD2, "Vocк nгo estб autorizado a usar este comando!");
			return true;
		}
	    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;
		}
eu poderia substituir por esse?

Код:
if(strcmp(cmd, "/retirarvip", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USE: /darvip [id]");
				return true;
			}
			new para1;
			para1 = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			GetPlayerName(playerid, sendername, 256);
    		if(IsPlayerConnected(playerid))
	    	{
	        if(PlayerInfo[playerid][pAdmin] < 1341)
	    	{
				SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem autorizaзгo para usar esse comando.");
				return 1;
	    	}
			    if(IsPlayerConnected(para1))
			    {
			        if(para1 != INVALID_PLAYER_ID)
			        {
						GetPlayerName(para1, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						PlayerInfo[para1][pVIP] = 0;
						format(string, sizeof(string), "Seu Vip Foi retirado pelo adm %s", sendername);
						SendClientMessage(para1, COLOR_LIGHTBLUE, string);
						format(string, sizeof(string), "Vocк retirou o Vip de %s.", giveplayer);
						SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
			}
		}
		return true;
	}
deu certo com esse que eu fiz vlw mais vou dar o resp pq mandei a parada errada vlwwwwwwwwww!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)