[Ajuda] Conflito entre ID's
#1

Boas galera, estou com mais um problema no server e como a galera daqui me ajuda muito resolvi trazer aqui pra ver se vocкs me ajudam. O problema й conflito entre ids ex:

Sempre que eu digito /ir 5 ou outro id qualquer, eu vou sempre pro id "0"

e a mesma coisa acontece com os outros comandos, /trazer /pagar e assim vai...

Se precisarem que eu poste alguma coisa, й sу pedir, estou sempre on! Abraзos

Ps:. Procuramos Scripts e Mappers para servidor de Truck! Server jб possui Donos, Host, Alguns admins e poucos players. Aqui fica o post do projeto:

https://sampforum.blast.hk/showthread.php?tid=459459
Reply
#2

Passa o code do comando se nгo nгo dб pra ajudar.
Reply
#3

se tivesse o comando ( o code ) era mais facil nos ajudar hein
Reply
#4

ok, mal ai rs

Quote:

// Ports the player to the given player
COMMAND:ir(playerid, params[])
{
// Setup local variables
new OtherPlayer, Float, Float:y, Float:z, PortMsg[128], IntID, WorldID;

// Send the command to all admins so they can see it
SendAdminText(playerid, "/ir", params);

// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player's admin-level is at least 1
if (APlayerData[playerid][PlayerLevel] >= 1)
{
// Check if the player has a wanted level of less than 3
if (GetPlayerWantedLevel(playerid) < 3)
{
// Check if the player is not jailed
if (APlayerData[playerid][PlayerJailed] == 0)
{
if (sscanf(params, "u", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Use: /ir [id]");
else
{
// Check if that other player is online
if (IsPlayerConnected(OtherPlayer))
{
// Get the location of the other player
GetPlayerPos(OtherPlayer, x, y, z);
IntID = GetPlayerInterior(OtherPlayer);
WorldID = GetPlayerVirtualWorld(OtherPlayer);
// Port the player to the given location
SetPlayerVirtualWorld(playerid, WorldID);
SetPlayerInterior(playerid, IntID);
SetPlayerPos(playerid, x, y, z + 3.0);
format(PortMsg, 128, "A posiзгo do jogador й: %4.2f, %4.2f, %4.2f", x, y, z + 3.0);
SendClientMessage(playerid, 0x00FF00FF, PortMsg);
}
else
SendClientMessage(playerid, 0xFF0000FF, "Esse jogador nгo estб online.");
}
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar o comando /ir quando preso.");
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nao pode usar o comando /ir quando procurado.");
}
else
return 0;
}
else
return 0;

// Let the server know that this was a valid command
return 1;
}

Quer de todos?
Reply
#5

Dica: [*PAWN] no começo e [*/PAWN] pra não embolar os Cod's... sem os *....
Reply
#6

Opa vlw, mal ai vou arrumar aqui у!

pawn Код:
// Ports the player to the given player
COMMAND:ir(playerid, params[])
{
    // Setup local variables
    new OtherPlayer, Float:x, Float:y, Float:z, PortMsg[128], IntID, WorldID;

    // Send the command to all admins so they can see it
    SendAdminText(playerid, "/ir", params);

    // Check if the player has logged in
    if (APlayerData[playerid][LoggedIn] == true)
    {
        // Check if the player's admin-level is at least 1
        if (APlayerData[playerid][PlayerLevel] >= 1)
        {
            // Check if the player has a wanted level of less than 3
            if (GetPlayerWantedLevel(playerid) < 3)
            {
                // Check if the player is not jailed
                if (APlayerData[playerid][PlayerJailed] == 0)
                {
                    if (sscanf(params, "u", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Use: /ir [id]");
                    else
                    {
                        // Check if that other player is online
                        if (IsPlayerConnected(OtherPlayer))
                        {
                            // Get the location of the other player
                            GetPlayerPos(OtherPlayer, x, y, z);
                            IntID = GetPlayerInterior(OtherPlayer);
                            WorldID = GetPlayerVirtualWorld(OtherPlayer);
                            // Port the player to the given location
                            SetPlayerVirtualWorld(playerid, WorldID);
                            SetPlayerInterior(playerid, IntID);
                            SetPlayerPos(playerid, x, y, z + 3.0);
                            format(PortMsg, 128, "A posiзгo do jogador й: %4.2f, %4.2f, %4.2f", x, y, z + 3.0);
                            SendClientMessage(playerid, 0x00FF00FF, PortMsg);
                        }
                        else
                            SendClientMessage(playerid, 0xFF0000FF, "Esse jogador nгo estб online.");
                    }
                }
                else
                    SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nгo pode usar o comando /ir quando preso.");
            }
            else
                SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Vocк nao pode usar o comando /ir quando procurado.");
        }
        else
            return 0;
    }
    else
        return 0;

    // Let the server know that this was a valid command
    return 1;
}
Reply
#7

galera tbm sou adm do server e estou tentado resolver tbm aqui os problemas... a parada й que a maioria dos comandos quando tentamor ir em um jogador, kickar, ou qualquer aзгo relacionada a id, qualquer ir q postamos acaba indo para o player d id 0 e caso n tenha ngm c id 0 on, n conseguimos usar em ngm os comandos.
Reply
#8

O problema estб em quem programa o servidor pois tambйm utilizo o PPC_Trucking e este problema ja foi resolvido e a soluзгo eu encontrei no SEARCH!!!!!!
Reply
#9

Nгo... o problema й no plugin sscanf. Isso acontece-me com o ъltimo que saiu. Tente, antes de tentar fazer downgrade, mudar

pawn Код:
if (sscanf(params, "u", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Use: /ir [id]");
para

pawn Код:
if (sscanf(params, "i", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Use: /ir [id]");
Se nгo funcionar tente baixar estes arquivos:

Download aqui
Reply
#10

Quote:
Originally Posted by bruxo00
Посмотреть сообщение
Nгo... o problema й no plugin sscanf. Isso acontece-me com o ъltimo que saiu. Tente, antes de tentar fazer downgrade, mudar

pawn Код:
if (sscanf(params, "u", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Use: /ir [id]");
para

pawn Код:
if (sscanf(params, "i", OtherPlayer)) SendClientMessage(playerid, 0xFF0000AA, "Use: /ir [id]");
Se nгo funcionar tente baixar estes arquivos:

Download aqui

RESOLVEU BROTHER! MT OBRIGADO! APROVEITAMOS PRA MUDAR TODOS OS "u" ou "uu" que tinham no server pq tbm estavam dando o msm erro... sempre caindo no player 0.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)