[Ajuda] Comandos pegam de vez enquando!
#1

Os comandos do meu server pegam de vez enquando,tipo o /ir /tele /kick e outros,oq pode ser,e oq faзo pra arrumar
Reply
#2

MANDa o codigo ae man.
Reply
#3

Mande um dos comandos que nгo funcionam. Nгo conseguimos resolver um problema sem saber o cуdigo.
Reply
#4

Muito lag, conflitos ou timer de comando!
Reply
#5

Quote:

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);
// Let the player know about it
format(PortMsg, 128, "[BPC] Vocк foi ate o player desejado!!");
SendClientMessage(playerid, 0x00FF00FF, PortMsg);
}
else
SendClientMessage(playerid, 0xFF0000FF, "[BPC] Esse jogador nгo estб online.");
}
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[BPC] Vocк nгo pode usar o comando /ir quando preso.");
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}[BPC] 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;
}

Quote:

COMMAND:kick(playerid, params[])
{
new PlayerToKick, Reason[128], ReasonMsg[128], Name[24], AdminName[24];
SendAdminText(playerid, "/kick", params);
if (APlayerData[playerid][LoggedIn] == true)
{

if (APlayerData[playerid][PlayerLevel] >= 2)
{

if (sscanf(params, "us[128]", PlayerToKick, Reason)) SendClientMessage(playerid, 0xFF0000AA, "Use: /kick [id] [motivo]");
else
if (IsPlayerConnected(PlayerToKick))
{

GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(PlayerToKick, Name, sizeof(Name));
format(ReasonMsg, 128, "{FF0000}-| %s foi kickado pelo administrador %s. Motivo: %s |-", Name, AdminName, Reason);
SendClientMessageToAll(0xFF0000FF, ReasonMsg);
Kick(PlayerToKick);
}
else
SendClientMessage(playerid, 0xFF0000FF, "[BPC] Esse jogador nгo estб online.");
}
else
return 0;
}
else
return 0;
return 1;
}

Quote:

COMMAND:tele(playerid, params[])
{
// Setup local variables
new Player1, Player2, Float, Float:y, Float:z, PortMsg[128], IntID, WorldID, Name[24], AdminName[24];

// Send the command to all admins so they can see it
SendAdminText(playerid, "/tele", 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)
{

if (sscanf(params, "uu", Player1, Player2)) SendClientMessage(playerid, 0xFF0000AA, "Use: /tele [para] [id]");
else
{

// Check if player1 is online
if (APlayerData[Player1][LoggedIn] == true)
{

// Check if player2 is online
if (APlayerData[Player2][LoggedIn] == true)
{

// Get the name of the admin and the second player
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(Player2, Name, sizeof(Name));
// Get the location of the second player
GetPlayerPos(Player2, x, y, z);
IntID = GetPlayerInterior(Player2);
WorldID = GetPlayerVirtualWorld(Player2);
// Port the first player to player2's location
SetPlayerVirtualWorld(Player1, WorldID);
SetPlayerInterior(Player1, IntID);
SetPlayerPos(Player1, x, y, z + 3.0);
// Let the first player know he's been ported
format(PortMsg, 128, "{00FF00}[BPC] Vocк foi levado atй {FFFF00}%s{00FF00} por {FFFF00}%s", Name, AdminName);
SendClientMessage(Player1, 0xFFFFFFFF, PortMsg);
}
else
SendClientMessage(playerid, 0xFF0000FF, "[BPC] Jogador 2 nгo estб online.");
}
else
SendClientMessage(playerid, 0xFF0000FF, "[BPC] Jogador 1 nгo estб online.");
}
}
else
return 0;
}
else
return 0;

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

ta ae
Reply
#6

Uma pergunta, tu usa algum Filterscript??
Reply
#7

Йssa gm sei qual й, problema no plugin sscanf.
Reply
#8

Atualiza o plugin e a include "sscanf" e depois recompila seu GM.
Reply
#9

pra eu atualizar tenho q baixar uma na net?
Reply
#10

Vocк tem que pegar a mais atualizada nй, ou seja, baixar da internet.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)