SA-MP Forums Archive
CreateHouse: not working rite the second time. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CreateHouse: not working rite the second time. (/showthread.php?tid=373790)



CreateHouse: not working rite the second time. - TaLhA XIV - 31.08.2012

Hello,
Okay now I made a create house cmd but I have a problem.The problem is that when I use the cmd it create the house as I want but when i try to create a second house,it creates the pickup but not the 3d textlable.No error or warning.

codes:

PHP код:
CMD:createhouse(playeridparams[])
{
        if(
IsPlayerAdmin(playerid))
        {
            new 
Float:x,Float:y,Float:z;
            new 
HousePrice,id HouseCount;
            
GetPlayerPos(playerid,x,y,z);
            if(
sscanf(params,"i",HousePrice)) return SendClientMessage(playerid,-1,"USAGE: /createhouse <price>");
            
HInfo[id][Price] = HousePrice;
            
HInfo[id][XPos] = x;
            
HInfo[id][YPos] = y;
            
HInfo[id][ZPos] = z;
            new 
file[40],labelstring[100];
            
format(HInfo[id][Owner],24,"NoOwner");
            
SendClientMessage(playerid,-1,"House created");
            
HouseEnter[id]  = CreateDynamicCP(x,y,z,1.5,GetPlayerVirtualWorld(playerid));
            
HouseExit[id] = CreateDynamicCP(443.9237,509.4609,1001.4195,1.5,GetPlayerVirtualWorld(playerid));
            
format(file,sizeof(file),"FHouse/Houses/%i.ini",id);
            
INI_Open(file);
            new 
INI:File INI_Open(UserPath(playerid));
            
INI_SetTag(File,"housedata");
            
INI_WriteInt(File,"Price",HousePrice);
            
INI_WriteInt(File,"Owned",0);
            
INI_WriteInt(File,"VirtualWorld",GetPlayerVirtualWorld(playerid));
            
INI_WriteFloat(File,"XPos",x);
            
INI_WriteFloat(File,"YPos",y);
            
INI_WriteFloat(File,"ZPos",z);
            
INI_WriteString(File,"Owner","NoOwner");
            
INI_Close(File);
            
HInfo[id][VirtualWorld] = GetPlayerVirtualWorld(playerid);
            
format(labelstring,sizeof(labelstring),"Owned: No \nPrice: %i",HousePrice);
            
HInfo[id][HouseLabel] = Create3DTextLabel(labelstring,0xFF0000FF,x,y,z,25.0,GetPlayerVirtualWorld(playerid));
            
HouseCount++;
        }
        return 
1;




Re: CreateHouse: not working rite the second time. - TaLhA XIV - 31.08.2012

Anyone?


Re: CreateHouse: not working rite the second time. - TaLhA XIV - 01.09.2012

anyone?


Re: CreateHouse: not working rite the second time. - shaniyal - 01.09.2012

pls stop bumping ur request again and again,JUST WAIT


Re: CreateHouse: not working rite the second time. - TaLhA XIV - 01.09.2012

Lol,we are allowed to bump after 24 hours.Anyways any help?


Re: CreateHouse: not working rite the second time. - TaLhA XIV - 01.09.2012

anyone?