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