Is there Anyway to convert zcmd to strcmp ? -
ElieJabbour - 17.08.2011
Example :
pawn Код:
command(gotoint, playerid, params[])
{
new Interior, Float: X, Float: Y, Float: Z;
if( sscanf( params, "dfff", Interior, X, Y, Z ) )
{
if (PlayerInfo[playerid][pAdmin] >= 4)
{
SendClientMessage( playerid, COLOR_SYN, "[Syntax:]{FFFFFF} /gotoint [Interior ID] [x point] [y point] [z point]" );
}
}
else
{
if (PlayerInfo[playerid][pAdmin] >= 4)
{
SetPlayerPos( playerid, X, Y, Z );
SetPlayerInterior( playerid, Interior );
SendClientMessage( playerid, COLOR_SMSG, "[Server:]{FFFFFF} You have been teleported to the defined position." );
}
}
return 1;
}
Haven't tried it before..
Re: Is there Anyway to convert zcmd to strpcmd ? -
sleepysnowflake - 17.08.2011
Yes. It's STRCMP not STRPCMD but nevermind. You need strtok also.
Re: Is there Anyway to convert zcmd to strpcmd ? -
linuxthefish - 17.08.2011
Are you mad? Why would you do that?
Re: Is there Anyway to convert zcmd to strpcmd ? -
Kush - 17.08.2011
Quote:
Originally Posted by linuxthefish
Are you mad? Why would you do that?
|
He's claiming he doesn't use a Godfather edit, he's using "his scratch server". So it apparently seems like he's found that code some-where and want to implement it into 'his script'.
Re: Is there Anyway to convert zcmd to strpcmd ? -
ElieJabbour - 17.08.2011
Quote:
Originally Posted by Berlovan
Yes. It's STRCMP not STRPCMD but nevermind. You need strtok also.
|
I Know what it is, Check out my keyboard.
Quote:
Originally Posted by linuxthefish
Are you mad? Why would you do that?
|
Dude, What do you care ? I wanna Convert some shits to strcmd -.-
Re: Is there Anyway to convert zcmd to strpcmd ? -
ElieJabbour - 17.08.2011
Quote:
Originally Posted by Kush
He's claiming he doesn't use a Godfather edit, he's using "his scratch server". So it apparently seems like he's found that code some-where and want to implement it into 'his script'.
|
(( Soz for double post ))
Yep, I took this code from a godfather edit, and my script is strcmd, now stop spamming my thread if you don't wanna help, Tyvm
Re: Is there Anyway to convert zcmd to strpcmd ? -
Scenario - 17.08.2011
It is not "strcmd" it's "strcmp."
Why the hell would you want to change from ZCMD? You should be changing to ZCMD!
Re: Is there Anyway to convert zcmd to strpcmd ? -
ElieJabbour - 17.08.2011
Quote:
Originally Posted by RealCop228
It is not "strcmd" it's "strcmp."
Why the hell would you want to change from ZCMD? You should be changing to ZCMD!
|
Won't it be hard or take some time to change the whole script from strcmp to zcmd ?:/
Re: Is there Anyway to convert zcmd to strpcmd ? -
Kush - 17.08.2011
Quote:
Originally Posted by ElieJabbour
Won't it be hard or take some time to change the whole script from strcmp to zcmd ?:/
|
I've never understood strcmp for use as a function to return commands and probably never will. If your using a gamemode (presumably Godfather), change to Vortex 2. You will not only learn, but see how efficient and easy scripting is.
Re: Is there Anyway to convert zcmd to strpcmd ? -
ElieJabbour - 17.08.2011
Quote:
Originally Posted by Kush
I've never understood strcmp for use as a function to return commands and probably never will. If your using a gamemode (presumably Godfather), change to Vortex 2. You will not only learn, but see how efficient and easy scripting is.
|
I know its Easy, and mine isn't a Godfather edit, i used strcmp and i needed the /gotoint cmd from another edit, and its zcmd, so i needed to convert it.
Re: Is there Anyway to convert zcmd to strpcmd ? -
Scenario - 17.08.2011
Quote:
Originally Posted by ElieJabbour
Won't it be hard or take some time to change the whole script from strcmp to zcmd ?:/
|
You don't need to be a genius to change the command processor for some commands. Once you learn how to use
sscanf then it should be very easy to change your
strcmp commands to
ZCMD. It would be pointless to change command processors and use the same functions, such as
strtok.
Re: Is there Anyway to convert zcmd to strpcmd ? -
ElieJabbour - 17.08.2011
Quote:
Originally Posted by RealCop228
You don't need to be a genius to change the command processor for some commands. Once you learn how to use sscanf then it should be very easy to change your strcmp commands to ZCMD. It would be pointless to change command processors and use the same functions, such as strtok.
|
Dude, I got it, But the thing is its gonna take me some time to change every command, 1000+ cmds to zcmd, and Cntrl+H won't even help aswell..
Re: Is there Anyway to convert zcmd to strpcmd ? -
sleepysnowflake - 17.08.2011
ZCMD is faster, better than STRCMP ... It is worth the time. You should change from STRCMP to ZCMD. Trust me, You don't need a lot of changes.
Re: Is there Anyway to convert zcmd to strpcmd ? -
TouR - 17.08.2011
Quote:
Originally Posted by ElieJabbour
Dude, I got it, But the thing is its gonna take me some time to change every command, 1000+ cmds to zcmd, and Cntrl+H won't even help aswell..
|
No pain no gain... Many guys turned whole roleplay scripts to zcmd. It will take a lot time but it worths
Re: Is there Anyway to convert zcmd to strpcmd ? -
ElieJabbour - 17.08.2011
Aight Mates, Thank you
Re: Is there Anyway to convert zcmd to strpcmd ? -
Scenario - 18.08.2011
I doubt you have 1000 plus commands. You are probably at a few hundred maximum.
Re: Is there Anyway to convert zcmd to strpcmd ? -
Kingunit - 18.08.2011
Quote:
Originally Posted by ElieJabbour
Won't it be hard or take some time to change the whole script from strcmp to zcmd ?:/
|
There is a filterscript to convert STRCMP to ZCMD. So what is your problem sir?
Re: Is there Anyway to convert zcmd to strpcmd ? -
Kush - 18.08.2011
Quote:
Originally Posted by RealCop228
I doubt you have 1000 plus commands. You are probably at a few hundred maximum.
|
You mean he's probably 'with the Godfather' *cough*.