SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 05/07/2019, 07:28 PM   #1
Henriquemm
Little Clucker
 
Join Date: Jun 2016
Posts: 26
Reputation: 0
Default zcmd

The question in question is as follows.
in strcmp would use so
Code:
format(gstring,sizeof(gstring),"/logar %s",inputtext);
            OnPlayerCommandText(playerid,gstring);
and in zcmd would look like?
Code:
format(gstring,sizeof(gstring),"/logar %s",inputtext);
            cmd_logar(playerid, "");
I think it would not work because in strcmp it checks the / logar command plus inputtext in case what the player typed and performs the command, but as it has parameters in zcmd I do not know how to make the same code work ..

If you can help, thank you!

thanks!
thanks!..
Henriquemm is offline   Reply With Quote
Old 05/07/2019, 07:32 PM   #2
Symon
Gangsta
 
Symon's Avatar
 
Join Date: Apr 2019
Location: Italy
Posts: 819
Reputation: 68
Default Re: zcmd

I don't know what "logar" means but params in zcmd works in this way:

pawn Code:
CMD:report(playerid, params[])
{
    new id, reason[128];

    if(sscanf(params, "rs[128]", id, reason)) return SendClientMessage(playerid, -1, "USAGE: /report [playerid/name] [reason]");

    SendClientMessage(playerid, -1, "You have reported successfully this player.");
    return 1;
}

You need sscanf tho.

https://forum.sa-mp.com/showthread.php?t=570927
__________________


"A server owner shouldn't be embarrassed or have fear to request help, because we're humans and we never stop learning."
Symon is offline   Reply With Quote
Old 05/07/2019, 07:47 PM   #3
Henriquemm
Little Clucker
 
Join Date: Jun 2016
Posts: 26
Reputation: 0
Default Re: zcmd

well, that would not be it
would have some way to run the function like this?
look well
HTML Code:
formato (gstring, sizeof (gstring), "%s", inputtext);
            cmd_logar (playerid, "inputtext");
or
formato (gstring, sizeof (gstring), "%s", inputtext);
            cmd_logar (playerid, "gstring");
Henriquemm is offline   Reply With Quote
Old 05/07/2019, 09:54 PM   #4
TheToretto
Gangsta
 
TheToretto's Avatar
 
Join Date: Jul 2015
Posts: 585
Reputation: 66
Default Re: zcmd

pawn Code:
cmd_logar(playerid, gstring);
__________________






Toretto#9902

Rest in peace grandpa, 03 November 2018
TheToretto is offline   Reply With Quote
Old 05/07/2019, 09:59 PM   #5
1sbedx
Huge Clucker
 
Join Date: Dec 2015
Posts: 282
Reputation: 39
Default Re: zcmd

https://forum.sa-mp.com/showpost.php...43&postcount=2
1sbedx is offline   Reply With Quote
Old 06/07/2019, 03:23 PM   #6
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,772
Reputation: 854
Default Re: zcmd

pawn Code:
cmd_logar(playerid, inputtext);
__________________

Follow me on Github: Follow me on Spotify: Donate on Paypal:

Gammix 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
[Include] [I-ZCMD]Improved ZCMD - Fastest Command Processor Yashas Includes 101 28/12/2018 08:12 PM
[Tutorial] STRCMP and ZCMD - how to change your commands to ZCMD Swyft Tutorials 12 14/01/2015 09:58 PM
Looking for a zcmd alternative, or the latest zcmd. [REP++] Hoborific Scripting Help 4 09/05/2013 03:53 PM
zcmd help PLZ Zach7 Scripting Help 3 08/08/2012 02:24 PM
Need Help ZCMD [C:\server\pawno\include\ZCMD.inc:85] TheB0ss123 Scripting Help 0 28/06/2012 03:35 AM


All times are GMT. The time now is 01:37 AM.


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