Can't use spaces in property name?! - 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: Can't use spaces in property name?! (
/showthread.php?tid=146583)
Can't use spaces in property name?! -
dcmd_crash - 08.05.2010
I have this command for creating a property ingame:
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;
}
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.
Re: Can't use spaces in property name?! -
RyDeR` - 08.05.2010
You have to set string as last.
Like this « /createprop [cost] [earning] [name] »
Re: Can't use spaces in property name?! -
dcmd_crash - 08.05.2010
Quote:
Originally Posted by » RyDeR «
You have to set string as last.
Like this « /createprop [cost] [earning] [name] »
|
Thanks so much

!