SA-MP Forums Archive
Biz owners id instead of Playerid - 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: Biz owners id instead of Playerid (/showthread.php?tid=260486)



Biz owners id instead of Playerid - [DK]Dark_Knight - 09.06.2011

This is what i have and it doesnt work :/

pawn Код:
if(BusinessInfo[buss][BusOwner] != -1) return GivePlayerMoney(BusinessInfo[BusOwner], BusinessInfo[BusCost]);
I want it so when someone buys a business it gives the current owners money back, and lets new buyer buy it


Re: Biz owners id instead of Playerid - 0ne - 09.06.2011

Well you should put some code when a player buys it, firstly check if the business has an owner, if it has the variable probably has owners name which you use GivePlayerMoney(BusinessInfo[BusOwner], BusinessInfo[BusCost]); and then you continue your code of the new buyer by taking his money making him an owner and everything you need to do it, if you have a system such as the business stores some money and the owner needs to take it, you should check for the stored money and then check if the owner is online and put it in his pocket, if hes not online you should put it in his accountfile, same with 1st code.


Re: Biz owners id instead of Playerid - [DK]Dark_Knight - 09.06.2011

GivePlayerMoney(BusinessInfo[BusOwner], BusinessInfo[BusCost] );

returns

Код:
D:\Paul\SAMP SERVER\gamemodes\MoneyGrub.pwn(1054) : warning 213: tag mismatch
D:\Paul\SAMP SERVER\gamemodes\MoneyGrub.pwn(1054) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Biz owners id instead of Playerid - 0ne - 09.06.2011

I'm not sure how your commands are defined, see for yourself and edit them i just made an example for you


Re: Biz owners id instead of Playerid - Iphone1234g - 09.06.2011

i guess!
you not add some fanction correctly just check lines and correct errors