SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 27/05/2019, 12:00 PM   #11
Kasichok
Big Clucker
 
Kasichok's Avatar
 
Join Date: Sep 2018
Location: weed farm
Posts: 53
Reputation: 24
Default Re: Changing the Unknown Command with ZCMD

maybe the problem is with SendMessage
__________________



STRESSED? TRY KASICHOK AND RELAX


Kasichok is offline   Reply With Quote
Old 27/05/2019, 12:37 PM   #12
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 410
Reputation: 13
Default Re: Changing the Unknown Command with ZCMD

solved
Jaua10 is offline   Reply With Quote
Old 27/05/2019, 05:14 PM   #13
TheToretto
Gangsta
 
TheToretto's Avatar
 
Join Date: Jul 2015
Posts: 593
Reputation: 66
Default Re: Changing the Unknown Command with ZCMD

Quote:
Originally Posted by Jaua10 View Post
solved
What was it?
__________________






Toretto#9902

Rest in peace grandpa, 03 November 2018
TheToretto is offline   Reply With Quote
Old 27/05/2019, 07:24 PM   #14
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 410
Reputation: 13
Default Re: Changing the Unknown Command with ZCMD

Quote:
Originally Posted by TheToretto View Post
What was it?
The text was too long, and did not show the dialogue. Then I tried to use the \ n and it did not work so I opted to put a small dialog, unless there is another way
Jaua10 is offline   Reply With Quote
Old 27/05/2019, 09:22 PM   #15
KevTheJoker
Little Clucker
 
KevTheJoker's Avatar
 
Join Date: Dec 2018
Posts: 42
Reputation: 1
Default Re: Changing the Unknown Command with ZCMD

Use this:
PHP Code:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if(!
success)
    {
        
SendClientMessage(playerid"Unknown Command. Use /help for the available commands.");
    }
    return 
1;

You can replace the "Unknown Command. Use /help for the available commands." with anything you want, since zcmd supports SendClientMessage
KevTheJoker is offline   Reply With Quote
Old 27/05/2019, 09:46 PM   #16
TheToretto
Gangsta
 
TheToretto's Avatar
 
Join Date: Jul 2015
Posts: 593
Reputation: 66
Default Re: Changing the Unknown Command with ZCMD

Quote:
Originally Posted by KevTheJoker View Post
Use this:
PHP Code:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if(!
success)
    {
        
SendClientMessage(playerid"Unknown Command. Use /help for the available commands.");
    }
    return 
1;

You can replace the "Unknown Command. Use /help for the available commands." with anything you want, since zcmd supports SendClientMessage
Invalid Syntax, needs the color argument + "since zcmd supports SendClientMessage" means nothing at all..
__________________






Toretto#9902

Rest in peace grandpa, 03 November 2018
TheToretto is offline   Reply With Quote
Old 27/05/2019, 10:24 PM   #17
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 410
Reputation: 13
Default Re: Changing the Unknown Command with ZCMD

Quote:
Originally Posted by TheToretto View Post
Invalid Syntax, needs the color argument + "since zcmd supports SendClientMessage" means nothing at all..
I cant use this cuz i have two languageson my server

This is what i have:

PHP Code:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if(!
success) return SendMessage(playeridCOLOR_WHITE"{FF0000}ADVERTENCIA: {FFFFFF}Este comando no existe. Usa {0092FF}/ayuda {FFFFFF}para ver la lista de comandos.",
                                                           
"{FF0000}WARNING: {FFFFFF}That command doesn't exist. Use {0092FF}/help {FFFFFF}to see a list of commands.");
    return 
1;

and works but i would like to put use this but shows me nothing IG and idk why maybe the characters...but when i use n still not working:

PHP Code:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if(!
success)SendMessage(playerid,COLOR_WHITE,"{FF0000}ADVERTENCIA: {FFFFFF}Este comando no existe. Usa {0092FF}/ayuda {FFFFFF}para ver la lista de comandos o {0092FF}(/n)ovato + [ Tu pregunta ]{FFFFFF}para preguntas relacionadas con el servidor.",{FFFFFF}para preguntas relacionadas con el servidor y espere a que un AdministradorModeradorAyudante o Jugador te ayude.
                                                    
"{FF0000}WARNING: {FFFFFF}That command doesn't exist. Use {0092FF}/help {FFFFFF}to see a list of commands or {0092FF}(/n)ewbie + [ Your question ]{FFFFFF}for server related questions.");{FFFFFF}for server related questions and wait for an AdminModeratorHelper or Player to help you.
    return 
1;

Jaua10 is offline   Reply With Quote
Old 27/05/2019, 11:06 PM   #18
TheToretto
Gangsta
 
TheToretto's Avatar
 
Join Date: Jul 2015
Posts: 593
Reputation: 66
Default Re: Changing the Unknown Command with ZCMD

Curly braces ==> lots of code inside, two SendMessage function in your case.
__________________






Toretto#9902

Rest in peace grandpa, 03 November 2018
TheToretto is offline   Reply With Quote
Old 28/05/2019, 12:00 AM   #19
Jaua10
Huge Clucker
 
Join Date: Apr 2011
Posts: 410
Reputation: 13
Default Re: Changing the Unknown Command with ZCMD

What would be the right way? If i use \n in that two sendmessage why still not working?
Jaua10 is offline   Reply With Quote
Old 28/05/2019, 12:26 AM   #20
TheToretto
Gangsta
 
TheToretto's Avatar
 
Join Date: Jul 2015
Posts: 593
Reputation: 66
Default Re: Changing the Unknown Command with ZCMD

Quote:
Originally Posted by Jaua10 View Post
What would be the right way? If i use \n in that two sendmessage why still not working?
I answered you in my last post, and no the function does not work like that, you can't skip lines.
__________________






Toretto#9902

Rest in peace grandpa, 03 November 2018
TheToretto is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Unknown Command zrelly Scripting Help 2 29/09/2013 02:34 PM
zcmd, unknown command? niels44 Scripting Help 7 23/10/2012 04:04 PM
Executed ZCMD command returns SERVER: Unknown Command SexTourist Scripting Help 12 03/01/2012 03:38 PM
changing server unknown command help hadzx Help Archive 1 30/10/2010 04:36 PM


All times are GMT. The time now is 12:40 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.