Problem :S Unknown Command -
R3SpaWn3 - 11.04.2010
Ў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
Re: Problem :S Unknown Command -
Dark_Kostas - 11.04.2010
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)
Re: Problem :S Unknown Command -
MenaceX^ - 11.04.2010
put
after everything is checked.
Re: Problem :S Unknown Command -
R3SpaWn3 - 11.04.2010
Mans..i've tried remove all the
if(IsPlayerConnected(playerid))
But doesn't work too
Where i have to write "break;" ?
Re: Problem :S Unknown Command - WackoX - 11.04.2010
How is PTP_RADIO defined?
Re: Problem :S Unknown Command -
R3SpaWn3 - 11.04.2010
Quote:
Originally Posted by WackoX
How is PTP_RADIO defined?
|
#define PTP_RADIO 2.0
It's this..2.0
Re: Problem :S Unknown Command -
R3SpaWn3 - 11.04.2010
Plz help me..is URGENT :S
Re: Problem :S Unknown Command -
biltong - 11.04.2010
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[])
Re: Problem :S Unknown Command -
R3SpaWn3 - 11.04.2010
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
Re: Problem :S Unknown Command -
biltong - 11.04.2010
Just change your command to CMD:yourcmd(playerid, params[])