SA-MP Forums Archive
sscanf wierd problem - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: sscanf wierd problem (/showthread.php?tid=186051)



sscanf wierd problem - armyoftwo - 27.10.2010

Код:
COMMAND:createvehicle(playerid, params[])
{
	print("wtf");
	new    model;
	new    price;
	new    buyable;
	new    rent;
	new    faction;
	new    crew;
	new    job;
	new    color1;
	new    color2;
	print("wtf1");
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Only admins allowed to use this command");
    print("wtf2");
	if(sscanf(params, "iiiiiiiii", model, price, buyable, rent, faction, crew, job, color1, color2)) return SendError(playerid, "USAGE: /createvehicle <model> <price> <buyprice> <rent> <faction> <crew> <job> <color1> <color2>  - Buy Price: If the vehicle won't be buyable set it to -1, Rent: Same with buy price, Faction: Same, Crew: Same, Job:Same, Color- Read wiki");
      CreateVehicleEx(playerid, model, price, buyable, rent, faction, crew, job, color1, color2);
      print("wtf3");
      SendFormattedMessage(playerid, COLOR_YELLOW, "Vehicle Model: %d has been created!", model);
      print("wtf4");
      return 1;
}
when i type /createvehicle it doesn't show the command syntax...
But for other commands it shows the syntax


Re: sscanf wierd problem - Calgon - 27.10.2010

SA-MP has a limit for how many characters can be used in client messages (which is 128 characters), your client message appears to be using 237 characters (assuming that 'SendError()' sends a client message).


Re: sscanf wierd problem - armyoftwo - 27.10.2010

Thanks, solved.