Need Help with house system
#1

Hello guys i have created house rent system on my system if anyone rent my house then the name of that player will show on house pickup example Renter: playername but i am getting problem with my code in my house system 4 players can rent my house so it will looks like Renter: playername1, playername2, playername3, playername4 but with my code its showing Renter: ,playername1, playername2, playername3, playername4 please help me and create like 1st option here is my code

PHP код:
if (dini_Int(AddDirFile(dir_propfiles, string), "bought") == 1)
        {
            new 
GetString[256], GetString1[256], GetString2[256], GetString3[256], GetString4[256];
            new 
proptantscost = dini_Int(AddDirFile(dir_propfiles, string), "TenantsCost");
            new 
Tenants = dini_Int(AddDirFile(dir_propfiles, string), "Tenants");
            if(
dini_Int(AddDirFile(dir_propfiles, string), "Tenants") != 0)
            {
                new  
rentstring1[256], rstring[33];
                for(new 
rz = 1; rz <= Tenants; rz++)
                {
                    
format(rstring, 33, "house_tant_%d", rz);
                    
                       if (
strcmp(GetString, "None", false) != 0)
                    {
                            
format(rentstring1, sizeof(rentstring1), "%s, %s", rentstring1, GetString);
                    }
                }
                
format(tmp, 150, "Owner: %s\nTo let for $%d per day.\nTenants: %s", dini_Get(AddDirFile(dir_propfiles, string), "owner"), proptantscost, rentstring1);
                
temp2 = CreatePickup(19524, 1, x, y, z, -1);
                
ptextlabel[b] = Create3DTextLabel(tmp, 0xFFFF00FF, x, y, z + 0.75, 17.5, 0, 1);
            }
            else
            {
                
temp2 = CreatePickup(1272, 1, x, y, z, -1);
                
format(tmp, 32, "Owner: %s", dini_Get(AddDirFile(dir_propfiles, string), "owner"));
                
ptextlabel[b] = Create3DTextLabel(tmp, 0x006699EE, x, y, z + 0.75, 17.5, 0, 1);
            }
            
ppropids[b] = temp2;
            
pmapicon[b] = CreateDynamicMapIcon(x, y, z, 32, 0, -1, 0, -1, 600.0);
        } 
I want to create like
Renter: playername1, playername2, playername3, playername4
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)