Jump to content

Cerere GAMEMODE [ cu comanda /addhouse ]


lukyz8
 Share

Recommended Posts

E foarte usor de facut... V-ati invatat toti sa cereti comenzi, de ce nu puneti mana sa exersati, te chinui o zi, te chinui doua, mai cauti pe internet, mai rogi pe cineva sa te mai ajute cate putin si inveti pana la urma... Daca tot vreti sa faceti ceva, incercati sa faceti singuri, nu mai intindeti mana, e internetul plin de toate porcariile, e imposibil sa nu gasesti diferite tutoriale, ai creier, foloseste-l. Cereti diferite sisteme si dupa va laudati ca le-ati facut voi... Eu incepator fiind, mi-a luat ceva sa-mi dau seama cum se face comanda asta, pana la urma am reusit, daca chiar dadeam de erori pe care nu stiam sa le fac, ceream si eu ajutorul la randul meu, dar nu ceream toate comenzile gata facute, invatati sa mai lucrati si singuri

Edited by blaNku
Link to comment
Share on other sites

E foarte usor de facut... V-ati invatat toti sa cereti comenzi, de ce nu puneti mana sa exersati, te chinui o zi, te chinui doua, mai cauti pe internet, mai rogi pe cineva sa te mai ajute cate putin si inveti pana la urma... Daca tot vreti sa faceti ceva, incercati sa faceti singuri, nu mai intindeti mana, e internetul plin de toate porcariile, e imposibil sa nu gasesti diferite tutoriale, ai creier, foloseste-l. Cereti diferite sisteme si dupa va laudati ca le-ati facut voi... Eu incepator fiind, mi-a luat ceva sa-mi dau seama cum se face comanda asta, pana la urma am reusit, daca chiar dadeam de erori pe care nu stiam sa le fac, ceream si eu ajutorul la randul meu, dar nu ceream toate comenzile gata facute, invatati sa mai lucrati si singuri

ai de p*** mea eu tin pentru mine . sari ca un prost sa-mi bag p*** , si de parca as da banii pentru un joc din 2004 . sa-mi bag p***-n fata ta de nolifer nu ti-a cerut nimeni sa spui cum ai muncit tu bagami-as p***-n gura ta de copilas prost

Link to comment
Share on other sites

ai de p*** mea eu tin pentru mine . sari ca un prost sa-mi bag p*** , si de parca as da banii pentru un joc din 2004 . sa-mi bag p***-n fata ta de nolifer nu ti-a cerut nimeni sa spui cum ai muncit tu bagami-as p***-n gura ta de copilas prost

 

Nu stiu care dintre noi este copilasul aici... Nolifer? Nu te cunosc, nu ma cunosti, nu stii tu cat timp imi petrec eu in fata calculatorului sau ce fac eu zi de zi, si chiar daca as sta ca un disperat in fata unui calculator, tot as face ceva mult mai constructiv decat tine, nu as sta sa injur pe un forum... Cred ca tocmai ai reusit sa-ti demonstrezi care dintre noi este copilasul, nu cred ca un om normal s-ar aprinde asa dintr-o simpla prostie... Da si tu dovada de putina maturitate daca ai o varsta, nu te comporta ca o maimuta

Link to comment
Share on other sites

CMD:createhouse(playerid, params[])

