[Ajuda]Pedir Contas
#1

Oi,Eu queria Juntar esses Dois Comandos Em Um Sу.Eu tentei varias vezes mais nao deu mt certo pq sempre aparecia a mensagem voce nao faz parte de nenhuma organizaзгo entгo tipo quem puder me ajudar a junta o PEDIRCONTAS+CONTASLIDER em um so comando eu agradeзo : P+ Rep

Aqui Os Codigos:

Код:
	if(!strcmp("/pedircontas", cmdtext, true))
	{
		if(PlayerInfo[playerid][pMembro] == 0)
    	{
	   		SendClientMessage(playerid,COLOR_GREY," Vocк nгo faz parte de nemhuma organizaзгo!");
	   		return 1;
    	}
    	DemitirInfoOrg(PlayerName(playerid));
		gTeam[playerid] = 3;
		PlayerInfo[playerid][pTeam] = 3;
		PlayerInfo[playerid][pMembro] = 0;
		PlayerInfo[playerid][pLider] = 0;
		PlayerInfo[playerid][pCargo] = 0;
		PlayerInfo[playerid][pSpawn] = 0;
		if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
		MedicBill[playerid] = 0;
		SpawnPlayer(playerid);
		MedicBill[playerid] = 0;
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
		return 1;
	}
	if(!strcmp("/contaslider", cmdtext, true))
	{
		if(PlayerInfo[playerid][pLider] == 0)
    	{
	   		SendClientMessage(playerid,COLOR_GREY," Vocк nгo й lнder de nenhuma organizaзгo!");
	   		return 1;
    	}
		format(string, sizeof(string), "PLAYER: %s pediu contas de lider da org:[%s]",PlayerName(playerid), NomeORG(GetPlayerOrg(playerid)));
		LideresLog(string);
    	DemitirInfoOrg(PlayerName(playerid));
		gTeam[playerid] = 3;
		PlayerInfo[playerid][pTeam] = 3;
		PlayerInfo[playerid][pMembro] = 0;
		PlayerInfo[playerid][pLider] = 0;
		PlayerInfo[playerid][pCargo] = 0;
		PlayerInfo[playerid][pSpawn] = 0;
		if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
		MedicBill[playerid] = 0;
		SpawnPlayer(playerid);
		MedicBill[playerid] = 0;
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
		return 1;
	}
Obrigado.
Reply
#2

pawn Код:
if(!strcmp("/pedircontas", cmdtext, true))
    {
    if(PlayerInfo[playerid][pMembro] == 0)
        {
            SendClientMessage(playerid,COLOR_GREY," Vocк nгo faz parte de nemhuma organizaзгo!");
            return 1;
        }
        DemitirInfoOrg(PlayerName(playerid));
        gTeam[playerid] = 3;
        PlayerInfo[playerid][pTeam] = 3;
        PlayerInfo[playerid][pMembro] = 0;
        PlayerInfo[playerid][pLider] = 0;
        PlayerInfo[playerid][pCargo] = 0;
        PlayerInfo[playerid][pSpawn] = 0;
        if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
        MedicBill[playerid] = 0;
        SpawnPlayer(playerid);
        MedicBill[playerid] = 0;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
        else if(PlayerInfo[playerid][pLider] == 0)
        {
            SendClientMessage(playerid,COLOR_GREY," Vocк nгo й lнder de nenhuma organizaзгo!");
            return 1;
        }
        format(string, sizeof(string), "PLAYER: %s pediu contas de lider da org:[%s]",PlayerName(playerid), NomeORG(GetPlayerOrg(playerid)));
        LideresLog(string);
        DemitirInfoOrg(PlayerName(playerid));
        gTeam[playerid] = 3;
        PlayerInfo[playerid][pTeam] = 3;
        PlayerInfo[playerid][pMembro] = 0;
        PlayerInfo[playerid][pLider] = 0;
        PlayerInfo[playerid][pCargo] = 0;
        PlayerInfo[playerid][pSpawn] = 0;
        if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
        MedicBill[playerid] = 0;
        SpawnPlayer(playerid);
        MedicBill[playerid] = 0;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
        return 1;
    }
