I need help with business!
#1

I have problem's my business script, i don't know why this doesen't work, i think that problem is with this check with isplayerinrangeofpoint..

Код:
CMD:firma(playerid,params[])
{
	new Float:XA,Float:YA,Float:ZA;
 	new idv = PlayerInfo[playerid][pFirma];
 	XA = InfoFirme[idv][ExitX]; YA = InfoFirme[idv][ExitY]; ZA = InfoFirme[idv][ExitZ];
	if(!IsPlayerInRangeOfPoint(playerid,5.0, XA, YA, ZA)) return SCM(playerid, -1, "You aren't near your business!!");
 	ShowPlayerDialog(playerid,Dialog_Firme,DIALOG_STYLE_LIST,Business",""SZ"S"B"tate \n"SZ"S"B"ell\n"SZ"F"B"inancies","Ok","Exit");
	return true;
}
it show's me dialog, but it doesen't show me any of dialog responses!

Код:
new w[128],Float:XA,Float:YA,Float:ZA;
    new idv = PlayerInfo[playerid][pFirma];
 	XA = InfoFirme[idv][ExitX]; YA = InfoFirme[idv][ExitY]; ZA = InfoFirme[idv][ExitZ];
    if(dialogid == Dialog_Firme)
    {
        if(IsPlayerInRangeOfPoint(playerid, 5.0, XA, YA, ZA))
	 	{
	 	if(!response) return SendClientMessage(playerid, -1, "You quit!");
				switch(listitem)
			    {
					case 0:
				 	{
					format(w,sizeof(w),""SZ"Current state in business: "B"%i$ ",InfoFirme[idv][PareVlasnika]);
					SendClientMessage(playerid,-1,w);
					}
					case 1:
				 	{
					DestroyPickup(InfoFirme[idv][PickupFirme]);
					InfoFirme[idv][PickupFirme] = CreatePickup(1314, 23, InfoFirme[idv][IzlazXFirme], InfoFirme[idv][IzlazYFirme], InfoFirme[idv][IzlazZFirme]);
					format(InfoFirme[idv][VlasnikFirme], 24, "Nitko");
					InfoFirme[idv][FirmaNaProdaju] = 1;
					GivePlayerMoney(playerid, InfoFirme[idv][CenaFirme]/2);
					format(w,sizeof(w),"Prodali ste firmu za %i$!",InfoFirme[idv][CenaFirme]/2);
					PlayerInfo[playerid][pFirma] = -1;
					SendClientMessage(playerid,-1,w);
					UpdateFirme(idv);
					format(Label, sizeof(Label), ""SZ"Firma: "B"%s\n"SZ"Vlasnik: "B"%s\n"SZ"Cijena: "B"%i$\n"SZ"Level: "B"%i",InfoFirme[idv][ImeFirme],InfoFirme[idv][VlasnikFirme],InfoFirme[idv][CenaFirme],InfoFirme[idv][LevelFirme]);
					Update3DTextLabelText(InfoFirme[idv][LabelFirme],-1,Label);
					}
					case 2:
				 	{
					ShowPlayerDialog(playerid,Dialog_Firme+1,DIALOG_STYLE_INPUT,"Withdraw","How much money you want to withdraw from your account?","Withdraw","Quit");
				    }
				}
		}
	    return true;
    }
Reply


Messages In This Thread
I need help with business! - Please HELP me! - by ivanVU - 13.10.2012, 09:41
Re: I need help with business! - by gtakillerIV - 13.10.2012, 16:41
Re: I need help with business! - by ivanVU - 13.10.2012, 16:56
Re: I need help with business! - by gtakillerIV - 13.10.2012, 17:52
Re: I need help with business! - by ivanVU - 14.10.2012, 09:54
Re: I need help with business! - by Simplyfrag - 14.10.2012, 15:44
Re: I need help with business! - by ivanVU - 14.10.2012, 16:05
Re: I need help with business! - by SwisherSweet - 15.10.2012, 08:14
Re: I need help with business! - by ivanVU - 15.10.2012, 08:30
Re: I need help with business! - by fiki574 - 15.10.2012, 09:06

Forum Jump:


Users browsing this thread: 1 Guest(s)