SA-MP Forums Archive
Whats more efficiant - 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)
+--- Thread: Whats more efficiant (/showthread.php?tid=525554)



Whats more efficiant - SeniorGamer - 12.07.2014

I always wondered what is more efficiant

Код:
CMD:kick(playerid,params[],help)
{
	new reason[64],stringA[128],stringB[128];
	//sscanf check etc...
	format(stringA,sizeof(stringA), "%s have kicked %s",Name(playerid),Name(otherplayer));
	SendClientMessageToAll(COLOR,stringA);
	format(stringB,sizeof(stringB), "You have been kicked by %s",Name(playerid));
	SendClientMessage(otherplayerid,COLOR,stringB);
	return 1;
}
or with 1 string only


Код:
CMD:kick(playerid,params[],help)
{
	new reason[64],string[128];
	//sscanf check etc...
	format(string,sizeof(string), "%s have kicked %s",Name(playerid),Name(otherplayer));
	SendClientMessageToAll(COLOR,string);
	format(string,sizeof(string), "You have been kicked by %s",Name(playerid));
	SendClientMessage(otherplayerid,COLOR,string);
	return 1;
}



Re: Whats more efficiant - BroZeus - 12.07.2014

ofc with 1 string
reduces the mem usage


Re: Whats more efficiant - Ada32 - 12.07.2014

your machine doesn't care..