ID's Bugados! -
#Luca[S]. - 14.01.2015
Pessoal, hoje liguei meu server quando tentei usar alguns comandos com o ID 2 do server e nгo ia a verificaзгo tб la
pawn Code:
if (IsPlayerConnected(OtherPlayer))
mas sempre o ID 2 fica bugado Exemplo:
Se eu tentar mandar uma Mensagem Privada ou algo do tipo pro id 2 Fala q nгo estб onnline:
Alguem sabe o que й?
Re: ID 2... Bugado! -
WLSF - 14.01.2015
Cуdigo que vocк estб usando e estб com problema ?
Tenta escrever direito, tб ficando enrolado a sua explicaзгo...
Re: ID 2... Bugado! -
JonathanFeitosa - 14.01.2015
Ah sim cara tб bugado e vocк sу manda o code de verificar se o Player estб online?
Se funcionar Pro ID 0, 1,3.. Й lуgico que vai funcionar pro 2. Verifica se a conta dele ta bugada ou se ele realmente nгo se conectou.
Re: ID 2... Bugado! -
#Luca[S]. - 16.01.2015
Quando tento usar um comando de /ir Exemplo alguns ids fica bugado.. Tipo: Eu vou no ID 1.. Vai normal.. Eu Vou no ID 2 Vai normal.. Eu Vou no ID 0 Fala que nгo ta on-line.. Sendo que o ID 0 Estб onnline..
Preciso muito Disso..
UP!
Re: ID 2... Bugado! -
JonathanFeitosa - 16.01.2015
Manda comando /ir
Re: ID 2... Bugado! -
#Luca[S]. - 16.01.2015
Quote:
Originally Posted by JonathanFeitosa
Manda comando /ir
|
O Problema nгo й no Comando /ir Isso espalha em outros comandos tmb.. Todos os comandos que usam sscanf pra poder pegar o ID do Player Dб isso.. Fala que nгo ta on-line sendo que estб.
UP!
Re: ID 2... Bugado! -
JonathanFeitosa - 16.01.2015
Atualiza o sscanf.
Mesmo assim manda o comando pra gente analisar filho.
Re: ID 2... Bugado! -
#Luca[S]. - 16.01.2015
Quote:
Originally Posted by JonathanFeitosa
Atualiza o sscanf.
Mesmo assim manda o comando pra gente analisar filho.
|
sscanf ja estб atualizada.
pawn Code:
COMMAND:ir(playerid, params[])
{
// Setup local variables
new OtherPlayer, Float:x, Float:y, Float:z, PortMsg[128], IntID, WorldID;//, Name[24];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/ir", params);
//GetPlayerName(OtherPlayer, Name, sizeof(Name));
// 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, "{20C247}Vocк foi ate o Jogador.");
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;
}
Re: ID 2... Bugado! -
[BOPE]Seu._.Madruga - 16.01.2015
Nгo estб dando para eu ver pois estou pelo nxtl, mas creio que se a sscanf nao estiver desatualizada й comando criado errado.
Porem acho que voce deveria alterar seu codigo usando assim:
PHP Code:
if(sscanf(params, "u", OtherPlayer)) return SendClientMessage(playerid, 0xFF0000AA, "Use: /ir [id]");
if(!IsPlayerConnected(OtherPlayer)) return SendClientMessage(playerid, 0xFF0000AA, "Este player nгo estб conectado!");
GetPlayerPos(OtherPlayer, x, y, z);
Re: ID 2... Bugado! -
JonathanFeitosa - 16.01.2015
Por que vocк estб retornando as sentenзas a 0? Nгo utilizou return em alguns casos tambйm. Refaz esse comando, ver uns tutoriais de sscanf.
Re: ID 2... Bugado! -
#Luca[S]. - 17.01.2015
Quote:
Originally Posted by JonathanFeitosa
Por que vocк estб retornando as sentenзas a 0? Nгo utilizou return em alguns casos tambйm. Refaz esse comando, ver uns tutoriais de sscanf.
|
Cara, nгo й sу nesses comandos й em todos os comandos que tem o uso de [ID] Fica aparecendo q o jogador estб offline.. Alguem me Ajuda Por Favor..
UP!