Reply
#3

Deu Os Seguintes Problemas

Warnings e Errors:


Quote:

C:\Users\Desktop\Brasil Anonymous City RPG V2.5\gamemodes\BAC.pwn(27294) : warning 217: loose indentation
C:\Users\Desktop\Brasil Anonymous City RPG V2.5\gamemodes\BAC.pwn(27301) : warning 217: loose indentation
C:\Users\Desktop\Brasil Anonymous City RPG V2.5\gamemodes\BAC.pwn(27314) : error 029: invalid expression, assumed zero
C:\Users\Desktop\Brasil Anonymous City RPG V2.5\gamemodes\BAC.pwn(27314) : warning 215: expression has no effect
C:\Users\Desktop\Brasil Anonymous City RPG V2.5\gamemodes\BAC.pwn(27314) : error 001: expected token: ";", but found "if"
C:\Users\Desktop\Brasil Anonymous City RPG V2.5\gamemodes\BAC.pwn(27337) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

Reply
#4

pawn Код:
if(!strcmp("/pedircontas", cmdtext, true))
    {
        if(PlayerInfo[playerid][pMembro] == 0)
        {
            SendClientMessage(playerid,COLOR_GREY," Vocк nгo faz parte de nemhuma organizaзгo!");
            return 1;
        }
        DemitirInfoOrg(PlayerName(playerid));
        gTeam[playerid] = 3;
        PlayerInfo[playerid][pTeam] = 3;
        PlayerInfo[playerid][pMembro] = 0;
        PlayerInfo[playerid][pLider] = 0;
        PlayerInfo[playerid][pCargo] = 0;
        PlayerInfo[playerid][pSpawn] = 0;
        if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
        MedicBill[playerid] = 0;
        SpawnPlayer(playerid);
        MedicBill[playerid] = 0;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
        }
        else if(PlayerInfo[playerid][pLider] == 0)
        {
        format(string, sizeof(string), "PLAYER: %s pediu contas de lider da org:[%s]",PlayerName(playerid), NomeORG(GetPlayerOrg(playerid)));
        LideresLog(string);
        DemitirInfoOrg(PlayerName(playerid));
        gTeam[playerid] = 3;
        PlayerInfo[playerid][pTeam] = 3;
        PlayerInfo[playerid][pMembro] = 0;
        PlayerInfo[playerid][pLider] = 0;
        PlayerInfo[playerid][pCargo] = 0;
        PlayerInfo[playerid][pSpawn] = 0;
        if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
        MedicBill[playerid] = 0;
        SpawnPlayer(playerid);
        MedicBill[playerid] = 0;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
        return 1;
    }
Reply
#5

topo do gm ou alinha o code

pawn Код:
#pragma tabsize 0
pawn Код:
if(!strcmp("/pedircontas", cmdtext, true))
    {
        if(PlayerInfo[playerid][pMembro] == 0)
        {
            SendClientMessage(playerid,COLOR_GREY," Vocк nгo faz parte de nemhuma organizaзгo!");
            return 1;
        }
        DemitirInfoOrg(PlayerName(playerid));
        gTeam[playerid] = 3;
        PlayerInfo[playerid][pTeam] = 3;
        PlayerInfo[playerid][pMembro] = 0;
        PlayerInfo[playerid][pLider] = 0;
        PlayerInfo[playerid][pCargo] = 0;
        PlayerInfo[playerid][pSpawn] = 0;
        if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
        MedicBill[playerid] = 0;
        SpawnPlayer(playerid);
        MedicBill[playerid] = 0;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
        }
        else if(PlayerInfo[playerid][pLider] == 0)
        {
        format(string, sizeof(string), "PLAYER: %s pediu contas de lider da org:[%s]",PlayerName(playerid), NomeORG(GetPlayerOrg(playerid)));
        LideresLog(string);
        DemitirInfoOrg(PlayerName(playerid));
        gTeam[playerid] = 3;
        PlayerInfo[playerid][pTeam] = 3;
        PlayerInfo[playerid][pMembro] = 0;
        PlayerInfo[playerid][pLider] = 0;
        PlayerInfo[playerid][pCargo] = 0;
        PlayerInfo[playerid][pSpawn] = 0;
        if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
        MedicBill[playerid] = 0;
        SpawnPlayer(playerid);
        MedicBill[playerid] = 0;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
        return 1;
    }
