little help thanks,
#1

Is it possible if this:
PHP код:
if(Houses[house][EHouseOwnerSQLID] = GetPVarInt(playerid"CharID")) { 
then spawn player at the house he owns..


PHP код:
SetPlayerPos(playeridHouses[i][EHouseX],Houses[i][EHouseY],Houses[i][EHouseZ]); 
for ref.

PHP код:
YCMD:buyhouse(playeridparams[], help) {
    new 
msg[128];
    if(
help) {
        
SendClientMessage(playeridX11_WHITE"Used for buying a house");
        return 
1;
    }
    new 
num GetNumOwnedHouses(playerid);
    if(
num >= GetPVarInt(playerid"MaxHouses")) {
        
SendClientMessage(playeridX11_TOMATO_2"You cannot own any more houses!");
        return 
1;
    }
    new 
house getStandingHouse(playerid);
    if(
house == -1) {
        
SendClientMessage(playeridX11_TOMATO_2"You must be standing near a house");
        return 
1;
    }
    if(
Houses[house][EHouseOwnerSQLID] != 0) {
        
SendClientMessage(playeridX11_TOMATO_2"This house is already owned by someone");
        return 
1;
    }
    new 
confirmtext[32];
    if(!
sscanf(params,"s[32]",confirmtext)) {
        if(
strcmp(confirmtext,"confirm"true) != 0) {
            
SendClientMessage(playeridX11_TOMATO_2"You must type /buyhouse confirm");
            return 
1;
        }
    } else {
        
format(msgsizeof(msg), "* This house costs $%s, type /buyhouse confirm",getNumberString(Houses[house][EHouseValue]));
        
SendClientMessage(playeridCOLOR_LIGHTGREENmsg);
        return 
1;
    }
    new 
money GetMoneyEx(playerid);
    if(
money Houses[house][EHouseValue]) {
        
format(msgsizeof(msg), "You do not have enough money, you need $%s more to buy this house.",getNumberString(Houses[house][EHouseValue]-money));
        
SendClientMessage(playeridX11_TOMATO_2msg);
        return 
1;
    }
    
GiveMoneyEx(playerid, -Houses[house][EHouseValue]);
    
setHouseOwner(houseplayerid);
    
SendClientMessage(playeridCOLOR_LIGHTGREEN"* Congratulations on your new house!");
    return 
1;

thanks..
Reply


Messages In This Thread
little help thanks, - by Puff - 06.12.2017, 13:10
Re: little help thanks, - by Lucases - 06.12.2017, 13:39
Re: little help thanks, - by thefirestate - 06.12.2017, 14:09

Forum Jump:


Users browsing this thread: 1 Guest(s)