[Ajuda] Oque estб errado?
#1

eu ja tentei por uma new mais da sempre o mesmos erros:

pawn Код:
(25255) : error 017: undefined symbol "GangPlayerTimeInGz"
(25255) : warning 215: expression has no effect
(25255) : error 001: expected token: ";", but found "]"
(25255) : error 029: invalid expression, assumed zero
(25255) : fatal error 107: too many error messages on one line
Comando:
pawn Код:
if(strcmp(cmd, "/sinc", true) == 0 || strcmp(cmd, "/sync", true) == 0 || strcmp(cmd, "/s", true) == 0)
    {
       if(Stats[playerid][PRESO]==0)
        {
            if(!IsPlayerInAnyVehicle(playerid))
            {
                if(cmdkill[playerid]==0)
                {
                    new Float:X,Float:Y,Float:Z;
                    GetPlayerPos(playerid,X,Y,Z);
                    if(aeventoplayer[playerid] == 1)
                    {
                        if(eventoandamento == 1)
                        {
                            GetPlayerWeaponData(playerid,1,SincWeapData[playerid][0][1],SincWeapData[playerid][1][1]);
                            GetPlayerWeaponData(playerid,2,SincWeapData[playerid][0][2],SincWeapData[playerid][1][2]);
                            GetPlayerWeaponData(playerid,3,SincWeapData[playerid][0][3],SincWeapData[playerid][1][3]);
                            GetPlayerWeaponData(playerid,4,SincWeapData[playerid][0][4],SincWeapData[playerid][1][4]);
                            GetPlayerWeaponData(playerid,5,SincWeapData[playerid][0][5],SincWeapData[playerid][1][5]);
                            GetPlayerWeaponData(playerid,6,SincWeapData[playerid][0][6],SincWeapData[playerid][1][6]);
                            GetPlayerWeaponData(playerid,7,SincWeapData[playerid][0][7],SincWeapData[playerid][1][7]);
                            GetPlayerWeaponData(playerid,8,SincWeapData[playerid][0][8],SincWeapData[playerid][1][8]);
                            GetPlayerWeaponData(playerid,9,SincWeapData[playerid][0][9],SincWeapData[playerid][1][9]);
                            GetPlayerWeaponData(playerid,10,SincWeapData[playerid][0][10],SincWeapData[playerid][1][10]);
                            GetPlayerWeaponData(playerid,11,SincWeapData[playerid][0][11],SincWeapData[playerid][1][11]);
                            GetPlayerPos(playerid,XSINC[playerid],YSINC[playerid],ZSINC[playerid]);
                            GetPlayerFacingAngle(playerid,RSINC[playerid]);
                            GetPlayerHealth(playerid,VSINC[playerid]);
                            GetPlayerArmour(playerid,CSINC[playerid]);
                            MONEYSINC[playerid] = moneyplayer[playerid];
                            INTIDSINC[playerid] = GetPlayerInterior(playerid);
                            VIRTUALSINC[playerid] = GetPlayerVirtualWorld(playerid);
                            SincPlayerEx[playerid] = 1;
                            Comando[playerid] = 0;
                            SendClientMessage(playerid,COLOR_ROXO,"Sincronizando...");
                            SincPlayerPaused(playerid,X,Y,Z,VSINC[playerid],CSINC[playerid]);
                        }
                        else SendClientMessage(playerid,COLOR_VERMELHO,"Vocк nгo pode usar este comando no momento!");
                    }
                    else
                    {
                        if(PlayerInDD[playerid] == 0 && PlayerInRace[playerid] == 0)
                        {
                            GetPlayerWeaponData(playerid,1,SincWeapData[playerid][0][1],SincWeapData[playerid][1][1]);
                            GetPlayerWeaponData(playerid,2,SincWeapData[playerid][0][2],SincWeapData[playerid][1][2]);
                            GetPlayerWeaponData(playerid,3,SincWeapData[playerid][0][3],SincWeapData[playerid][1][3]);
                            GetPlayerWeaponData(playerid,4,SincWeapData[playerid][0][4],SincWeapData[playerid][1][4]);
                            GetPlayerWeaponData(playerid,5,SincWeapData[playerid][0][5],SincWeapData[playerid][1][5]);
                            GetPlayerWeaponData(playerid,6,SincWeapData[playerid][0][6],SincWeapData[playerid][1][6]);
                            GetPlayerWeaponData(playerid,7,SincWeapData[playerid][0][7],SincWeapData[playerid][1][7]);
                            GetPlayerWeaponData(playerid,8,SincWeapData[playerid][0][8],SincWeapData[playerid][1][8]);
                            GetPlayerWeaponData(playerid,9,SincWeapData[playerid][0][9],SincWeapData[playerid][1][9]);
                            GetPlayerWeaponData(playerid,10,SincWeapData[playerid][0][10],SincWeapData[playerid][1][10]);
                            GetPlayerWeaponData(playerid,11,SincWeapData[playerid][0][11],SincWeapData[playerid][1][11]);
                            GetPlayerPos(playerid,XSINC[playerid],YSINC[playerid],ZSINC[playerid]);
                            GetPlayerFacingAngle(playerid,RSINC[playerid]);
                            GetPlayerHealth(playerid,VSINC[playerid]);
                            GetPlayerArmour(playerid,CSINC[playerid]);
                            MONEYSINC[playerid] = moneyplayer[playerid];
                            INTIDSINC[playerid] = GetPlayerInterior(playerid);
                            VIRTUALSINC[playerid] = GetPlayerVirtualWorld(playerid);
                            SincPlayerEx[playerid] = 1;
                            Comando[playerid] = 0;
                            SendClientMessage(playerid,COLOR_ROXO,"Aguarde sem se mover, sincronizando...");
                            SetTimerEx("SincPlayerPaused",1,0,"ifffff",playerid,X,Y,Z,VSINC[playerid],CSINC[playerid]);
                            for(new i=0; i < MAX_GZS+MAX_TERRITORIOS+MAX_COLONIAS; i++)
                            {
                                if(GangPlayerTimeInGz[i][playerid] > 0);
                                {
                                    GangPlayerTimeInGz[i][playerid] = 0;
                                    GangInGz[Stats[playerid][GANGIDONLINE]][i]--;
                                    if(GangInGz[Stats[playerid][GANGIDONLINE]][i]==0) GzGoTime[i][Stats[playerid][GANGIDONLINE]] = 0;
                                }
                            }
                        }
                        else SendClientMessage(playerid,COLOR_VERMELHO,"Vocк nгo pode usar este comando estando em evento de Destruction Derby ou Race!");
                    }
                }
                else SendClientMessage(playerid,COLOR_VERMELHO,"Vocк nгo pode usar este comando depois de usar o /kill");
            }
            else SendClientMessage(playerid,COLOR_VERMELHO,"Vocк nгo pode usar este comando dentro de um veнculo!");
        }
        else SendClientMessage(playerid,COLOR_VERMELHO,"Vocк nгo pode usar este comando estando preso!");
        return 1;
    }[/pwn]