Reply
#6

@EDIT

eu fiz igual joker sumiu os warnigs mais ficou os errors

C:\Users\Desktop\Brasil Anonymous City RPG V2.5\gamemodes\BAC.pwn(27314) : error 029: invalid expression, assumed zero
C:\Users\Desktop\Brasil Anonymous City RPG V2.5\gamemodes\BAC.pwn(27314) : warning 215: expression has no effect
C:\Users\Desktop\Brasil Anonymous City RPG V2.5\gamemodes\BAC.pwn(27314) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.


Linha Do Erro

Код:
27313:        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
27314 Linha Erro:        else if(PlayerInfo[playerid][pLider] == 0)
27315:        {
Reply
#7

Fica de olho la emcima q ja vou dar edit
Reply
#8

pawn Код:
if(!strcmp("/pedircontas", cmdtext, true))
    {
        if(PlayerInfo[playerid][pMembro] == 0 && PlayerInfo[playerid][pLider] == 0)
        {
            SendClientMessage(playerid,COLOR_GREY," Vocк nгo faz parte de nemhuma organizaзгo!");
            return 1;
        }
        DemitirInfoOrg(PlayerName(playerid));
        gTeam[playerid] = 3;
        PlayerInfo[playerid][pTeam] = 3;
        PlayerInfo[playerid][pMembro] = 0;
        PlayerInfo[playerid][pLider] = 0;
        PlayerInfo[playerid][pCargo] = 0;
        PlayerInfo[playerid][pSpawn] = 0;
        if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
        MedicBill[playerid] = 0;
        SpawnPlayer(playerid);
        MedicBill[playerid] = 0;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
        }
        return 1;
    }
tenta esse aki
Reply
#9

Deu Erro Fatal No Game Mode Ex: Ele Fecha Sozinho quando vai compilar
Reply
#10

pawn Код:
if(!strcmp("/pedircontas", cmdtext, true))
    {
        if(PlayerInfo[playerid][pMembro] == 0)
        {
        DemitirInfoOrg(PlayerName(playerid));
        gTeam[playerid] = 3;
        PlayerInfo[playerid][pTeam] = 3;
        PlayerInfo[playerid][pMembro] = 0;
        PlayerInfo[playerid][pLider] = 0;
        PlayerInfo[playerid][pCargo] = 0;
        PlayerInfo[playerid][pSpawn] = 0;
        if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
        MedicBill[playerid] = 0;
        SpawnPlayer(playerid);
        MedicBill[playerid] = 0;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
        }
        }
        else if(PlayerInfo[playerid][pLider] == 0)
        {
        format(string, sizeof(string), "PLAYER: %s pediu contas de lider da org:[%s]",PlayerName(playerid), NomeORG(GetPlayerOrg(playerid)));
        LideresLog(string);
        DemitirInfoOrg(PlayerName(playerid));
        gTeam[playerid] = 3;
        PlayerInfo[playerid][pTeam] = 3;
        PlayerInfo[playerid][pMembro] = 0;
        PlayerInfo[playerid][pLider] = 0;
        PlayerInfo[playerid][pCargo] = 0;
        PlayerInfo[playerid][pSpawn] = 0;
        if(PlayerInfo[playerid][pSex] == 1) { PlayerInfo[playerid][pSkin] = 23; } else { PlayerInfo[playerid][pSkin] = 226; }
        SetSpawnInfo(playerid, gTeam[playerid], PlayerInfo[playerid][pSkin],0.0,0.0,0.0,0,0,0,0,0,0,0);
        MedicBill[playerid] = 0;
        SpawnPlayer(playerid);
        MedicBill[playerid] = 0;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк pediu as contas, agora vocк й um Civil novamente!");
        return 1;
    }
Agora vai ja testei aki !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)