SA-MP Forums Archive
About Strings - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: About Strings (/showthread.php?tid=120028)



About Strings - SlashPT - 10.01.2010

Hey all im having my server a bit slow in connection (its GM issues) and i have a question i have multipe Strings for example in command /race i have one string and on command /kill i have other it puts my GM slow right?


Re: About Strings - jonrb - 10.01.2010

That is possible, also timers can cause slowness; if you find that timers slow down your server try increase the time between each time they are called

Having too much code on frequently-called functions such as OnPlayerUpdate can also cause slowness

hope that helped


Re: About Strings - Grim_ - 10.01.2010

If you have an often repeated variable (like you said string), just make one global varaible of it. (Create it before main() ).


Re: About Strings - SlashPT - 10.01.2010

oh can i do it for example i have

this is only examples

Код:
format(string,sizeof(string),"You paited the car with the colour: Yellow"); SendClientMessage(playerid,Castanho_Mecanico,string);
format(string2,sizeof(string2),"He painted the car"); SendClientMessage(playerid,Castanho_Mecanico,string2);
can i change to

Код:
format(string,sizeof(string),"You paited the car with the colour: Yellow"); SendClientMessage(playerid,Castanho_Mecanico,string);
format(string,sizeof(string),"He painted the car"); SendClientMessage(playerid,Castanho_Mecanico,string);
i changed the strings