sscanf help - 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: sscanf help (
/showthread.php?tid=329008)
sscanf help -
Bect - 26.03.2012
How to do this ?
Код:
new sms[64];
format(sms,64,"gamemodetext %s",SCRIPT_MODE);
In sscanf ? Help please !!!
Код:
new sms[32],
sscanf("gamemodetext %s", "s[32]", sms,SCRIPT_MODE);
How to do ? + rep !!!!!
Re: sscanf help -
Plastic - 26.03.2012
What exactly do you need? Set the Gamemode name that shows up in the server lists? If thats the case i believe it is :
SetGameModeText("Test Server");
Under the callback :
public OnGameModeInit()
Re: sscanf help -
Bect - 26.03.2012
i want to change "format" with "sscanf" because I belive is better and eficienter way....
Re: sscanf help -
[ABK]Antonio - 26.03.2012
pawn Код:
CMD:changemodetext(playerid, params[]) //if it's part of a config cmd tell me and i'll make adjustments to it
{
if(!isnull(params)) SetGameModeText(params);
else return SendClientMessage(playerid, 0xCC0000AA, "Please enter text!");
return 1;
}
Something like this?
Re: sscanf help -
Bect - 26.03.2012
no.. but thanks anyway :X
Re: sscanf help -
Vince - 26.03.2012
Quote:
Originally Posted by Bect
i want to change "format" with "sscanf" because I belive is better and eficienter way....
|
format and sscanf are the exact opposite of each other ..
Re: sscanf help -
Bect - 26.03.2012
Oh ... Thanks a lot. I thought "sscanf" and "format" is the same but "sscanf" is better.
Re: sscanf help -
[ABK]Antonio - 26.03.2012
sscanf trys to find something (or multiple things)...format replaces a string with what you want - there is a difference
at least, that's how I look at it
Re: sscanf help -
Bect - 26.03.2012
Thank you all. I appreciate your support.