SA-MP Forums Archive
asking about sscanf - 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: asking about sscanf (/showthread.php?tid=447905)



asking about sscanf - xFirex - 02.07.2013

pawn Код:
CMD:createevent(playerid,params[])
{
 new string[128];
 new strings[128];
 format(string, sizeof(string), "Event : %s Already Started !", eventname);
 format(strings, sizeof(strings), "Event : %s Already Created !", eventname);
 if(IsEventStarted == 1) return SendClientMessage(playerid,-1,string);
 if(IsEventCreated == 1) return SendClientMessage(playerid,-1,string);
 if(sscanf(params,"s[32]i",eventname,eventprice)) return  SendClientMessage(playerid,-1,"Syntx: /createevent <event name> <price>");
 {
  GetPlayerPos(playerid,XX,YY,ZZ);
  new str[128];
  format(str, sizeof(str), "You Was Created Event Name : %s With %d Price !", eventname,eventprice);
  SendClientMessage(playerid,-1,str);
  IsEventCreated = 1;
 }
 return 1;
}
and it say [15:45:11] You Was Created Event Name : 1дeл With 1 Price ! help ?


Re: asking about sscanf - Goldilox - 02.07.2013

I actually didn't get your question, could you please elaborate?


Re: asking about sscanf - Misiur - 02.07.2013

Could you show us your declaration of eventname string?