House system problem ?
#3

PHP код:
if(strcmp(cmd"/createhouse"true) == 0)
{
    
//You don't need to check if player is connected ...
    
if(PlayerInfo[playerid][pAdmin] < 3)return SendClientMessage(playeridCOLOR_GRAD1"You don't have acces to use this command.");
    new 
type,price,level,interior;
    if(
sscanf(cmd"dddd"type,price,level,interior)){
        
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /createhouse [type] [price] [level] [interior]");
        
SendClientMessage(playeridCOLOR_GRAD2"TYPE: (1) Small , Medium , Big");
        return 
1;
    }
    
GetPlayerPos(playeridHouseInfo[hid][hEntrancex], HouseInfo[hid][hEntrancey], HouseInfo[hid][hEntrancez]);
    new 
hid sHouse 1;
    
HouseInfo[hid][hOwned] = 0;
    
HouseInfo[hid][hRent] = 0;
    
HouseInfo[hid][hLevel] = level;
    
HouseInfo[hid][hTakings] = 0;
    
format(HouseInfo[hid][hOwner], 24"No-One");//MAX name length 24    
    
if(type == 1){
        if(
interior == 1){
            
HouseInfo[hid][hType] = 1;
            
HouseInfo[hid][hInt] = 10;
            
HouseInfo[hid][hExitx] = 2259.38;
            
HouseInfo[hid][hExity] = -1135.77;
            
HouseInfo[hid][hExitz] = 1050.64;             
        }
    }
    new 
fftext[20];
    if(
HouseInfo[hid][hType] == 1) { fftext "mic"; }
    
HouseInfo[hid][hPickup] = AddStaticPickup(127323HouseInfo[hid][hEntrancex],HouseInfo[hid][hEntrancey], HouseInfo[hid][hEntrancez]);
    
format(stringsizeof(string), "[ Casa de vanzare ]\n\n( Pret de cumparare %d$ )\n( Nivelul necesar %d )\n( Interiorul este %s )"HouseInfo[hid][hValue], HouseInfo[hid][hLevel], fftext);
    
HouseInfo[hid][hText3D] = CreateDynamic3DTextLabel(stringCOLOR_GROVEHouseInfo[hid][hEntrancex],HouseInfo[hid][hEntrancey], HouseInfo[hid][hEntrancez],10.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,0,-1,-145.0);
    
sHouse++;
    
printf(" Am creat casa %d"sHouse);
    return 
1;

Reply


Messages In This Thread
House system problem ? - by Metharon - 10.06.2015, 14:43
Re: House system problem ? - by Jimmy0wns - 10.06.2015, 14:50
Re: House system problem ? - by CodeStyle175 - 10.06.2015, 15:12

Forum Jump:


Users browsing this thread: 1 Guest(s)