SA-MP Forums Archive
Help House - 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: Help House (/showthread.php?tid=630697)



Help House - ommar8080 - 17.03.2017

Hi
i Tired To Change Pickup house to checkpoints but there error
Quote:

C:\Users\Housesss.pwn(102) : error 017: undefined symbol "CreateDynamicCheckpoint"
C:\Users\Housesss.pwn(13 : error 017: undefined symbol "CreateDynamicCheckpoint"
C:\Users\Housesss.pwn(169) : error 017: undefined symbol "CreateDynamicCheckpoint"
C:\Users\Housesss.pwn(450) : error 017: undefined symbol "CreateDynamicCheckpoint"
C:\Users\Housesss.pwn(455) : error 017: undefined symbol "CreateDynamicCheckpoint"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

this i tired to change it to CP u see that
PHP код:
    HouseInfo[houseid][hPick] = CreateDynamicCheckpoint(XYZ3.0); 
this old for pickups
PHP код:
    HouseInfo[houseid][hPick] = CreatePickup(12731XYZ0); 
need help to change it with out error i want it checkpoint
+Rep


Re: Help House - lackmail - 17.03.2017

if you are using streamer then its CreateDynamicCP not CreateDynamicCheckpoint


Re: Help House - Toroi - 17.03.2017

Did you download the streamer files and includes?

EDIT: nvm, the first answer should do the trick


Re: Help House - ommar8080 - 17.03.2017

im using already streamer.inc and streamer plugins always using it


Re: Help House - Bolex_ - 17.03.2017

Update your streamer


Re: Help House - ommar8080 - 17.03.2017

Quote:
Originally Posted by Scripter18
Посмотреть сообщение
Update your streamer
i'm already updated my all inc and plugins


Re: Help House - Bolex_ - 17.03.2017

Use CreateDynamicCP


Re: Help House - ommar8080 - 17.03.2017

Quote:
Originally Posted by Scripter18
Посмотреть сообщение
Use CreateDynamicCP
+rep thanks fixed
1 question how i can make max buying house for 1player like 2 house only!
PHP код:
CMD:buyhouse(playeridparams[])
{
    new 
name[MAX_PLAYER_NAME], labelstring[144], string[144], file[50];
    
GetPlayerName(playeridnamesizeof(name));
    for(new 
0MAX_HOUSESi++)
    {
        if(
IsPlayerInRangeOfPoint(playerid5.0HouseInfo[i][hX], HouseInfo[i][hY], HouseInfo[i][hZ]))
        {
            if(
HouseInfo[i][hOwned] == 1) return SendClientMessage(playerid, -1"{FF0000}ERROR: {FFFFFF}This house have an Owner.");
            if(
GetPlayerMoney(playerid) < HouseInfo[i][hPrice]) return SendClientMessage(playerid, -1"{FF0000}ERROR: {FFFFFF}You don't have enough money.");
            
DestroyPickup(HouseInfo[i][hPick]);
            
format(labelstringsizeof(labelstring), "{15FF00}House ID: {FFFFFF}%d\n{15FF00}Owner: {FFFFFF}%s\n{15FF00}Price: {FFFFFF}%d"inameHouseInfo[i][hPrice]);
            
HouseInfo[i][hPick] = CreateDynamicCP(HouseInfo[i][hX], HouseInfo[i][hY], HouseInfo[i][hZ],1.0);
            
Update3DTextLabelText(HouseInfo[i][hLabel], 0xFFFFFFFFlabelstring);
            
format(stringsizeof(string), "{FF0000}[HOUSE]: {FFFFFF}You bought house ID: {FF0000}%d {FFFFFF}for {FF0000}$ %d."iHouseInfo[i][hPrice]);
            
SendClientMessage(playerid, -1string);
            
HouseInfo[i][hOwned] = 1;
            
HouseInfo[i][hOwner] = name;
            
format(filesizeof(file), "Houses/%d.ini"i);
            if(
fexist(file))
            {
                
dini_IntSet(file"Owned"1);
                
dini_Set(file"Owner"name);
            }
        }
    }
    return 
1;




Re: Help House - LazzyBoy - 17.03.2017

Somewhere at top of your script or house enum

Код:
new maxHouses[MAX_PLAYERS];
Add this when a player buys a house
Код:
maxHouses[playerid]++;
at command /buyhouse or whatever it is
Код:
if(maxHouses[playerid] == 2) return SendClientMessage(playerid,-1,"You can only own  2 houses");



Re: Help House - ommar8080 - 17.03.2017

i can buy more 2
PHP код:
CMD:buyhouse(playeridparams[])
{
    new 
name[MAX_PLAYER_NAME], labelstring[144], string[144], file[50];
    
GetPlayerName(playeridnamesizeof(name));
    for(new 
0MAX_HOUSESi++)
    {
        if(
IsPlayerInRangeOfPoint(playerid5.0HouseInfo[i][hX], HouseInfo[i][hY], HouseInfo[i][hZ]))
        {
            if(
HouseInfo[i][hOwned] == 1) return SendClientMessage(playerid, -1"{FF0000}ERROR: {FFFFFF}This house have an Owner.");
            if(
GetPlayerMoney(playerid) < HouseInfo[i][hPrice]) return SendClientMessage(playerid, -1"{FF0000}ERROR: {FFFFFF}You don't have enough money.");
            
maxHouses[playerid]++;
            if(
maxHouses[playerid] == 2) return SendClientMessage(playerid,-1,"You can only own  2 houses");
            
DestroyPickup(HouseInfo[i][hPick]);
            
format(labelstringsizeof(labelstring), "{15FF00}House ID: {FFFFFF}%d\n{15FF00}Owner: {FFFFFF}%s\n{15FF00}Price: {FFFFFF}%d"inameHouseInfo[i][hPrice]);
            
HouseInfo[i][hPick] = CreatePickup(12721HouseInfo[i][hX], HouseInfo[i][hY], HouseInfo[i][hZ]);
            
Update3DTextLabelText(HouseInfo[i][hLabel], 0xFFFFFFFFlabelstring);
            
format(stringsizeof(string), "{FF0000}[HOUSE]: {FFFFFF}You bought house ID: {FF0000}%d {FFFFFF}for {FF0000}$ %d."iHouseInfo[i][hPrice]);
            
SendClientMessage(playerid, -1string);
            
HouseInfo[i][hOwned] = 1;
            
HouseInfo[i][hOwner] = name;
            
format(filesizeof(file), "Houses/%d.ini"i);
            if(
fexist(file))
            {
                
dini_IntSet(file"Owned"1);
                
dini_Set(file"Owner"name);
            }
        }
    }
    return 
1;

i still can buying what ever like 1000