debug help
#7

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
wtf is that PlayerInfo[playerid][LoggedIn] ?
so much useless code
if(PlayerInfo[playerid][bOwned] == 0) {
and what is this doing even?
GetPlayerMoney
you dont use samp default function for buying business omg what aare you donig?
PHP код:
PlayerBizCnt(p){
    new 
cnt;
    foreach(
fBizes,i){
        if(
BizInfo[i][Owner]==PlayerInfo[p][pSQLid])cnt++;
    }
    return 
cnt;
}
CMD:buybiz(pid,params[]) {
    if(
PlayerBizCnt(pid)>=1)return scm(pid,-1,"You already own business!");
    new 
GetBizID(pid);
    if(
i==-|| BizInfo[i][Owner]!=0)return scm(pid,-1,"You can't buy this business!");
    if(
PlayerInfo[pid][pCash] < BizInfo[i][Price])return scm(pid,-1,"You don't have enough money!");
    
BizInfo[i][bOwner]=PlayerInfo[pid][pSQLid];
    
PlayerInfo[pid][pCash]-=BizInfo[i][Price];
    
//saving sql
    
new s[120];
    
format(s,120,"update bussines set owner='%d' where bID='%d'",BizInfo[i][Owner],BizInfo[i][bID]);
    
mysql_tquery(mysql,s);
    
//message for player
    
format(s,120,"You just bought this Business (%s) for $%d. Your Business will earn you $%d/hr"BizInfo[i][Name], BizInfo[i][Price],BizInfo[i][Profit]);
    
scm(pid,-1,s);
    return 
1;

Perhaps if u would have read his code better u might have seen Its not so useless. He has some things there he need for certain things, and Yeah you are Just being a little shit again. Forgive me if Im wrong But Your absolutely not Here to help people and if u were, your not doing quite a good job. There is no reason for you to be such a prick on this forums so if u have some issues with Yourself Dont intoxicate this forums with it
Reply


Messages In This Thread
debug help - by nbx2000 - 16.06.2018, 22:16
Re: debug help - by Mike861 - 16.06.2018, 22:35
Re: debug help - by kovac - 17.06.2018, 01:09
Re: debug help - by nbx2000 - 17.06.2018, 01:43
Re: debug help - by Calisthenics - 17.06.2018, 09:34
Re: debug help - by CodeStyle175 - 17.06.2018, 09:35
Re: debug help - by jasperschellekens - 17.06.2018, 09:59

Forum Jump:


Users browsing this thread: 3 Guest(s)