Jump to content

Bug comanda [/movehouse]


SNH02

Recommended Posts

asta e comanda 

CMD:movehouse(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(PinLogged[playerid] == 0) return SCM(playerid, COLOR_BLUELIGHT, "Trebuie sa introduci codul pin mai intai folosind comanda [/pin] sau sa setezi unul folosind comanda [/setpin].");
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pAdmin] >= 7)
        {
            if(GetPlayerInterior(playerid) > 0 || GetPlayerVirtualWorld(playerid) > 0) return SendClientMessage(playerid, COLOR_RED, "You can move house only in virtual/interior 0.");
            new house,Float:pX,Float:pY,Float:pZ,query[256];
            if(sscanf(params, "d", house)) return SendClientMessage(playerid, COLOR_WHITE, "{FF0000}Usage: {FFFFFF}/movehouse <HouseID>");
            GetPlayerPos(playerid, pX, pY, pZ);
            HouseInfo[house][hEntrancex] = pX;
            HouseInfo[house][hEntrancey] = pY;
            HouseInfo[house][hEntrancez] = pZ;
            new i = house;
            mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Entrancex`='%f',`Entrancey`='%f',`Entrancez`='%f' WHERE `ID`='%d'",HouseInfo[house][hEntrancex],HouseInfo[house][hEntrancey],HouseInfo[house][hEntrancez],house);
            mysql_tquery(SQL,query,"","");
            format(query,sizeof(query),"You moved house %d to X:%f,Y:%f,Z:%f.",house,pX,pY,pZ);

            OnPropTextdrawUpdate(1, i);
        }
        else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
    }
    return 1;
}

 

 

 

Cum fac sa rezolv fara sa dau wipe la tot, ca deja e a 2-a oara cand am patit asta,trb sa dau wipe ca sa apara iarasi, e de la comanda asta.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.