SA-MP Forums Archive
Can Any One Help Me to fix this? - 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)
+--- Thread: Can Any One Help Me to fix this? (/showthread.php?tid=629673)



Can Any One Help Me to fix this? - Bojaa - 02.03.2017

Hello I have a problem On cmd of business system can any one help me?
the prob is the cmd not working it cmd:editbizname im mena with not working the biz description not changed but the just i see the dialog ..
PHP код:
CMD:editbizname(playerid)
{
    for(new 
biz 0biz MAX_BIZbiz++)
    {
         if(
IsPlayerInRangeOfPoint(playerid10BizInfo[biz][IXCoord], BizInfo[biz][IYCoord], BizInfo[biz][IZCoord]))
           {
             if(
GetPlayerVirtualWorld(playerid) == BizInfo[biz][VW])
               {
                 if(!
strcmp(BizInfo[biz][Owner], GetPlayerNameEx(playerid), true))
                   {
                     
ShowPlayerDialog(playeridBIZ_NAMEDIALOG_STYLE_INPUT"Business Management""Change Business Name""Confirm""Cancel");
                     
BizIDS[playerid] = biz;
                }
                else
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"You're not in your business.");
                }
            }
        }
    }
    return 
1;

And This Is the Dialog plz any one tell me what is wrong?
PHP код:
 if(dialogid == BIZ_NAME)
    {
         new 
bizid BizIDS[playerid], string28[150];
           if(!
response) { ShowPlayerDialog(playeridBIZ_DIALOGDIALOG_STYLE_LIST"Business Management""Change Business Name""Confirm""Cancel"); }
        
format(BizInfo[bizid][Name], 128inputtext);
        
format(string28,sizeof(string28), "Business name changed to %s."inputtext);
        
SendClientMessage(playeridCOLOR_LIGHTBLUEstring28);
        
Delete3DTextLabel(Text3D:BizLabel[bizid]);
        
format(string28,sizeof(string28),"%s\nOwner: %s\nType: %s\nID: %d"BizInfo[bizid][Name], BizInfo[bizid][Owner],GetBizType(bizid), bizid);
        
BizLabel[bizid] = Create3DTextLabel(string28COLOR_BIZBizInfo[bizid][XCoord], BizInfo[bizid][YCoord], BizInfo[bizid][ZCoord], 1000);
    } 



Re: Can Any One Help Me to fix this? - Bojaa - 02.03.2017

I have try all ways to fix it but not work


Re: Can Any One Help Me to fix this? - YouHack - 02.03.2017

Remove the existing 3DTextLabel first before replacing, and try to update your streamer.


Re: Can Any One Help Me to fix this? - Bojaa - 02.03.2017

Quote:
Originally Posted by YouHack
Посмотреть сообщение
Remove the existing 3DTextLabel first before replacing, and try to update your streamer.
You mean Delete it from The script the 3DTextLabel


Re: Can Any One Help Me to fix this? - iLearner - 02.03.2017

Tell me more about this one: 'new bizid = BizIDS[playerid]', what does BizIDS contain?


Re: Can Any One Help Me to fix this? - Bojaa - 02.03.2017

Quote:
Originally Posted by iLearner
Посмотреть сообщение
Tell me more about this one: 'new bizid = BizIDS[playerid]', what does BizIDS contain?
Its this
new BizIDS[MAX_PLAYERS];
BizIDS[playerid] = biz;


Re: Can Any One Help Me to fix this? - Bojaa - 02.03.2017

Quote:
Originally Posted by YouHack
Посмотреть сообщение
Remove the existing 3DTextLabel first before replacing, and try to update your streamer.
Can u give me the streamer i must use cause i updated it and recomplied my gm and got the steamer plugin failed loded and my gm not working


Re: Can Any One Help Me to fix this? - Bojaa - 02.03.2017

Quote:
Originally Posted by Bojaa
Посмотреть сообщение
Can u give me the streamer i must use cause i updated it and recomplied my gm and got the steamer plugin failed loded and my gm not working
I think It will never will be fixed


Re: Can Any One Help Me to fix this? - YouHack - 02.03.2017

Use Dynamic function instead,
and DestroyDynamic3DTextLabel // CreateDynamic3DTextLabel


Re: Can Any One Help Me to fix this? - azzerking - 02.03.2017

First you should move 'BizIDS[playerid] = biz' above 'ShowPlayerDialog'.

Also try debugging it, when the dialog response happends, printf the value of biz and see if it is correct.