Strmid or Strcat or Strins?
#1

Hi all,

hi would like to know the best way to make log dialog.

Usualy i use strins

Код:
strins(menu,"\n\nblabla1", strlen(menu));
strins(menu,"\n\nblabla2", strlen(menu));
strins(menu,"\n\nblabla3", strlen(menu));
or will it better to use another way?

Same question

when i want to define payer string when the connect i use

something like this

Код:
strmid(PlayerCrimes[playerid][pkiller], "Unknow", 0, 32, 32);
will it better to use another way ?

Thank You

Max
Reply
#2

The strcat just put 2 strings / ints / floats / whatever on the same variable.

So, you could use strcat for the menu.

And for the player info, you can normally define the variable content without strins, strcat or anything else.
Reply
#3

I've heard that using strmid is faster than the simple format
pawn Код:
format( PlayerCrimes[ playerid ][ pkiller ], sizeof( PlayerCrimes[ playerid ][ pkiller ] ), "Unknow" );
About the first, in case you don't want to use "\" character, I'd go with strcat.
Reply
#4

Yes, format is slow. However;
pawn Код:
PlayerCrimes[playerid][pkiller] = "Unknown";
Should also work just fine.
Reply
#5

Ok thank you.

So i could use strcat

Max
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)