Strcmp change
#1

Hello i have an old gamemode and i have many, many command about 200 or 300. They are strcmp format and my question is how to convert them to zcmd format? I dont found nothing on internet, please help!
Reply
#2

pawn Код:
COMMAND:MYCOMMANDNAME(playerid,params[])
{
           //addyourcode here
      return 1;
}
replace if(strcmp etc.. with CMD:commandname(playerid,params
Reply
#3

I try this way but in the code i give me errors and not compile..
Reply
#4

You can do something like:

Replace Text:
Код:
if(strcmp(cmdtext, "/"
Replace With: [code]CMD:"

and then
Replace Text:
Код:
,true))
Replace With:
Код:
(playerid,params[])
Note: that your STRCMP commands may use outdated methods such as strok, so you may want to update those commands additionally.

To bring up the replace box, press CTRL+H.
Reply
#5

How to update them?
Reply
#6

Quote:
Originally Posted by dundolina
Посмотреть сообщение
How to update them?
You could start off by just reading the comments.... 2 people already gave you the right answer...

If you are already too lazy to read the comments from Abagail and Vassilis, how on earth are you gonna convert 200/300 commands? ...and that's just the header, we haven't even mentioned all converting that needs to be done to make the commands parameters work. It's gonna take you days or even weeks.
Reply
#7

Yeah, so i cant convert them?
Reply
#8

Yes you can, but with 200/300 commands it's gonna take a very long time. But creating them should have cost you at least many months too, so I assume you can image how long converting them would take.
Reply
#9

Quote:
Originally Posted by Abagail
Посмотреть сообщение
You can do something like:

Replace Text:
Код:
if(strcmp(cmdtext, "/"
Replace With: [code]CMD:"

and then
Replace Text:
Код:
,true))
Replace With:
Код:
(playerid,params[])
Note: that your STRCMP commands may use outdated methods such as strok, so you may want to update those commands additionally.

To bring up the replace box, press CTRL+H.
This is what you need to do to do it all at once without manually going through and changing everything.
Reply
#10

Quote:
Originally Posted by vassilis
Посмотреть сообщение
pawn Код:
COMMAND:MYCOMMANDNAME(playerid,params[])
{
           //addyourcode here
      return 1;
}
replace if(strcmp etc.. with CMD:commandname(playerid,params
That's your answer and converting will take time.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)