need help pls
#1

when someone tries to buy house it says Feature disable..
But how can i enable it?
pawn Код:
if(HousingOn == 0) return SendClientMessage(playerid, COLOR_RED,"Feature Disabled: Buying new houses is currently unavailable");
Reply
#2

Change the variable 'HousingOn' to 1 (or any value other than 0) somewhere, most likely in OnFilterScriptInit. An example would be
pawn Код:
public OnFilterScriptInit( )
{
   HousingOn = 1;
   return 1;
}
Reply
#3

ty i saw it....but i didnt seen it under onfilerscriptinit i saw it like where the new and define and foward is on top but i saw it ..changed it to 1 ...gonna test TY
Reply
#4

Yeah, that will work fine to, I suppose.
Reply
#5

ok i tested didnt work (
Reply
#6

Then do a command setting on/off..
pawn Код:
if(strcmp("/on",cmdtext,true,10) == 0)
{
    HousingOn=1;
    return 1;
}
if(strcmp("/off",cmdtext,true,10) == 0)
{
    HousingOn=0;
    return 1;
}
Also do you have a condition which checks if the "HousingOn" is on/off while attemp to buyin' a house?
Reply
#7

Quote:
Originally Posted by blackwave
Посмотреть сообщение
Then do a command setting on/off..
pawn Код:
if(strcmp("/on",cmdtext,true,10) == 0)
{
    HousingOn=1;
    return 1;
}
if(strcmp("/off",cmdtext,true,10) == 0)
{
    HousingOn=0;
    return 1;
}
Also do you have a condition which checks if the "HousingOn" is on/off while attemp to buyin' a house?
what's the point? its already 1 by manual so...doesnt make a difference...
any other ideas?
Reply
#8

Try to enum it

pawn Код:
enum HousingInfo
{
    HousingOn
}
new HousingInfo[HousingInfo];
So now we will use:
pawn Код:
if(strcmp("/on",cmdtext,true,10) == 0)
{
    HousingInfo[HousingOn] = 1;
    return 1;
}
if(strcmp("/off",cmdtext,true,10) == 0)
{
    HousingInfo[HousingOn] = 0;
    return 1;
}
Reply
#9

There is no need to create something that takes up more memory when not needed.

Search in the script (CTR + F) for "HousingOn = 0" or "HousingOn=0" - If there are any results, replace the '0' with '1'.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)