SA-MP Forums Archive
What is command ZCMD and sctrmp - 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: What is command ZCMD and sctrmp (/showthread.php?tid=303416)



What is command ZCMD and sctrmp - prohp1154 - 13.12.2011

can guys tell me what is ZCMD command and scrtmp


Re: What is command ZCMD and sctrmp - Neo Karls - 13.12.2011

I think this may help you https://sampforum.blast.hk/showthread.php?tid=280387


Re: What is command ZCMD and sctrmp - TheArcher - 13.12.2011

ZCMD is a command processor which makes the command to be more faster. Strcmp in simply words is " String Compare " which checks if the string is the same typed. It's most used in commands but is more slow than ZCMD.


Re: What is command ZCMD and sctrmp - Babul - 13.12.2011

the main difference between those:

strcmp is a function, called inside the OnPlayerCommandText(), so if a command got typed, the strcmp() will get called many times until the command got found (by comparing the string until one matches).

ZCMD is a command "processor", which uses a different method to call a command. it is not utilizing the OnPlayerCommandText() callback, so there is no need to compare countless strings until a command name matches - it uses direct callbacks, one for each command. comparing those 2 methods could be called absurd, coz the more commands you have the more speed increase (in relation) is noticeable.

without any doubt, ZCMD outperforms the OnPlayerCommandText()/strcmp by far.


Re: What is command ZCMD and sctrmp - TheArcher - 13.12.2011

Quote:
Originally Posted by Babul
Посмотреть сообщение
strcmp is a function, called inside the OnPlayerCommandText().
You should check better. strcmp is not ONLY called inside OnPlayerCommantText but it's a function which compare a string.


Re: What is command ZCMD and sctrmp - prohp1154 - 13.12.2011

can you guys tell me how to get some thing in gamemode like Float X Y Z

P/s Sorry i Don't Good EngLish


Re: What is command ZCMD and sctrmp - TheArcher - 13.12.2011

Quote:
Originally Posted by prohp1154
Посмотреть сообщение
can you guys tell me how to get some thing in gamemode like Float X Y Z

P/s Sorry i Don't Good EngLish
You can use the command /save in game to get the coordinates of the current player position and you can find them in the SA:MP directory.


Re: What is command ZCMD and sctrmp - prohp1154 - 13.12.2011

what file i can get ?

SAMP.img ?


Re: What is command ZCMD and sctrmp - Sinc - 13.12.2011

Quote:
Originally Posted by TheArcher
Посмотреть сообщение
You should check better. strcmp is not ONLY called inside OnPlayerCommantText but it's a function which compare a string.
There is no doubt he understands this. Assuming he was referring to the differences of zcmd and the use of strcmp, he states that it is called within the OnPlayerCommandText callback.

Quote:
Originally Posted by TheArcher
Strcmp in simply words is " String Compare " which checks if the string is the same typed. It's most used in commands but is more slow than ZCMD.
I'm unaware of your understanding of what a command actually is. If you reference strcmp to be used in most commands, this is generally an improper way of putting this.


Re: What is command ZCMD and sctrmp - TheArcher - 13.12.2011

Quote:
Originally Posted by Sinc
Посмотреть сообщение
I'm unaware of your understanding of what a command actually is. If you reference strcmp to be used in most commands, this is generally an improper way of putting this.
I'm sure that if you go and see the gamemodes around this forum you'll find most of them using strcmp as commands.