Jump to content
Sign in to follow this  
Extr3m3Tr3z

cerere tutorial comanda /createhouse

Recommended Posts

Acum 55 minute, Extr3m3Tr3z a spus:

Salut, am si eu nevoie de comanda ceatehouse daca ma poate ajuta cineva, am un gamemode inceput de la Terone, multumesc

CMD:createhouse( playerid, params[] ) {
    if( PlayerInfo[playerid][pAdmin] < 6 ) return true;

    new ivInt, Float:IntPos[3], inter, Float:pX, Float:pY, Float:pZ, string[128], query[500], text, sendername[25];
    if( sscanf( params, "i", text ) ) 
        return SCM( playerid, COLOR_GREY, "Syntax: {FFFFFF}/createhouse <Size - 0/1/2> 0 = small, 1 = medium, 2 = big");
    if(text >= 3) return SendClientMessage(playerid, COLOR_ERROR, "Unknown Size");
    GetPlayerPos(playerid, pX, pY, pZ);
    SetPVarFloat(playerid, "pHeX", pX);
    SetPVarFloat(playerid, "pHeY", pY);
    SetPVarFloat(playerid, "pHeZ", pZ);
    if(text == 0)
    {
        ivInt = random(5);
        if(ivInt == 0)IntPos[0] = 223.20, IntPos[1] = 1287.08, IntPos[2] = 1082.14, inter = 1;
        else if(ivInt == 1)IntPos[0] = 2283.04, IntPos[1] = -1140.28, IntPos[2] = 1050.90, inter = 11;
        else if(ivInt == 2)IntPos[0] = 446.90, IntPos[1] = 506.35, IntPos[2] = 1001.42, inter = 12;
        else if(ivInt == 3)IntPos[0] = 328.05, IntPos[1] = 1477.73, IntPos[2] = 1084.44, inter = 15;
        else if(ivInt == 4)IntPos[0] = 223.20, IntPos[1] = 1287.08, IntPos[2] = 1082.14, inter = 1;
        else if(ivInt == 5)IntPos[0] = -42.59, IntPos[1] = 1405.47, IntPos[2] = 1084.43, inter = 8;
    }
    else if(text == 1)
    {
        ivInt = random(5)+6;
        if(ivInt == 6)IntPos[0] = 235.34, IntPos[1] = 1186.68, IntPos[2] = 1080.26, inter = 3;
        else if(ivInt == 7)IntPos[0] = 24.04, IntPos[1] = 1340.17, IntPos[2] = 1084.38, inter = 10;
        else if(ivInt == 8)IntPos[0] = -283.44, IntPos[1] = 1470.93, IntPos[2] = 1084.38, inter = 15;
        else if(ivInt == 9)IntPos[0] = -260.49, IntPos[1] = 1456.75, IntPos[2] = 1084.37, inter = 4;
        else if(ivInt == 10)IntPos[0] = 377.15, IntPos[1] = 1417.41, IntPos[2] = 1081.33, inter = 15;
    }
    else if(text == 2)
    {
        ivInt = random(5)+11;
        if(ivInt == 11)IntPos[0] = 2324.53, IntPos[1] = -1149.54, IntPos[2] = 1050.71, inter = 12;
        else if(ivInt == 12)IntPos[0] = 1260.64, IntPos[1] = -785.37, IntPos[2] = 1091.91, inter = 5;
        else if(ivInt == 13)IntPos[0] = 140.17, IntPos[1] = 1366.07, IntPos[2] = 1083.65, inter = 5;
        else if(ivInt == 14)IntPos[0] = 234.19, IntPos[1] = 1063.73, IntPos[2] = 1084.21, inter = 6;
        else if(ivInt == 15)IntPos[0] = 225.68, IntPos[1] = 1021.45, IntPos[2] = 1084.02, inter = 7;
        else if(ivInt == 16)IntPos[0] = 226.30, IntPos[1] = 1114.24, IntPos[2] = 1080.99, inter = 5;
    }

    new i = housess+1;
    mysql_format(SQL, query, sizeof(query), "INSERT INTO houses (Owner, Lockk, Hel, Arm, Level, Rentabil, Rent, Owned, Discription, Value, Takings) VALUES('AdmBot', '0', '0', '0', '10', '1', '500', '0', 'House', '10000000', '0')");
    mysql_tquery(SQL, query, "", "");

    HouseInfo[hID]                           = i;
    HouseInfo[hEntrancex]                    = GetPVarFloat(playerid, "pHeX");
    HouseInfo[hEntrancey]                    = GetPVarFloat(playerid, "pHeY");
    HouseInfo[hEntrancez]                    = GetPVarFloat(playerid, "pHeZ");
    HouseInfo[hExitx]                        = IntPos[0];
    HouseInfo[hExity]                        = IntPos[1];
    HouseInfo[hExitz]                        = IntPos[2];
    format(HouseInfo[hOwner], 64, "AdmBot");
    format(HouseInfo[hDiscription], 64, "House");
    HouseInfo[hValue]                        = 5000000;
    HouseInfo[hHel]                          = 0;
    HouseInfo[hInterior]                     = inter;
    HouseInfo[hLock]                         = 0;
    HouseInfo[hOwned]                        = 0;
    HouseInfo[hRent]                         = 10000;
    HouseInfo[hRentabil]                     = 1;
    HouseInfo[hTakings]                      = 0;
    HouseInfo[hLevel]                        = 10;
    HouseInfo[hVirtual]                      = housess+1;

    mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Entrancex`='%f',`Entrancey`='%f',`Entrancez`='%f',`Exitx`='%f',`Exity`='%f',`Exitz`='%f',`Interior`='%d',`Virtual`='%d',`Value`='%d',`Level`='%d' WHERE `ID`='%d'",HouseInfo[hEntrancex],HouseInfo[hEntrancey],HouseInfo[hEntrancez],HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz],HouseInfo[hInterior],HouseInfo[hVirtual],HouseInfo[hValue],HouseInfo[hLevel],i);
    mysql_tquery(SQL, query, "", "");
    mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Entrancex`='%f',`Entrancey`='%f',`Entrancez`='%f',`Exitx`='%f',`Exity`='%f',`Exitz`='%f',`Interior`='%d',`Virtual`='%d' WHERE `ID`='%d'", HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez], HouseInfo[hExitx], HouseInfo[hExity], HouseInfo[hExitz], HouseInfo[hInterior], HouseInfo[hVirtual], i);
    mysql_tquery(SQL, query, "", "");

    if(ivInt >= 0 && ivInt <=5)
    {
        mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `InteriorType` = 0  WHERE `ID`='%d'",i);
        mysql_tquery(SQL,query,"","");
        HouseInfo[hInteriorType] = 0;
    }
    else if(ivInt >= 6 && ivInt <=10)
    {
        mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `InteriorType` = 1  WHERE `ID`='%d'",i);
        mysql_tquery(SQL,query,"","");
        HouseInfo[hInteriorType] = 1;
    }
    else if(ivInt >= 11 && ivInt <=16)
    {
        mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `InteriorType` = 2  WHERE `ID`='%d'",i);
        mysql_tquery(SQL,query,"","");
        HouseInfo[hInteriorType] = 2;
    }
    OnPropTextdrawUpdate(1,i);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]);
    housess++;
    format(string,sizeof(string),"[Casa] %d a fost creata cu succes.!",i);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "[Admin] %s: a creat o noua casa ID %d", sendername, i);
    ABroadCast(COLOR_ADMCHAT, string, 1);
    return true;
}


 Încearcă să fii un om de valoare și nu neapărat un om de succes.

 

