How can i? - 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: How can i? (
/showthread.php?tid=585395)
How can i? -
Viki - 13.08.2015
hey i wanted to ask how can i make a cmd of when a player types a wrong cmd instead of saying ''Sever unkown command'' it should say unkown command type /cmds to see list of cmds.
Re: How can i? -
lanix - 13.08.2015
return SendClientMessage(playerid,COLOR,"This type your message !");
put under return 0; on player command text
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
{
// Do something here
return 1;
}
return SendClientMessage(playerid,COLOR,"This type your message !");
}
Re: How can i? -
bensmart469 - 13.08.2015
What command processor do you use? ZCMD? DCMD? SA:MP default? Each one has a different way.
Re: How can i? -
Viki - 13.08.2015
I mostly use zcmd,its easy for me
Re: How can i? -
lanix - 13.08.2015
Here for ZCMD
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid,RED,"This Command does not exist!");
return true;
}
Re : Re: How can i? -
anassmaroc - 13.08.2015
Quote:
Originally Posted by lanix
Here for ZCMD
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid,RED,''Sever unkown command'");
return true;
}
|
Edited
Re: How can i? -
lanix - 13.08.2015
From my Balkan server,lol
Re: How can i? -
Viki - 14.08.2015
well RIP For me there is a error -_-
Код:
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(747) : error 017: undefined symbol "RED"
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(747) : error 017: undefined symbol "Sever"
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(747) : error 017: undefined symbol "unkown"
C:\Users\Waqar\Desktop\z\The Ultimate Freeroam\gamemodes\freeroam.pwn(747) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
http://i.imgur.com/pNj5woM.png
Re: How can i? -
Andre02 - 14.08.2015
put
with the other Defines on the top of your script
and
change from ' ' to "
Re: How can i? -
Viki - 14.08.2015
thanks andre it worked can someone tell me how this little code can do that i mean now whenever i type it wrongit will say that but how?
Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid,RED,''Sever unkown command'");
return true;
}
thanks