sscanf help
#1

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 !!!!!
Reply
#2

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()
Reply
#3

i want to change "format" with "sscanf" because I belive is better and eficienter way....
Reply
#4

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?
Reply
#5

no.. but thanks anyway :X
Reply
#6

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 ..
Reply
#7

Oh ... Thanks a lot. I thought "sscanf" and "format" is the same but "sscanf" is better.
Reply
#8

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
Reply
#9

Thank you all. I appreciate your support.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)