[AJUDA] O Que hб de Errado?
#1

O que hб de errado com o seguinte cуdigo? Somente as Gangues estгo conseguindo invadir '-' As Mбfias e Mercenбrios nгo :S
pawn Код:
if(strcmp(cmdtext, "/invadirupp", true)==0 || strcmp(cmdtext, "/dupp", true)==0)
    {
        new org = GetPlayerOrg(playerid);
        GetPlayerName(playerid,playername,sizeof(playername));
        if (invadioupp[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Vocк jб invadiu a UPP deve esperar 3 minutos");
        {
            if(org == 5 || org == 14 || org == 17 || org == 18 || org == 19 || org == 20)
            {
            if(PlayerToPoint(15.0, playerid, 1911.46520996,-1356.48950195,9.31960201)|| PlayerToPoint(15.0, playerid, 1904.62792969,-1356.77111816,9.91529083))
            {
            format(string, sizeof(string), "Gangster{23f518} %s {f5f3f0}estб invadindo a Upp da Pista de Skate",playername);
            SendClientMessageToAll(COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes,se afaste");
            SetTimerEx("invadirupp2", 40000, 0, "i", playerid);
            SetTimer("UsarUPP", 220000, 0);
            invadioupp[playerid] = 1;
            return 1;
            }
            if(PlayerToPoint(15.0, playerid, 2170.09838867,-991.67114258,59.80855560)|| PlayerToPoint(15.0, playerid, 2163.57568359,-990.62689209,59.80855560))
            {
            format(string, sizeof(string), "Gangster{23f518} %s {f5f3f0}estб invadindo a Upp da Favela",playername);
            SendClientMessageToAll(COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
            SetTimerEx("invadirupp3", 40000, 0, "i", playerid);
            SetTimer("UsarUPP", 220000, 0);
            invadioupp[playerid] = 1;
            return 1;
            }
            if(org == 12 || org == 13)
            {
            if(PlayerToPoint(15.0, playerid, 1206.42016602,-2021.96899414,64.97465515)|| PlayerToPoint(15.0, playerid, 1206.65002441,-2015.56726074,64.47465515))
            {
            format(string, sizeof(string), "Mafioso{23f518} %s {f5f3f0}estб invadindo a Upp do Casarгo",playername);
            SendClientMessageToAll(COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
            SetTimerEx("invadirupp4", 40000, 0, "i", playerid);
            SetTimer("UsarUPP", 220000, 0);
            invadioupp[playerid] = 1;
            return 1;
            }
            }
            if(org == 21 || org == 24)
            {
            if(PlayerToPoint(15.0, playerid, 1447.14721680,-2283.91235352,10.17737579)|| PlayerToPoint(15.0, playerid, 1446.90380859,-2290.30908203,10.16959381))
            {
            format(string, sizeof(string), "Mercenario{23f518} %s {f5f3f0}estб invadindo a Upp da Praзa do Aero",playername);
            SendClientMessageToAll(COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
            SetTimerEx("invadirupp5", 40000, 0, "i", playerid);
            SetTimer("UsarUPP", 220000, 0);
            invadioupp[playerid] = 1;
            return 1;
            }
            }
            }
        }
    }
Reply
#2

pawn Код:
if(strcmp(cmdtext, "/invadirupp", true)==0 || strcmp(cmdtext, "/dupp", true)==0)
{
    new org = GetPlayerOrg(playerid);
    GetPlayerName(playerid,playername,sizeof(playername));
    if (invadioupp[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Vocк jб invadiu a UPP deve esperar 3 minutos");
    if(org[playerid] == 5 || org[playerid] == 14 || org[playerid] == 17 || org[playerid] == 18 || org[playerid] == 19 || org[playerid] == 20)
    {
        if(PlayerToPoint(15.0, playerid, 1911.46520996,-1356.48950195,9.31960201)|| PlayerToPoint(15.0, playerid, 1904.62792969,-1356.77111816,9.91529083))
        {
            format(string, sizeof(string), "Gangster{23f518} %s {f5f3f0}estб invadindo a Upp da Pista de Skate",playername);
            SendClientMessageToAll(COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes,se afaste");
            SetTimerEx("invadirupp2", 40000, 0, "i", playerid);
            SetTimer("UsarUPP", 220000, 0);
            invadioupp[playerid] = 1;
            return 1;
        }
        if(PlayerToPoint(15.0, playerid, 2170.09838867,-991.67114258,59.80855560)|| PlayerToPoint(15.0, playerid, 2163.57568359,-990.62689209,59.80855560))
        {
            format(string, sizeof(string), "Gangster{23f518} %s {f5f3f0}estб invadindo a Upp da Favela",playername);
            SendClientMessageToAll(COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
            SetTimerEx("invadirupp3", 40000, 0, "i", playerid);
            SetTimer("UsarUPP", 220000, 0);
            invadioupp[playerid] = 1;
            return 1;
        }
        else if(org[playerid] == 12 || org[playerid] == 13)
        {
            if(PlayerToPoint(15.0, playerid, 1206.42016602,-2021.96899414,64.97465515)|| PlayerToPoint(15.0, playerid, 1206.65002441,-2015.56726074,64.47465515))
            {
                format(string, sizeof(string), "Mafioso{23f518} %s {f5f3f0}estб invadindo a Upp do Casarгo",playername);
                SendClientMessageToAll(COLOR_WHITE, string);
                SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
                SetTimerEx("invadirupp4", 40000, 0, "i", playerid);
                SetTimer("UsarUPP", 220000, 0);
                invadioupp[playerid] = 1;
                return 1;
            }
        }
        else if(org[playerid] == 21 || org[playerid] == 24)
        {
            if(PlayerToPoint(15.0, playerid, 1447.14721680,-2283.91235352,10.17737579)|| PlayerToPoint(15.0, playerid, 1446.90380859,-2290.30908203,10.16959381))
            {
                format(string, sizeof(string), "Mercenбrio{23f518} %s {f5f3f0}estб invadindo a Upp da Praзa do Aero",playername);
                SendClientMessageToAll(COLOR_WHITE, string);
                SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
                SetTimerEx("invadirupp5", 40000, 0, "i", playerid);
                SetTimer("UsarUPP", 220000, 0);
                invadioupp[playerid] = 1;
                return 1;
            }
        }
    }
    return 1;
}
Reply
#3

Vou dar uma olhada ver se funfou... Se nгo me engano eu ja tinha tentado com a return '-' Mas vou ver

----------------------EDIT-----------------------
Seguites erros ao compilar
pawn Код:
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : error 028: invalid subscript (not an array or too many subscripts): "org"
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : warning 215: expression has no effect
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#4

troca
pawn Код:
org[playerid] =
por sу
pawn Код:
org =
Reply
#5

Outros 4 erros '-'
pawn Код:
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : warning 211: possibly unintended assignment
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : warning 211: possibly unintended assignment
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : error 022: must be lvalue (non-constant)
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : error 022: must be lvalue (non-constant)
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : error 022: must be lvalue (non-constant)
C:\Documents and Settings\Administrador.CASA.000\Desktop\BMC New\gamemodes\BMG.pwn(15544) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Se eu deixar como tava antes a parte do "org" serб que funfa? vou testar

@edit
Como eu falei ai em cima compilou... agora vou fazer o test no server
Reply
#6

Код:
if(strcmp(cmdtext, "/invadirupp", true)==0 || strcmp(cmdtext, "/dupp", true)==0)
{
    new org = GetPlayerOrg(playerid);
    GetPlayerName(playerid,playername,sizeof(playername));
    if (invadioupp[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Vocк jб invadiu a UPP deve esperar 3 minutos");
    if(org[playerid] == 5 || org[playerid] == 14 || org[playerid] == 17 || org[playerid] == 18 || org[playerid] == 19 || org[playerid] == 20)
    {
        if(PlayerToPoint(15.0, playerid, 1911.46520996,-1356.48950195,9.31960201)|| PlayerToPoint(15.0, playerid, 1904.62792969,-1356.77111816,9.91529083))
        {
            format(string, sizeof(string), "Gangster{23f518} %s {f5f3f0}estб invadindo a Upp da Pista de Skate",playername);
            SendClientMessageToAll(COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes,se afaste");
            SetTimerEx("invadirupp2", 40000, 0, "i", playerid);
            SetTimer("UsarUPP", 220000, 0);
            invadioupp[playerid] = 1;
            return 1;
        }
        else if(PlayerToPoint(15.0, playerid, 2170.09838867,-991.67114258,59.80855560)|| PlayerToPoint(15.0, playerid, 2163.57568359,-990.62689209,59.80855560))
        {
            format(string, sizeof(string), "Gangster{23f518} %s {f5f3f0}estб invadindo a Upp da Favela",playername);
            SendClientMessageToAll(COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
            SetTimerEx("invadirupp3", 40000, 0, "i", playerid);
            SetTimer("UsarUPP", 220000, 0);
            invadioupp[playerid] = 1;
            return 1;
        }
	}
 	else if(org[playerid] == 12 || org[playerid] == 13)
  	{
   		if(PlayerToPoint(15.0, playerid, 1206.42016602,-2021.96899414,64.97465515)|| PlayerToPoint(15.0, playerid, 1206.65002441,-2015.56726074,64.47465515))
     	{
      		format(string, sizeof(string), "Mafioso{23f518} %s {f5f3f0}estб invadindo a Upp do Casarгo",playername);
        	SendClientMessageToAll(COLOR_WHITE, string);
         	SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
          	SetTimerEx("invadirupp4", 40000, 0, "i", playerid);
           	SetTimer("UsarUPP", 220000, 0);
           	invadioupp[playerid] = 1;
            return 1;
        }
   	}
    else if(org[playerid] == 21 || org[playerid] == 24)
    {
    	if(PlayerToPoint(15.0, playerid, 1447.14721680,-2283.91235352,10.17737579)|| PlayerToPoint(15.0, playerid, 1446.90380859,-2290.30908203,10.16959381))
     	{
      		format(string, sizeof(string), "Mercenбrio{23f518} %s {f5f3f0}estб invadindo a Upp da Praзa do Aero",playername);
        	SendClientMessageToAll(COLOR_WHITE, string);
         	SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
          	SetTimerEx("invadirupp5", 40000, 0, "i", playerid);
           	SetTimer("UsarUPP", 220000, 0);
           	invadioupp[playerid] = 1;
            return 1;
      	}
  	}
  	return 1;
}
Sу falta identar direito,f#%eu quando postei
Reply
#7

pawn Код:
if(strcmp(cmdtext, "/invadirupp", true)==0 || strcmp(cmdtext, "/dupp", true)==0)
{
    new org = GetPlayerOrg(playerid);
    GetPlayerName(playerid,playername,sizeof(playername));
    if (invadioupp[playerid] == 1) return SendClientMessage(playerid, COLOR_GREY, "Vocк jб invadiu a UPP deve esperar 3 minutos");
    if(org == 5 || org == 14 || org == 17 || org == 18 || org == 19 || org == 20)
    {
        if(PlayerToPoint(15.0, playerid, 1911.46520996,-1356.48950195,9.31960201)|| PlayerToPoint(15.0, playerid, 1904.62792969,-1356.77111816,9.91529083))
        {
            format(string, sizeof(string), "Gangster{23f518} %s {f5f3f0}estб invadindo a Upp da Pista de Skate",playername);
            SendClientMessageToAll(COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes,se afaste");
            SetTimerEx("invadirupp2", 40000, 0, "i", playerid);
            SetTimer("UsarUPP", 220000, 0);
            invadioupp[playerid] = 1;
            return 1;
        }
        if(PlayerToPoint(15.0, playerid, 2170.09838867,-991.67114258,59.80855560)|| PlayerToPoint(15.0, playerid, 2163.57568359,-990.62689209,59.80855560))
        {
            format(string, sizeof(string), "Gangster{23f518} %s {f5f3f0}estб invadindo a Upp da Favela",playername);
            SendClientMessageToAll(COLOR_WHITE, string);
            SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
            SetTimerEx("invadirupp3", 40000, 0, "i", playerid);
            SetTimer("UsarUPP", 220000, 0);
            invadioupp[playerid] = 1;
            return 1;
        }
        else if(org == 12 || org == 13)
        {
            if(PlayerToPoint(15.0, playerid, 1206.42016602,-2021.96899414,64.97465515)|| PlayerToPoint(15.0, playerid, 1206.65002441,-2015.56726074,64.47465515))
            {
                format(string, sizeof(string), "Mafioso{23f518} %s {f5f3f0}estб invadindo a Upp do Casarгo",playername);
                SendClientMessageToAll(COLOR_WHITE, string);
                SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
                SetTimerEx("invadirupp4", 40000, 0, "i", playerid);
                SetTimer("UsarUPP", 220000, 0);
                invadioupp[playerid] = 1;
                return 1;
            }
        }
        else if(org == 21 || org == 24)
        {
            if(PlayerToPoint(15.0, playerid, 1447.14721680,-2283.91235352,10.17737579)|| PlayerToPoint(15.0, playerid, 1446.90380859,-2290.30908203,10.16959381))
            {
                format(string, sizeof(string), "Mercenбrio{23f518} %s {f5f3f0}estб invadindo a Upp da Praзa do Aero",playername);
                SendClientMessageToAll(COLOR_WHITE, string);
                SendClientMessage(playerid, COLOR_GREY, "Aguarde 40 segundos para explodir os portхes, se afaste!");
                SetTimerEx("invadirupp5", 40000, 0, "i", playerid);
                SetTimer("UsarUPP", 220000, 0);
                invadioupp[playerid] = 1;
                return 1;
            }
        }
    }
    return 1;
}
Reply
#8

@= Worn=Bruno
Ae mano, vlw concertou ^^ mas eu fiz um ajuste ali, coloquei
pawn Код:
if(org == 5 || org == 14 || org == 17 || org == 18 || org == 19 || org == 20)
@Allan

Vlw mano, ta como seu cуdigo agora^^ vlw pela ajuda

Se pudesse dava +REP pra todos ae
Reply
#9

de nada
Reply
#10

Serб que consigo usar esse script como base pra fazer um sistema de invadir locais? Tal como Invadir a DP e tals... e fazer explodir as celas pra soltar presos... ?

E uma ajudinha bбsica... eu coloquei um FS de tunning no server tava funfando certinho... mas agr ele sу abre a dialog e quando vc clica numa modificaзгo ele n responde em nada... Ja tentei re-colocar o FS original e tals mas nada... Isso tem algo na GM bloqueando isso '-'
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)