08.05.2010, 07:17
I have this command for creating a property ingame:
The function "CreateProperty" also creates a 3DTextLabel for the property for information purposes. However, when creating the property .. I can't use spaces in the name? Why not? I mean .. I see the problem .. with sscanf, but how do I solve it?
How do I make it so you can use spaces in the name.
pawn Код:
CMD:createprop(playerid, params[])
{
if(PlayerInfo[playerid][Level] >= 4)
{
new Propnick, Float:X, Float:Y, Float:Z, Value, Earning, string[128];
GetPlayerPos(playerid, X, Y, Z);
if(sscanf(params, "s[64]dd", Propnick, Value, Earning)) return SendClientMessage(playerid, Red, "USAGE: /createprop [Name] [Cost] [Earning]");
CreateProperty(Propnick, X, Y, Z, Value, Earning); // Line 3181
format(string, sizeof(string), "* Successfully created the property %s", Propnick);
SendClientMessage(playerid, MAD_WHITE, string);
return 1;
} else return 0;
}
How do I make it so you can use spaces in the name.