Linha:
[pwn]                                if(GangPlayerTimeInGz[i][playerid] > 0);

se possivel gostaria de uma outra ajuda que й meu comando /respawnveiculos ele respawna todos os veiculso do servidor eu gostaria que desse respawn apenas nos desocupados.
cуdigo do /respawnveiculos \/
pawn Код:
if(strcmp(cmd,"/respawnveiculos",true) == 0)
    {
            for(new i = 0; i < MAX_VEHICLES; i++) SetVehicleToRespawn(i);
        return 1;
    }
Reply
#2

Pergunta 1:
pawn Код:
if(GangPlayerTimeInGz[i][playerid] > 0)
{
Pergunta 2:
pawn Код:
for(new i = 0; i < MAX_VEHICLES; i++)
    {
        if(GetVehicleDriver(i))
        {
                DestroyVehicle(i);
            else SetVehicleToRespawn(i);
        }
    }
Reply
#3

Tenta assim

pawn Код:
if(strcmp(cmd, "/sinc", true) == 0 || strcmp(cmd, "/sync", true) == 0 || strcmp(cmd, "/s", true) == 0)
    {
       if(Stats[playerid][PRESO]==0)
        {
            if(!IsPlayerInAnyVehicle(playerid))
            {
                if(cmdkill[playerid]==0)
                {
                    new Float:X,Float:Y,Float:Z;
                    GetPlayerPos(playerid,X,Y,Z);
                    if(aeventoplayer[playerid] == 1)
                    {
                        if(eventoandamento == 1)
                        {
                            GetPlayerWeaponData(playerid,1,SincWeapData[playerid][0][1],SincWeapData[playerid][1][1]);
                            GetPlayerWeaponData(playerid,2,SincWeapData[playerid][0][2],SincWeapData[playerid][1][2]);
                            GetPlayerWeaponData(playerid,3,SincWeapData[playerid][0][3],SincWeapData[playerid][1][3]);
                            GetPlayerWeaponData(playerid,4,SincWeapData[playerid][0][4],SincWeapData[playerid][1][4]);
                            GetPlayerWeaponData(playerid,5,SincWeapData[playerid][0][5],SincWeapData[playerid][1][5]);
                            GetPlayerWeaponData(playerid,6,SincWeapData[playerid][0][6],SincWeapData[playerid][1][6]);
                            GetPlayerWeaponData(playerid,7,SincWeapData[playerid][0][7],SincWeapData[playerid][1][7]);
                            GetPlayerWeaponData(playerid,8,SincWeapData[playerid][0][8],SincWeapData[playerid][1][8]);
                            GetPlayerWeaponData(playerid,9,SincWeapData[playerid][0][9],SincWeapData[playerid][1][9]);
                            GetPlayerWeaponData(playerid,10,SincWeapData[playerid][0][10],SincWeapData[playerid][1][10]);
                            GetPlayerWeaponData(playerid,11,SincWeapData[playerid][0][11],SincWeapData[playerid][1][11]);
                            GetPlayerPos(playerid,XSINC[playerid],YSINC[playerid],ZSINC[playerid]);
                            GetPlayerFacingAngle(playerid,RSINC[playerid]);
                            GetPlayerHealth(playerid,VSINC[playerid]);
                            GetPlayerArmour(playerid,CSINC[playerid]);
                            MONEYSINC[playerid] = moneyplayer[playerid];
                            INTIDSINC[playerid] = GetPlayerInterior(playerid);
                            VIRTUALSINC[playerid] = GetPlayerVirtualWorld(playerid);
                            SincPlayerEx[playerid] = 1;
                            Comando[playerid] = 0;
                            SendClientMessage(playerid,COLOR_ROXO,"Sincronizando...");
                            SincPlayerPaused(playerid,X,Y,Z,VSINC[playerid],CSINC[playerid]);
                        }
                        else SendClientMessage(playerid,COLOR_VERMELHO,"Vocк nгo pode usar este comando no momento!");
                    }
                    else
                    {
                        if(PlayerInDD[playerid] == 0 && PlayerInRace[playerid] == 0)
                        {
                            GetPlayerWeaponData(playerid,1,SincWeapData[playerid][0][1],SincWeapData[playerid][1][1]);
                            GetPlayerWeaponData(playerid,2,SincWeapData[playerid][0][2],SincWeapData[playerid][1][2]);
                            GetPlayerWeaponData(playerid,3,SincWeapData[playerid][0][3],SincWeapData[playerid][1][3]);
                            GetPlayerWeaponData(playerid,4,SincWeapData[playerid][0][4],SincWeapData[playerid][1][4]);
                            GetPlayerWeaponData(playerid,5,SincWeapData[playerid][0][5],SincWeapData[playerid][1][5]);
                            GetPlayerWeaponData(playerid,6,SincWeapData[playerid][0][6],SincWeapData[playerid][1][6]);
                            GetPlayerWeaponData(playerid,7,SincWeapData[playerid][0][7],SincWeapData[playerid][1][7]);
                            GetPlayerWeaponData(playerid,8,SincWeapData[playerid][0][8],SincWeapData[playerid][1][8]);
                            GetPlayerWeaponData(playerid,9,SincWeapData[playerid][0][9],SincWeapData[playerid][1][9]);
                            GetPlayerWeaponData(playerid,10,SincWeapData[playerid][0][10],SincWeapData[playerid][1][10]);
                            GetPlayerWeaponData(playerid,11,SincWeapData[playerid][0][11],SincWeapData[playerid][1][11]);
                            GetPlayerPos(playerid,XSINC[playerid],YSINC[playerid],ZSINC[playerid]);
                            GetPlayerFacingAngle(playerid,RSINC[playerid]);
                            GetPlayerHealth(playerid,VSINC[playerid]);
                            GetPlayerArmour(playerid,CSINC[playerid]);
                            MONEYSINC[playerid] = moneyplayer[playerid];
                            INTIDSINC[playerid] = GetPlayerInterior(playerid);
                            VIRTUALSINC[playerid] = GetPlayerVirtualWorld(playerid);
                            SincPlayerEx[playerid] = 1;
                            Comando[playerid] = 0;
                            SendClientMessage(playerid,COLOR_ROXO,"Aguarde sem se mover, sincronizando...");
                            SetTimerEx("SincPlayerPaused",1,0,"ifffff",playerid,X,Y,Z,VSINC[playerid],CSINC[playerid]);
                            for(new i=0; i < MAX_GZS+MAX_TERRITORIOS+MAX_COLONIAS; i++)
                            {
                                if(GangPlayerTimeInGz[i][playerid] > 0)
                                {
                                    GangPlayerTimeInGz[i][playerid] = 0;
                                    GangInGz[Stats[playerid][GANGIDONLINE]][i]--;
                                    if(GangInGz[Stats[playerid][GANGIDONLINE]][i]==0) GzGoTime[i][Stats[playerid][GANGIDONLINE]] = 0;
                                }
                            }
                        }
                        else SendClientMessage(playerid,COLOR_VERMELHO,"Vocк nгo pode usar este comando estando em evento de Destruction Derby ou Race!");
                    }
                }
                else SendClientMessage(playerid,COLOR_VERMELHO,"Vocк nгo pode usar este comando depois de usar o /kill");
            }
            else SendClientMessage(playerid,COLOR_VERMELHO,"Vocк nгo pode usar este comando dentro de um veнculo!");
        }
        else SendClientMessage(playerid,COLOR_VERMELHO,"Vocк nгo pode usar este comando estando preso!");
        return 1;
    }
Reply
#4

o Problema do sinc nгo foi resolvido, ainda continua os erros, e o /respawnveiculos deu os seguintes erros:

pawn Код:
(26944) : error 017: undefined symbol "GetVehicleDriver"
(26947) : error 029: invalid expression, assumed zero
Reply
#5

pawn Код:
stock GetVehicleDriver(vehicleid)
{
  for(new i; i < MAX_PLAYERS; i++)
  {
    if(IsPlayerInVehicle(i, vehicleid) && GetPlayerState(i) == 2) return i;
  }
  return -1;
}
Reply
#6

Troca essa variavel por IsPlayerInAnyVehicle(playerid)
Reply
#7

Resolvi o Problema do /Respawnveiculos falta apenas do sinc
Reply
#8

Vocк tem estб vбriavel: GangPlayerTimeInGz
Tirou o ponto e virugla do if ?
Reply
#9

Usou meu cуdigo ?
Reply
#10

Eu tenho um sistema de sincronizaзгo que fiz, se quiser me adicione no skype que lhe passo.

lucasthebestmg
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)