Some Bugs On Commands
#1

Hi Guys I'm Trying To Make Lock House Commands But This CMD Are Bugged Can You Help Me?
PHP код:
CMD:lockh(playeridparams[])
{
    for(new 
0MAX_HOUSE;i++)
    {
        new 
file[999],string[999];
        if(
strfind(IsPlayerName(playerid),HInfo[i][Owner], true) == -1) return SendClientMessage(playerid0x99FF00AA""COL_RED"[House] "COL_YELLOW"You're not the House Owner!");
           if(
HInfo[i][HX] == -&& HInfo[i][HY] == -&& HInfo[i][HZ] == -1) return SendClientMessage(playerid0x99FF00AA""COL_RED"[House] "COL_YELLOW"You must at The House Checkpoint");
        
HInfo[i][Locked] = 1;
        
format(stringsizeof(string), ""warnalabel"House Owner: %s \nHouse Price: %d \nHouse Level: %d \nHouse Id: %d \nLocked: %d"IsPlayerName(playerid),HInfo[i][Price],HInfo[i][Level],iHInfo[Labelid][Locked]);
        
UpdateDynamic3DTextLabelText(HInfo[i][Labels],0xFF0000FF,string);
        
format(filesizeof(file), "House/%d.ini"i);
          
dini_IntSet(file"Locked"1);
        
SendClientMessage(playerid0x99FF00AA""COL_RED"[House] "COL_YELLOW"You Have Lock This House");
    }
    return 
1;

P/S: Sorry For Bad English
Reply
#2

What does it do, or what does it not do?



Something else in here, maybe have a "player owns house" variable on his account, so that you avoid checking all the houses before you check if he has one or not.
Reply
#3

Replace
Quote:

dini_IntSet(file, "Locked", 1);

To be
Quote:

dini_IntSet(file, "Locked", HInfo[i][Locked]);

Reply
#4

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
What does it do, or what does it not do?
To Lock Own House ...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)