SA-MP Forums Archive
I NeEd HElp!_! - 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: I NeEd HElp!_! (/showthread.php?tid=586194)



I NeEd HElp!_! - RocketBoy - 20.08.2015

In first picture i didn't buy this biz and its color is green in map..


_________________________________________
In second piture when i bought that biz it color is still green in map but it should be change into red.



Re: I NeEd HElp!_! - jlalt - 20.08.2015

Give me your buybiz command please:
and i gona teach you what to do first check here:
https://sampwiki.blast.hk/wiki/MapIcons

the map icon you searching for is:
36

green map icon 52 you should destroy the old map icon and make new dynamic one after buy


Re: I NeEd HElp!_! - RocketBoy - 20.08.2015

can u teach me with simple coding plz?


Re: I NeEd HElp!_! - jlalt - 20.08.2015

if you give your buybiz and sellbiz command will be more easy for fix and teach you how


Re: I NeEd HElp!_! - RocketBoy - 20.08.2015

Код:
	}
	if(pickupid < bizcount+2) {
		new bizowner[25];
		format(bizowner,128,"%s",BizInfo[p][owner]);
		if(strcmp(BizInfo[p][owner],DEFAULT_OWNER,false) == 0) {
			SendClientMessage(playerid, COLOR_RED, "This Biz For Sale Type, /buybiz To Buy This Biz {FF0000}:) ");
	    	format(bizowner,128,"This Biz For Sale");
		}
		new bizmes[128];
		format(bizmes,128,"~n~~n~~r~Business: ~w~%s \n~n~~b~Price: ~w~$%d \n~r~~n~~b~Profit: ~w~$%d/hr ~n~~b~Owner: ~w~%s ",BizInfo[p][name],BizInfo[p][cost],BizInfo[p][profit]*2,bizowner);
    	GameTextForPlayer(playerid,bizmes,5000,3);
		return 1;
	}



Re: I NeEd HElp!_! - jlalt - 20.08.2015

Quote:
Originally Posted by RocketBoy
Посмотреть сообщение
Код:
	}
	if(pickupid < bizcount+2) {
		new bizowner[25];
		format(bizowner,128,"%s",BizInfo[p][owner]);
		if(strcmp(BizInfo[p][owner],DEFAULT_OWNER,false) == 0) {
			SendClientMessage(playerid, COLOR_RED, "This Biz For Sale Type, /buybiz To Buy This Biz {FF0000}:) ");
	    	format(bizowner,128,"This Biz For Sale");
		}
		new bizmes[128];
		format(bizmes,128,"~n~~n~~r~Business: ~w~%s \n~n~~b~Price: ~w~$%d \n~r~~n~~b~Profit: ~w~$%d/hr ~n~~b~Owner: ~w~%s ",BizInfo[p][name],BizInfo[p][cost],BizInfo[p][profit]*2,bizowner);
    	GameTextForPlayer(playerid,bizmes,5000,3);
		return 1;
	}
search for :
CreateDynamicMapIcon(BizInfo ....
or
CreateMapIcon(BizInfo ....
and give the full line


Re: I NeEd HElp!_! - RocketBoy - 20.08.2015

Код:
UpdateDynamic3DTextLabelText(bizTextInfo[bizid],0xFF0000FF,bizowner);
	BizInfo[bizid][ico] = CreateDynamicMapIcon(BizInfo[bizid][xpos],BizInfo[bizid][ypos],BizInfo[bizid][zpos],52,250);

This one??


Re: I NeEd HElp!_! - jlalt - 20.08.2015

Quote:
Originally Posted by RocketBoy
Посмотреть сообщение
Код:
UpdateDynamic3DTextLabelText(bizTextInfo[bizid],0xFF0000FF,bizowner);
	BizInfo[bizid][ico] = CreateDynamicMapIcon(BizInfo[bizid][xpos],BizInfo[bizid][ypos],BizInfo[bizid][zpos],52,250);

This one??
Yea
in /buybiz command add:
PHP код:
new bizid ClosestBiz(playerid);
        
DestroyDynamicMapIcon(BizInfo[bizid][ico]);
        
BizInfo[bizid][ico] = CreateDynamicMapIcon(BizInfo[bizid][xpos],BizInfo[bId][ypos],BizInfo[bId][zpos],36,250); 
in /sellbiz command add:

PHP код:
new bizid ClosestBiz(playerid);
        
DestroyDynamicMapIcon(BizInfo[bizid][ico]);
        
BizInfo[bizid][ico] = CreateDynamicMapIcon(BizInfo[bizid][xpos],BizInfo[bId][ypos],BizInfo[bId][zpos],52,250); 
and hope it work


Re: I NeEd HElp!_! - RocketBoy - 20.08.2015

thnx +rep


Re: I NeEd HElp!_! - RocketBoy - 20.08.2015

Workeed
but sorry for distrubing you agein need your help


Help. im fixing a gm..