Share this post


Link to post
Share on other sites
Acum 24 minute, KB.HERO a spus:

CMD:createhouse( playerid, params[] ) {
    if( PlayerInfo[playerid][pAdmin] < 6 ) return true;

    new ivInt, Float:IntPos[3], inter, Float:pX, Float:pY, Float:pZ, string[128], query[500], text, sendername[25];
    if( sscanf( params, "i", text ) ) 
        return SCM( playerid, COLOR_GREY, "Syntax: {FFFFFF}/createhouse <Size - 0/1/2> 0 = small, 1 = medium, 2 = big");
    if(text >= 3) return SendClientMessage(playerid, COLOR_ERROR, "Unknown Size");
    GetPlayerPos(playerid, pX, pY, pZ);
    SetPVarFloat(playerid, "pHeX", pX);
    SetPVarFloat(playerid, "pHeY", pY);
    SetPVarFloat(playerid, "pHeZ", pZ);
    if(text == 0)
    {
        ivInt = random(5);
        if(ivInt == 0)IntPos[0] = 223.20, IntPos[1] = 1287.08, IntPos[2] = 1082.14, inter = 1;
        else if(ivInt == 1)IntPos[0] = 2283.04, IntPos[1] = -1140.28, IntPos[2] = 1050.90, inter = 11;
        else if(ivInt == 2)IntPos[0] = 446.90, IntPos[1] = 506.35, IntPos[2] = 1001.42, inter = 12;
        else if(ivInt == 3)IntPos[0] = 328.05, IntPos[1] = 1477.73, IntPos[2] = 1084.44, inter = 15;
        else if(ivInt == 4)IntPos[0] = 223.20, IntPos[1] = 1287.08, IntPos[2] = 1082.14, inter = 1;
        else if(ivInt == 5)IntPos[0] = -42.59, IntPos[1] = 1405.47, IntPos[2] = 1084.43, inter = 8;
    }
    else if(text == 1)
    {
        ivInt = random(5)+6;
        if(ivInt == 6)IntPos[0] = 235.34, IntPos[1] = 1186.68, IntPos[2] = 1080.26, inter = 3;
        else if(ivInt == 7)IntPos[0] = 24.04, IntPos[1] = 1340.17, IntPos[2] = 1084.38, inter = 10;
        else if(ivInt == 8)IntPos[0] = -283.44, IntPos[1] = 1470.93, IntPos[2] = 1084.38, inter = 15;
        else if(ivInt == 9)IntPos[0] = -260.49, IntPos[1] = 1456.75, IntPos[2] = 1084.37, inter = 4;
        else if(ivInt == 10)IntPos[0] = 377.15, IntPos[1] = 1417.41, IntPos[2] = 1081.33, inter = 15;
    }
    else if(text == 2)
    {
        ivInt = random(5)+11;
        if(ivInt == 11)IntPos[0] = 2324.53, IntPos[1] = -1149.54, IntPos[2] = 1050.71, inter = 12;
        else if(ivInt == 12)IntPos[0] = 1260.64, IntPos[1] = -785.37, IntPos[2] = 1091.91, inter = 5;
        else if(ivInt == 13)IntPos[0] = 140.17, IntPos[1] = 1366.07, IntPos[2] = 1083.65, inter = 5;
        else if(ivInt == 14)IntPos[0] = 234.19, IntPos[1] = 1063.73, IntPos[2] = 1084.21, inter = 6;
        else if(ivInt == 15)IntPos[0] = 225.68, IntPos[1] = 1021.45, IntPos[2] = 1084.02, inter = 7;
        else if(ivInt == 16)IntPos[0] = 226.30, IntPos[1] = 1114.24, IntPos[2] = 1080.99, inter = 5;
    }

    new i = housess+1;
    mysql_format(SQL, query, sizeof(query), "INSERT INTO houses (Owner, Lockk, Hel, Arm, Level, Rentabil, Rent, Owned, Discription, Value, Takings) VALUES('AdmBot', '0', '0', '0', '10', '1', '500', '0', 'House', '10000000', '0')");
    mysql_tquery(SQL, query, "", "");

    HouseInfo[hID]                           = i;
    HouseInfo[hEntrancex]                    = GetPVarFloat(playerid, "pHeX");
    HouseInfo[hEntrancey]                    = GetPVarFloat(playerid, "pHeY");
    HouseInfo[hEntrancez]                    = GetPVarFloat(playerid, "pHeZ");
    HouseInfo[hExitx]                        = IntPos[0];
    HouseInfo[hExity]                        = IntPos[1];
    HouseInfo[hExitz]                        = IntPos[2];
    format(HouseInfo[hOwner], 64, "AdmBot");
    format(HouseInfo[hDiscription], 64, "House");
    HouseInfo[hValue]                        = 5000000;
    HouseInfo[hHel]                          = 0;
    HouseInfo[hInterior]                     = inter;
    HouseInfo[hLock]                         = 0;
    HouseInfo[hOwned]                        = 0;
    HouseInfo[hRent]                         = 10000;
    HouseInfo[hRentabil]                     = 1;
    HouseInfo[hTakings]                      = 0;
    HouseInfo[hLevel]                        = 10;
    HouseInfo[hVirtual]                      = housess+1;

    mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Entrancex`='%f',`Entrancey`='%f',`Entrancez`='%f',`Exitx`='%f',`Exity`='%f',`Exitz`='%f',`Interior`='%d',`Virtual`='%d',`Value`='%d',`Level`='%d' WHERE `ID`='%d'",HouseInfo[hEntrancex],HouseInfo[hEntrancey],HouseInfo[hEntrancez],HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz],HouseInfo[hInterior],HouseInfo[hVirtual],HouseInfo[hValue],HouseInfo[hLevel],i);
    mysql_tquery(SQL, query, "", "");
    mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Entrancex`='%f',`Entrancey`='%f',`Entrancez`='%f',`Exitx`='%f',`Exity`='%f',`Exitz`='%f',`Interior`='%d',`Virtual`='%d' WHERE `ID`='%d'", HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez], HouseInfo[hExitx], HouseInfo[hExity], HouseInfo[hExitz], HouseInfo[hInterior], HouseInfo[hVirtual], i);
    mysql_tquery(SQL, query, "", "");

    if(ivInt >= 0 && ivInt <=5)
    {
        mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `InteriorType` = 0  WHERE `ID`='%d'",i);
        mysql_tquery(SQL,query,"","");
        HouseInfo[hInteriorType] = 0;
    }
    else if(ivInt >= 6 && ivInt <=10)
    {
        mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `InteriorType` = 1  WHERE `ID`='%d'",i);
        mysql_tquery(SQL,query,"","");
        HouseInfo[hInteriorType] = 1;
    }
    else if(ivInt >= 11 && ivInt <=16)
    {
        mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `InteriorType` = 2  WHERE `ID`='%d'",i);
        mysql_tquery(SQL,query,"","");
        HouseInfo[hInteriorType] = 2;
    }
    OnPropTextdrawUpdate(1,i);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]);
    housess++;
    format(string,sizeof(string),"[Casa] %d a fost creata cu succes.!",i);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "[Admin] %s: a creat o noua casa ID %d", sendername, i);
    ABroadCast(COLOR_ADMCHAT, string, 1);
    return true;
}

