Jump to content
  • 0

Question

Posted

[debug] AMX backtrace:
[debug] #0 00222df0 in public @_yCgivehouse (playerid=0, params[]=@028f96dc "1 1", __help=0) at mrx.pwn:16893
[debug] #1 00222b2c in public @yC_givehouse (0, 42964700, 0, 0)  at mrx.pwn:16887
[debug] #2 native CallRemoteFunction () in samp-server.exe
[debug] #3 0003af78 in Command_Process (playerid=0, cmdtext[]=@028f96a0 "/givehouse", help=0) at C:\Users\Mrx Rarez\Desktop\Mrx-Main\Execute Compiler\include\YSI\y_commands.inc:2499
[debug] #4 0003a658 in ?? (0, 42964640) at C:\Users\Mrx Rarez\Desktop\Mrx-Main\Execute Compiler\include\YSI\y_commands.inc:2297
[debug] #5 0002a1b0 in public OnPlayerCommandText (playerid=0, cmdtext[]=@028f96a0 "/givehouse") at C:\Users\Mrx Rarez\Desktop\Mrx-Main\Execute Compiler\include\YSI\y_hooks/impl.inc:946

 

YCMD:givehouse(playerid, params[], help) {
    new house, id, query[256], string[180];
    if(PlayerInfo[playerid][pAdmin] < 7) return true;
    if(sscanf(params, "ud", id, house)) return SendClientMessage(playerid, COLOR_GREY, "Syntax: {FFFFFF}/givehouse <playerid/name> <house id>");
    mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `House`='999' WHERE `House`='%d'", id);
    mysql_tquery(SQL, query, "", "");
    PlayerInfo[id][pHouse] = house;
    format(query, sizeof(query), "UPDATE `users` SET `House`='%d' WHERE `ID`='%d'", house, PlayerInfo[id][pSQLID]);
    mysql_tquery(SQL, query, "", "");
    format(string, sizeof(string), "({FF0000}Admin Info{FFFFFF}) %s i-a dat lui %s(%d) casa %d.", GetName(playerid), GetName(id), id, house);
    SendAdminMessage(COLOR_WHITE, string, 1);
    format(string, sizeof(string), "Administratorul %s ti-a dat casa %d.", GetName(playerid), house);
    SendClientMessage(id, COLOR_YELLOW, string);
    HouseInfo[house][hOwned] = 1;
    format(HouseInfo[house][hOwner], 256, GetName(id));
    HouseInfo[house][hValue] = 0;
    UpdateLabel(1, house);
    mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Owned`='1', `Owner`='%s', `Value`='0' WHERE `ID`='%d'", GetName(id), house);
    mysql_tquery(SQL, query, "", "");
    return true;
} nuj ce dracu are

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.