SA-MP Forums Archive
House Id Bug!! - 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: House Id Bug!! (/showthread.php?tid=400401)



House Id Bug!! - Windrush - 18.12.2012

pawn Код:
CMD:chouse(playerid,params[])
{
    new HousePrice,id = HouseCount;
    new Float:x,Float:y,Float:z;
    new file[40],labelstring[300];
   
    if(sscanf(params,"i",HousePrice)) return SendClientMessage(playerid,-1,"USAGE: /createhouse <price>");
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,-1,"You aren't an admin!");
   
    GetPlayerPos(playerid,x,y,z);
    HInfo[id][Price] = HousePrice;
    HInfo[id][Owned] = 0;
    HInfo[id][XPos] = x;
    HInfo[id][YPos] = y;
    HInfo[id][ZPos] = z;
    HInfo[id][VirtualWorld] = GetPlayerVirtualWorld(playerid);
    format(HInfo[id][Owner],24,"Nonusablenameforthishouse");
    SendClientMessage(playerid,-1,"House created");
    HouseEnter[id] = CreateDynamicCP(x,y,z,1.5,GetPlayerVirtualWorld(playerid));
   
    format(file,sizeof(file),"FHouse/Houses/%i.ini",id);
    INI_Open(file);
    INI_WriteString("HouseName",DEFAULT_HOUSE_NAME);
    INI_WriteInt("Price",HousePrice);
    INI_WriteInt("Owned",0);
    INI_WriteInt("VirtualWorld",GetPlayerVirtualWorld( playerid));
    INI_WriteFloat("XPos",x);
    INI_WriteFloat("YPos",y);
    INI_WriteFloat("ZPos",z);
    INI_WriteString("Owner","Nonusablenameforthishouse ");
    INI_Save();
    INI_Close();
    format(labelstring,sizeof(labelstring),LABELTEXT1,DEFAULT_HOUSE_NAME,HousePrice,id);
    HInfo[id][HouseLabel] = Create3DTextLabel(labelstring,0xFF0000FF,x,y,z,25.0,GetPlayerVirtualWorld(playerid));
    HouseCount++;
    return 1;
}
pawn Код:
#define LABELTEXT1 "{00FF00}House Name: {0099FF}%s\n{00FF00}House Owner: {FFFFFF}No Owner\n{00FF00}House Value: {FFFFFF}$%d\n{00FF00}For Sale: {FFFFFF}Yes\n{00FF00}House ID: {FFFFFF}%d"
#define LABELTEXT2 "House Name: {FFFFFF}%s\n{FF0000}House Owner: {FFFFFF}%s\n{FF0000}House Value: {FFFFFF}$%d\n{FF0000}For Sale: {FFFFFF}No\n{00BC00}{FF0000}House ID: {FFFFFF}%d"
#define DEFAULT_HOUSE_NAME          "House For Sale!"
[ame]http://www.youtube.com/watch?v=84p5HbUil0Y[/ame]
Whole Code!!



Re: House Id Bug!! - Roel - 18.12.2012

Whats the problem?...


Re: House Id Bug!! - Windrush - 18.12.2012

Watch
[ame]http://www.youtube.com/watch?v=84p5HbUil0Y[/ame]


Re: House Id Bug!! - Roel - 18.12.2012

Ask it to the person who gave you this script, or ask in inside the thread where you downlaoded it, because you won't get a answer here I think.


Re: House Id Bug!! - Windrush - 18.12.2012

Quote:
Originally Posted by Roel
Посмотреть сообщение
Ask it to the person who gave you this script, or ask in inside the thread where you downlaoded it, because you won't get a answer here I think.
I Create It by My Self!!
So.. i Will Ask My Self??


Re: House Id Bug!! - Roel - 18.12.2012

Ow ok, well I still dont see what's wrong.


Re: House Id Bug!! - park4bmx - 18.12.2012

you will need to stream the checkpoint as original checkpoint can only be set onced.
but instead why dont you adda pickup ?