Problem :S Unknown Command
#1

ЎHi again to evryone! Now i have other problem

Look the video..

Unknown Command..

That's the problem...when i write /infocasa(houseinfo) or /entrar(enter) /salir(exit) the command works but it say "Unknown Command" too....
That's the code of /infocasa:

Код:
zcmd(infocasa, playerid, params[])
{
	#pragma unused params
	if(IsPlayerConnected(playerid))
	{
		for(new h = 0; h <= CASAS_MAXIMAS; h++)
		{
		  if(PlayerToPoint(PTP_RADIO, playerid, InfoCasa[h][SalidaCX], InfoCasa[h][SalidaCY], InfoCasa[h][SalidaCZ]))
			{
			  new IsLocked[24];
			  if(InfoCasa[h][BloqueadaC] == 1) { IsLocked = "Sн"; } else { IsLocked = "No"; }
			  SendClientMessage(playerid, COLOR_ROJO,"=============================[Estado de la Casa]============================");
			  SendFormattedMessage(playerid, COLOR_BLANCO, "Propietario: %s - Lujo[%d] - PrecioRenta[%dЂ] - PrecioVenta[%dЂ]", InfoCasa[h][NombreC], InfoCasa[h][LujoC], InfoCasa[h][RentaC], InfoCasa[h][VenderC]);
			  SendFormattedMessage(playerid, COLOR_BLANCO, "Bloqueada[%s] - IdCasa[%d] - CoordsSalida[X:%.4f, Y:%.4f, Z:%.4f]", IsLocked, h, InfoCasa[h][SalidaCX], InfoCasa[h][SalidaCY], InfoCasa[h][SalidaCZ]);
			  SendClientMessage(playerid, COLOR_ROJO,"============================================================================");
	 		}
	 	}
  }
	return 1;
}
Thanks
Reply
#2

Try putting a return 1; under this
pawn Код:
SendClientMessage(playerid, COLOR_ROJO,"============================================================================");
EDIT: Also remove if(IsPlayerConnected(playerid)). He cant be disconnected while doing the command lol(This was a bug at the 0.1 version)
Reply
#3

put
pawn Код:
break;
after everything is checked.
Reply
#4

Mans..i've tried remove all the
if(IsPlayerConnected(playerid))
But doesn't work too

Where i have to write "break;" ?
Reply
#5

How is PTP_RADIO defined?
Reply
#6

Quote:
Originally Posted by WackoX
How is PTP_RADIO defined?
#define PTP_RADIO 2.0

It's this..2.0
Reply
#7

Plz help me..is URGENT :S
Reply
#8

If you're using an old version of ZCMD, that will work, but if you're using 0.3.1 you have to use CMD:whatever(playerid, params[])
Reply
#9

Quote:
Originally Posted by biltong
If you're using an old version of ZCMD, that will work, but if you're using 0.3.1 you have to use CMD:whatever(playerid, params[])
If i delete the ZCMD and use if(strcmp,cmd...etc.. can function? :S
Reply
#10

Just change your command to CMD:yourcmd(playerid, params[])
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)