House system
#1

Hello guys i converted sandra's prop system to house system but have some issues

PHP код:
CMD:addhouse(playeridparams[])
{
    new 
price2;
    if(
sscanf(params"d"price2))
        return 
SendClientMessage(playerid0xFFFFFFAA"Use: /addhouse [price]");
    if(
price2 10)
        return 
SendClientMessage(playerid0xFF0000FF,"Error: Price must be higher than 10"); //change this price if you want..
    // if(sell2 < 10) //i forgot they are just normal numbers. Strval is only used if you have a string, and you want to know it's value xd k wait a sec
    //     return SendClientMessage(playerid, 0xFF0000FF,"Error: Sell value must be higher than 10"); //change this value if you want..
       
static PropertyCount;
   
PropertyCount += 1;
    if(!
IsPlayerAdmin(playerid)) 
        return 
0;
    new 
Float:XFloat:YFloat:Z;
    
GetPlayerPos(playeridXYZ);
    
//AddProperty(X,Y,Z, price2); //this calls a function that creates the pickup and assigns the variables.
    
HouseInfo[PropertyCount][HouseExists] = 1;
    
HouseInfo[PropertyCount][HouseX] = X;
    
HouseInfo[PropertyCount][HouseY] = Y;
    
HouseInfo[PropertyCount][HouseZ] = Z;
    
HouseInfo[PropertyCount][HouseValue] = price2;
    
HouseInfo[PropertyCount][HouseOwner] = -1;
    
HouseInfo[houseid][HouseIsBought] = 0;
    
PropertyPickup[PropertyCount] = CreatePickup(12721XYZ);
    new 
entry[128], entry2[128];
    new 
File:hFile;
    
format(entry128"AddProperty(%.2f, %.2f, %.2f, %d);"XYZprice2); //it only add's it to a file, and this has to be read.
    
format(entry2128"\r\n%s",entry);
    
hFile fopen("SavedProperties.txt"io_append);
    
fwrite(hFileentry2);
    
fclose(hFile);
    return 
1;

in game the pickup is showing but without info
Reply


Messages In This Thread
House system - by Loinal - 06.05.2017, 21:08
Re: House system - by Loinal - 07.05.2017, 05:10
Re: House system - by ShihabSoft - 07.05.2017, 06:59
Re: House system - by YouHack - 07.05.2017, 10:19
Re: House system - by Loinal - 07.05.2017, 10:44
Re: House system - by YouHack - 07.05.2017, 10:47
Re: House system - by Loinal - 07.05.2017, 10:49
Re: House system - by ShihabSoft - 07.05.2017, 10:51
Re: House system - by YouHack - 07.05.2017, 10:55
Re: House system - by Loinal - 07.05.2017, 11:02

Forum Jump:


Users browsing this thread: 2 Guest(s)