Posts: 1,648
Threads: 482
Joined: Jun 2010
pawn Код:
if(sscanf(params, "s[32]",usage))
{
printf("USAGE: %s", usage);
SendClientMessage(playerid, COLOUR_GREY, "Usage: /trunk [usage]");
SendClientMessage(playerid, COLOUR_GREY, "Usages: Store, Get, View");
return 1;
}
Any ideas why?
Posts: 844
Threads: 32
Joined: Apr 2009
Reputation:
0
You made another thread? I doubt that's allowed, double threads for same problem... this is part of ur /trunk command problem, don't use double threads. though, wheres that [32] for, remove it, and try again.. if it doesn't work, post in the other thread.
Posts: 281
Threads: 2
Joined: Sep 2011
Posts: 1,250
Threads: 92
Joined: Mar 2011
Reputation:
0
The string is NULL when the user hasn't input any text/params.
How would it display that?
You'll only get: "USAGE: " in the console.
Posts: 1,648
Threads: 482
Joined: Jun 2010
Yes, but I've put in params.
Posts: 1,648
Threads: 482
Joined: Jun 2010
Well, the second sscanf will not display.
pawn Код:
if(sscanf(params, "s[32]",usage))
{
SendClientMessage(playerid, COLOUR_GREY, "Usage: /trunk [usage]");
SendClientMessage(playerid, COLOUR_GREY, "Usages: Store, Get, View");
}
printf("USAGE: %s", usage);
VehicleSQLID[vehicleid] = MySQL_GetValue(VehicleSQLID[vehicleid], "id", "vehicles");
if(vehicleid == TrunkOpened[playerid])
{
if(strcmp(usage, "store", true))
{
printf("USAGE: %s", usage);
if(sscanf(usage, "s[24]",item))
{
SendClientMessage(playerid, COLOUR_GREY, "Usage: /trunk store [item]");
SendClientMessage(playerid, COLOUR_GREY, "Available Items: Weapon, Weed, Cocaine, Money, Armour");
}
printf("USAGE: %s", usage);
printf("ITEM: %s", item);
Any idea why?