Is there Anyway to convert zcmd to strpcmd ?
#1

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..
Reply
#2

Yes. It's STRCMP not STRPCMD but nevermind. You need strtok also.
Reply
#3

Are you mad? Why would you do that?
Reply
#4

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'.
Reply
#5

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 -.-
Reply
#6

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
Reply
#7

It is not "strcmd" it's "strcmp."

Why the hell would you want to change from ZCMD? You should be changing to ZCMD!
Reply
#8

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 ?:/
Reply
#9

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.
Reply
#10

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.
Reply
#11

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.
Reply
#12

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..
Reply
#13

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.
Reply
#14

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
Reply
#15

Aight Mates, Thank you
Reply
#16

I doubt you have 1000 plus commands. You are probably at a few hundred maximum.
Reply
#17

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?
Reply
#18

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*.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)