SERVER: Unknown Command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SERVER: Unknown Command (
/showthread.php?tid=630842)
SERVER: Unknown Command -
Jihanz - 19.03.2017
Help, I'm using this code and a bug occurs. This command only work with the player on first login, it doesn't work with any players.
this is my command
PHP код:
CMD:mine(playerid,params[])
{
if(!IsPlayerInRangeOfPoint(playerid,mInfo[playerid][radius],mInfo[playerid][m_x],mInfo[playerid][m_y],mInfo[playerid][m_z])) return SendClientMessage(playerid,warna_merah,"Sedang tidak di area miner");
if(MinerPlayer[playerid][Mining] == 1) return SendClientMessage(playerid,-1,"Ayo Bekerja....");
StartMine(playerid);
return 1;
}
Re: SERVER: Unknown Command -
IceWizz - 19.03.2017
you have errors?
Re: SERVER: Unknown Command -
Jihanz - 19.03.2017
Quote:
Originally Posted by IceWizz
you have errors?
|
my script cannot error because i compile not problem its fine...
Re: SERVER: Unknown Command -
coool - 19.03.2017
Have you mixed two command processors?
Re: SERVER: Unknown Command -
Jihanz - 19.03.2017
Quote:
Originally Posted by coool
Have you mixed two command processors?
|
PHP код:
#include <a_samp>
#include <YSI\y_ini>
#include <streamer>
#include <progressBar2>
#include <zcmd>
#include <sscanf2>
#include <foreach>
i use this Include.. and command procesor
Re: SERVER: Unknown Command -
Toroi - 19.03.2017
https://sampforum.blast.hk/showthread.php?tid=91354
Quote:
Код:
OnPlayerCommandPerformed(playerid, cmdtext[], success)
And this one gets called after command execution, here if you do "return 0" the player will see standard "Unknown command" message. The "success" parameter is equal to value returned by command function returns (if it doesn't exist success will be 0).
Note that it's not necessary to add these callbacks to your script if you don't use them.
|
Do you have this callback somewhere in your gamemode? If so, check if it's returning the value 1, if so, change it for zero.
Re: SERVER: Unknown Command -
Jihanz - 19.03.2017
Quote:
Originally Posted by Troydere
|
Thanks Alot sir