[Little help] Help
#1

When i /createhouse i can buy it, but i want when i /createhouse appers little green house... And when i buy it (/buyhouse) appers little blue house... Anyone help?
Reply
#2

it can not be helped..
Reply
#3

What?
Show us the code, we are not physicians.
Reply
#4

Quote:
Originally Posted by Littlehelper[MDZ]
Посмотреть сообщение
Show us the code, we are not physicians.
What does being a doctor have to do with scripting lol

http://en.wikipedia.org/wiki/Physician

You mean psychic.
Reply
#5

When you create a house insert code like this : CreateDynamicPickup(EnterX, EnterY, EnterZ, 31, 0, 0, 0, -1, 150.0); same thing when buying...
Reply
#6

Quote:
Originally Posted by iggy1
Посмотреть сообщение
What does being a doctor have to do with scripting lol

http://en.wikipedia.org/wiki/Physician

You mean psychic.
Reading the minds and shit.
Reply
#7

Код:
COMMAND:buycell(playerid, params[])
{
	new str[128];
    if(PlayerStat[playerid][HasCell] == 1) return SendClientMessage(playerid, GREY, "Vec imas zatvor, ako zelis prodati /sellcell ili /sellcellto.");
    for(new c = 0; c < MAX_CELLS; c++)
    {
		if(IsPlayerInRangeOfPoint(playerid, 1.0, CellStat[c][ExteriorX], CellStat[c][ExteriorY], CellStat[c][ExteriorZ]))
	    {
            if(CellStat[c][Owned] == 1) return SendClientMessage(playerid, GREY, "Ovaj zatvor nije dostupan.");
            {
				if(PlayerStat[playerid][Money] >= CellStat[c][CellPrice])
				{
					CellStat[c][Owned] = 1;
					PlayerStat[playerid][HasCell] = 1;
					PlayerStat[playerid][Cell] = c;
					GiveMoney(playerid, - CellStat[c][CellPrice]);
					format(CellStat[c][CellOwner], 60, "%s", GetOOCName(playerid));
					format(str, sizeof(str), "Vlasnik ovog zatvora ID %d\nOwner: %s", c, CellStat[c][CellOwner]);
                    Update3DTextLabelText(CellStat[c][TextLabel], RED, str);
                    DestroyDynamicPickup(CellStat[c][PickupID]);
                    CellStat[c][PickupID] = CreateDynamicPickup(1272, 23, CellStat[c][ExteriorX], CellStat[c][ExteriorY], CellStat[c][ExteriorZ], 0, -1, -1, 100.0);
					format(str, sizeof(str), "Cestitamo! Sada imate svoj vlastiti zatvor (ID: %d).", c);
					SendClientMessage(playerid, GREEN, str);
					SaveCell©;
				}
				else
				{
                    format(str, sizeof(str), "Nemozes si priustiti $%d da kupis vlastiti zatvor.", CellStat[c][CellPrice]);
					SendClientMessage(playerid, GREY, str);
				}
            }
        }
    }
    return 1;
This is when you buy it (my server is prison, and you are buying cells )

This is when you create

Код:
COMMAND:createcell(playerid, params[])
{
    new Price, str[128];
	if(PlayerStat[playerid][AdminLevel] < 5) return SendClientMessage(playerid, GREY, "You can't use this command.");
    if(sscanf(params,"d", Price))return SendClientMessage(playerid, GREY, "USAGE: /createcell [price] (Stand up infron of the cell then use this command)");
    if(Server[LoadedCells] > MAX_CELLS) return SendClientMessage(playerid, GREY, "You can't create cells anymore (Max Number of Cells is 100)");
	new Float: PosX, Float: PosY, Float: PosZ;
	GetPlayerPos(playerid, PosX, PosY, PosZ);
	CreateCell(Price, PosX, PosY, PosZ, PosX -1.7, PosY, PosZ);
	SendClientMessage(playerid, GREY, "You have successfully created a cell.");
	format(str, sizeof(str), "Admin %s has created a new cell.", GetOOCName(playerid));
    AdminActionLog(str);
    return 1;
}
Reply
#8

PHP код:
CellStat[c][PickupID] = CreateDynamicPickup(127223CellStat[c][ExteriorX], CellStat[c][ExteriorY], CellStat[c][ExteriorZ], 0, -1, -1100.0); 
PHP код:
CreateDynamicPickup(127223bla bla bla); 
1272 = Blue house

Change it to :

1273 = Green House
Reply
#9

Breto thx, but can you copy my code and then put yours code, beacuse i am begginer in scripting, i try but error comes out... If put yours code into my code and post it?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)