18.06.2015, 23:31
Hi guys. So i'm trying to understand how sscanf works , but i can't figure it out.... I know c++ and over 5 other languages.
Let's take an example. Let's say i want a command "/say [text]" . When player type this, the text after "/say" should appear on chat. How to do that?
CMD: say(playerid,params[]){
new text; //I define a variable to be our text
//Now how to give this variable that value?
}
Please someone post this command solved.
Another thing is , what does a function like this do ?
CMD: say(playerid,params[]){
new text;
if (sscanf(params,"s",text)){ return SendClientMessage(playerid,COLOR_RED,"respond");}}
When does this SendClientMessage command trigger? I see no indications.
Someone please help. Thanks
Let's take an example. Let's say i want a command "/say [text]" . When player type this, the text after "/say" should appear on chat. How to do that?
CMD: say(playerid,params[]){
new text; //I define a variable to be our text
//Now how to give this variable that value?
}
Please someone post this command solved.
Another thing is , what does a function like this do ?
CMD: say(playerid,params[]){
new text;
if (sscanf(params,"s",text)){ return SendClientMessage(playerid,COLOR_RED,"respond");}}
When does this SendClientMessage command trigger? I see no indications.
Someone please help. Thanks