{

    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");

    if(IsPlayerConnected(playerid))

{

   if(PlayerInfo[playerid][pAdmin] >= 6)

{

new house[64],Float:pX,Float:pY,Float:pZ,string[128],PropertyString[256],query[500];

if(sscanf(params, "s[64]", house)) return SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /createhouse [exterior/interior/complete]");

   if(strcmp(house,"exterior",true) == 0)

{

   GetPlayerPos(playerid, pX, pY, pZ);

SetPVarFloat(playerid, "pHeX", pX);

        SetPVarFloat(playerid, "pHeY", pY);

        SetPVarFloat(playerid, "pHeZ", pZ);

SetPVarInt(playerid, "hExt", 1);

SendClientMessage(playerid, COLOR_YELLOW, "House exterior position configured.");

}

if(strcmp(house,"interior",true) == 0)

{

   GetPlayerPos(playerid, pX, pY, pZ);

SetPVarFloat(playerid, "pHiX", pX);

            SetPVarFloat(playerid, "pHiY", pY);

            SetPVarFloat(playerid, "pHiZ", pZ);

SetPVarInt(playerid, "pHiID", GetPlayerInterior(playerid));

SetPVarInt(playerid, "pHiVW", GetPlayerVirtualWorld(playerid));

            SetPVarInt(playerid, "hInt", 1);

SendClientMessage(playerid, COLOR_YELLOW, "House interior position configured.");

}

if(strcmp(house,"complete",true) == 0)

{

   if(GetPVarInt(playerid, "hExt") != 1 || GetPVarInt(playerid, "hInt") != 1)

return SendClientMessage(playerid, COLOR_RED, "You haven't configured either the house exterior or interior. Creation attempt failed.");

 

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', '5', '1', '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]                        = GetPVarFloat(playerid, "pHiX");

        HouseInfo[hExity]                        = GetPVarFloat(playerid, "pHiY");

        HouseInfo[hExitz]                        = GetPVarFloat(playerid, "pHiZ");

        format(HouseInfo[hOwner], 64, "AdmBot");

        format(HouseInfo[hDiscription], 64, "House");

        HouseInfo[hValue] = 10000000;

        HouseInfo[hHel]                          = 0;

        HouseInfo[hMusic] = 0;

        HouseInfo[hInterior]                     = GetPVarInt(playerid, "pHiID");

        HouseInfo[hLock]                         = 0;

        HouseInfo[hOwned]                        = 1;

        HouseInfo[hRent]                         = 5;

        HouseInfo[hRentabil]                     = 1;

        HouseInfo[hTakings]                      = 0;

        HouseInfo[hLevel]                        = 10;

        HouseInfo[hVirtual]                      = GetPVarInt(playerid, "pHiVW");

 

        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, "", "");

        mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `House`='%d' WHERE `name`='AdmBot'", i);

        mysql_tquery(SQL, query, "", "");

 

        DeletePVar(playerid, "pHeX");

   DeletePVar(playerid, "pHeY");

   DeletePVar(playerid, "pHeZ");

   DeletePVar(playerid, "pHiX");

   DeletePVar(playerid, "pHeY");

   DeletePVar(playerid, "pHeZ");

   DeletePVar(playerid, "pHiID");

   DeletePVar(playerid, "pHiVW");

   DeletePVar(playerid, "pExt");

   DeletePVar(playerid, "pInt");

 

        DestroyDynamic3DTextLabel(HouseLabel);

format(PropertyString, sizeof(PropertyString),"{FFFFFF}House {B40404}%d \n{B40404}This house is for sale(/buyhouse) ! \n{FFFFFF}Description: {B40404}%s \n{FFFFFF}Price: {B40404}$%s \n{FFFFFF}Level: {B40404}%d",i,HouseInfo[hDiscription],FormatNumber(HouseInfo[hValue]),HouseInfo[hLevel]);

HouseLabel = CreateDynamic3DTextLabel(PropertyString, 0x9C0000F7, HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez], 15.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 100.0);

DestroyDynamicPickup(HousePickup);

HousePickup = CreateDynamicPickup(1273, 23, HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]);

 

SetPlayerInterior(playerid, 0);

SetPlayerVirtualWorld(playerid, 0);

SetPlayerPos(playerid, HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]);

housess++;

format(string,sizeof(string),"House %d created!",i);

SendClientMessage(playerid, COLOR_YELLOW, string);

}

}

else return SendClientMessage(playerid, COLOR_LIGHTGREEN3, AdminOnly);

}

return 1;

}

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. 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.