Biz owners id instead of Playerid
#1

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
Reply
#2

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.
Reply
#3

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.
Reply
#4

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)