gamemode.pwn(55785) : error 017: undefined symbol "housess"
gamemode.pwn(55789) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55790) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55791) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55792) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55793) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55794) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55795) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55798) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55799) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55800) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55801) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55802) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55803) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55804) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55805) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55806) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55807) : error 017: undefined symbol "housess"
gamemode.pwn(55807) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55818) : error 017: undefined symbol "hInteriorType"
gamemode.pwn(55818) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55824) : error 017: undefined symbol "hInteriorType"
gamemode.pwn(55824) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55830) : error 017: undefined symbol "hInteriorType"
gamemode.pwn(55830) : error 033: array must be indexed (variable "HouseInfo")
gamemode.pwn(55835) : error 035: argument type mismatch (argument 2)
stii cumva sa le rezolvi?

Share this post


Link to post
Share on other sites
3 hours ago, KB.HERO said:

CMD:createhouse( playerid, params[] ) {
    if( PlayerInfo[playerid][pAdmin] < 6 ) return true;

    new ivInt, Float:IntPos[3], inter, Float:pX, Float:pY, Float:pZ, string[128], query[500], text, sendername[25];
    if( sscanf( params, "i", text ) ) 
        return SCM( playerid, COLOR_GREY, "Syntax: {FFFFFF}/createhouse <Size - 0/1/2> 0 = small, 1 = medium, 2 = big");
    if(text >= 3) return SendClientMessage(playerid, COLOR_ERROR, "Unknown Size");
    GetPlayerPos(playerid, pX, pY, pZ);
    SetPVarFloat(playerid, "pHeX", pX);
    SetPVarFloat(playerid, "pHeY", pY);
    SetPVarFloat(playerid, "pHeZ", pZ);
    if(text == 0)
    {
        ivInt = random(5);
        if(ivInt == 0)IntPos[0] = 223.20, IntPos[1] = 1287.08, IntPos[2] = 1082.14, inter = 1;
        else if(ivInt == 1)IntPos[0] = 2283.04, IntPos[1] = -1140.28, IntPos[2] = 1050.90, inter = 11;
        else if(ivInt == 2)IntPos[0] = 446.90, IntPos[1] = 506.35, IntPos[2] = 1001.42, inter = 12;
        else if(ivInt == 3)IntPos[0] = 328.05, IntPos[1] = 1477.73, IntPos[2] = 1084.44, inter = 15;
        else if(ivInt == 4)IntPos[0] = 223.20, IntPos[1] = 1287.08, IntPos[2] = 1082.14, inter = 1;
        else if(ivInt == 5)IntPos[0] = -42.59, IntPos[1] = 1405.47, IntPos[2] = 1084.43, inter = 8;
    }
    else if(text == 1)
    {
        ivInt = random(5)+6;
        if(ivInt == 6)IntPos[0] = 235.34, IntPos[1] = 1186.68, IntPos[2] = 1080.26, inter = 3;
        else if(ivInt == 7)IntPos[0] = 24.04, IntPos[1] = 1340.17, IntPos[2] = 1084.38, inter = 10;
        else if(ivInt == 8)IntPos[0] = -283.44, IntPos[1] = 1470.93, IntPos[2] = 1084.38, inter = 15;
        else if(ivInt == 9)IntPos[0] = -260.49, IntPos[1] = 1456.75, IntPos[2] = 1084.37, inter = 4;
        else if(ivInt == 10)IntPos[0] = 377.15, IntPos[1] = 1417.41, IntPos[2] = 1081.33, inter = 15;
    }
    else if(text == 2)
    {
        ivInt = random(5)+11;
        if(ivInt == 11)IntPos[0] = 2324.53, IntPos[1] = -1149.54, IntPos[2] = 1050.71, inter = 12;
        else if(ivInt == 12)IntPos[0] = 1260.64, IntPos[1] = -785.37, IntPos[2] = 1091.91, inter = 5;
        else if(ivInt == 13)IntPos[0] = 140.17, IntPos[1] = 1366.07, IntPos[2] = 1083.65, inter = 5;
        else if(ivInt == 14)IntPos[0] = 234.19, IntPos[1] = 1063.73, IntPos[2] = 1084.21, inter = 6;
        else if(ivInt == 15)IntPos[0] = 225.68, IntPos[1] = 1021.45, IntPos[2] = 1084.02, inter = 7;
        else if(ivInt == 16)IntPos[0] = 226.30, IntPos[1] = 1114.24, IntPos[2] = 1080.99, inter = 5;
    }

    new i = housess+1;
    mysql_format(SQL, query, sizeof(query), "INSERT INTO houses (Owner, Lockk, Hel, Arm, Level, Rentabil, Rent, Owned, Discription, Value, Takings) VALUES('AdmBot', '0', '0', '0', '10', '1', '500', '0', 'House', '10000000', '0')");
    mysql_tquery(SQL, query, "", "");

    HouseInfo[hID]                           = i;
    HouseInfo[hEntrancex]                    = GetPVarFloat(playerid, "pHeX");
    HouseInfo[hEntrancey]                    = GetPVarFloat(playerid, "pHeY");
    HouseInfo[hEntrancez]                    = GetPVarFloat(playerid, "pHeZ");
    HouseInfo[hExitx]                        = IntPos[0];
    HouseInfo[hExity]                        = IntPos[1];
    HouseInfo[hExitz]                        = IntPos[2];
    format(HouseInfo[hOwner], 64, "AdmBot");
    format(HouseInfo[hDiscription], 64, "House");
    HouseInfo[hValue]                        = 5000000;
    HouseInfo[hHel]                          = 0;
    HouseInfo[hInterior]                     = inter;
    HouseInfo[hLock]                         = 0;
    HouseInfo[hOwned]                        = 0;
    HouseInfo[hRent]                         = 10000;
    HouseInfo[hRentabil]                     = 1;
    HouseInfo[hTakings]                      = 0;
    HouseInfo[hLevel]                        = 10;
    HouseInfo[hVirtual]                      = housess+1;

    mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Entrancex`='%f',`Entrancey`='%f',`Entrancez`='%f',`Exitx`='%f',`Exity`='%f',`Exitz`='%f',`Interior`='%d',`Virtual`='%d',`Value`='%d',`Level`='%d' WHERE `ID`='%d'",HouseInfo[hEntrancex],HouseInfo[hEntrancey],HouseInfo[hEntrancez],HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz],HouseInfo[hInterior],HouseInfo[hVirtual],HouseInfo[hValue],HouseInfo[hLevel],i);
    mysql_tquery(SQL, query, "", "");
    mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Entrancex`='%f',`Entrancey`='%f',`Entrancez`='%f',`Exitx`='%f',`Exity`='%f',`Exitz`='%f',`Interior`='%d',`Virtual`='%d' WHERE `ID`='%d'", HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez], HouseInfo[hExitx], HouseInfo[hExity], HouseInfo[hExitz], HouseInfo[hInterior], HouseInfo[hVirtual], i);
    mysql_tquery(SQL, query, "", "");

    if(ivInt >= 0 && ivInt <=5)
    {
        mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `InteriorType` = 0  WHERE `ID`='%d'",i);
        mysql_tquery(SQL,query,"","");
        HouseInfo[hInteriorType] = 0;
    }
    else if(ivInt >= 6 && ivInt <=10)
    {
        mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `InteriorType` = 1  WHERE `ID`='%d'",i);
        mysql_tquery(SQL,query,"","");
        HouseInfo[hInteriorType] = 1;
    }
    else if(ivInt >= 11 && ivInt <=16)
    {
        mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `InteriorType` = 2  WHERE `ID`='%d'",i);
        mysql_tquery(SQL,query,"","");
        HouseInfo[hInteriorType] = 2;
    }
    OnPropTextdrawUpdate(1,i);
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SetPlayerPos(playerid, HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]);
    housess++;
    format(string,sizeof(string),"[Casa] %d a fost creata cu succes.!",i);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string, sizeof(string), "[Admin] %s: a creat o noua casa ID %d", sendername, i);
    ABroadCast(COLOR_ADMCHAT, string, 1);
    return true;
}

tot pe else if :)) 


Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii nu mai veniti cu vorba de "Am gamemode unic" nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

Credite: @StrikerM

Share this post


Link to post
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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

This site uses cookies. By continuing browsing, you agree to the use of this information. For more details, see Terms of Use and Privacy Policy.