Create3DTextProblem problem.
#1

Hey, guys. I'm building my own business system, and there is one problem.
I have created a function, witch change business name. Everythings included GUI.
So. Then i changed business name to, for example "Forum Support", it's shows:
Quote:

Business: `

But it should to look like:
Quote:

Business: Forum Support

Maybe the string too little? It's
Код:
new msg[258];
Is it good enough?

Any ideas?
Reply
#2

Код:
    new NewName[258];
	if(sscanf(inputtext,"u",NewName)) return ShowPlayerDialog(playerid,36,DIALOG_STYLE_INPUT,"Business.","Type business name.","Create","Close");
	new file[258],NewOwner[MAX_PLAYER_NAME],msg[128];
    GetPlayerName(playerid,NewOwner,MAX_PLAYER_NAME);
	for(new i=0;i<MaxBusiness+1;i++){
	if(IsPlayerInRangeOfPoint(playerid,IejimuR,verslasDB[i][X],verslasDB[i][Y],verslasDB[i][Z])){
    verslasDB[i][name] = NewName;
	dini_Set(file,"Name",NewName);
	verslasDB[i][owner] = NewOwner;
	dini_Set(file,"Owner",NewOwner);
	Delete3DTextLabel(Business3D[i]);
	format(msg,128,"Bussines \"%s\"\nOwner: %s.",verslasDB[i][name],verslasDB[i][owner]);
	Business3D[i] = Create3DTextLabel(msg,Verslo3DSpalva,verslasDB[i][X],verslasDB[i][Y],verslasDB[i][Z],Distance3D,AllowTransparent);
Reply
#3

bump.
Still didn't solved.
Reply
#4

You're using sscanf wrong

https://sampwiki.blast.hk/wiki/Fast_Commands#Data_types
Reply
#5

You can only bump after 12 hours, it's only been 1 hour.

I thought that the 'u' parameter in sscanf was only for players. Change it to 's'
Reply
#6

Joe Staff, thanks for alerting.
Ant thanks you both.
Fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)