CMD wont work
#3

Here's a version without the loop (if the loop is the problem, but probably not)

pawn Код:
CMD:mymaja(playerid, params[])
{
    new tmp = M2ngijaInfo[playerid][pHouse];
    if(tmp == 0) return SendClientMessage(playerid, -1,""VIGA" You don't have a house !"); //if there's no house id 0...idk what your starting house id is
    if(!MillelgiLigidal(2.3, playerid, Houses[tmp][Posx], Houses[tmp][Posy], Houses[tmp][Posz])) return SendClientMessage(playerid, -1,""VIGA" You aren't near your house !");

    format(string, sizeof(string), "> Sa oled mььnud oma maja(ID:%d)!", tmp);
    SendClientMessage(playerid, -1, string);
    GivePlayerMoney(playerid, Houses[tmp][mHind]);
    M2ngijaInfo[playerid][pHouse] = 0;
    format(Houses[tmp][mOmanik], 32, "");
    Houses[tmp][mOstetud] = 0;
    format(query, sizeof(query), "UPDATE `houses` SET mOstetud = `%d`, mOmanik = `%s` WHERE KoduID = `%d`", Houses[tmp][mOstetud], Houses[tmp][mOmanik],tmp);
    mysql_query(query);
    DestroyDynamic3DTextLabel(Houses[tmp][LabelID]);
    format(string, sizeof(string), "Hind %d /n MЬЬGIKS!", Houses[tmp][mHind]);
    Houses[tmp][LabelID] = CreateDynamic3DTextLabel(string, -1, Houses[tmp][Posx],Houses[tmp][Posy],Houses[tmp][Posz], 100, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);
    DestroyDynamicPickup(Houses[tmp][PickupID]);
    CreateDynamicPickup(1273, 23, Houses[tmp][Posx], Houses[tmp][Posy], Houses[tmp][Posz], 0, 0, -1, 250);
    return 1;
}
You'll have to translate some of that stuff
Reply


Messages In This Thread
CMD wont work - by erikhenri - 08.04.2013, 20:10
Re: CMD wont work - by DiGiTaL_AnGeL - 08.04.2013, 20:18
Re: CMD wont work - by [ABK]Antonio - 08.04.2013, 20:20
Re: CMD wont work - by erikhenri - 08.04.2013, 20:20
Re: CMD wont work - by erikhenri - 08.04.2013, 20:23
Re: CMD wont work - by [ABK]Antonio - 08.04.2013, 20:37
Re: CMD wont work - by erikhenri - 08.04.2013, 20:43
Re: CMD wont work - by [ABK]Antonio - 08.04.2013, 21:45
Re: CMD wont work - by erikhenri - 09.04.2013, 03:46
Re: CMD wont work - by [ABK]Antonio - 09.04.2013, 03:46

Forum Jump:


Users browsing this thread: 2 Guest(s)