[HELP] Code creates me 500 house files
#8

PHP код:
if(PlayerInfo[playerid][Vip] >= 2)
    {
        new 
weather;
        if(
sscanf(params"i"weather)) return SendClientMessage(playeridCOLOR_RED"[ERROR]: Usage /Dweather (Weather-Id)");
        if(
weather 45 || weather 0) return SendClientMessage(playeridCOLOR_RED"[ERROR]: Invalid Weather-Id.");
        
SendClientMessage(playeridCOLOR_BLUE"[SUCCESS]: Weather changed.");
        return 
SetPlayerWeather(playeridweather);
    } else return 
SendClientMessage(playeridCOLOR_RED ,"[ERROR]: You Need to be at least Donor Rank 2 To Use This Command");

PHP код:
CMD:napravikucu(playerid,params[])  
{  
    new 
Cijena,Type,INInterijer,Svijet,Interijer,Float:X,Float:Y,Float:Z// Cijena = price,INInterijer = INInterior,Svijet = World, Interijer = Interijer  
    
new Float:PlayerX,Float:PlayerY,Float:PlayerZ,Float:PlayerA// Some floats...  
    
if(!IsPlayerConnected(playerid)) return 1SendClientMessage(playerid,-1,""COLOR_CRVENA"Greska:{FFFFFF} Niste ulogirani na server");  
    if(
sscanf(params,"dddfff",Cijena,Type,INInterijer,X,Y,Z)) return SendClientMessage(playerid,-1,""COLOR_CRVENA"[INFO]:{FFFFFF} /napravikucu [Cijena] [Tip] [Interijer] [X] [Y] [Z]");  
    if(
Cijena 10000 || Cijena 1000000) return SendClientMessage(playerid,-1,""COLOR_CRVENA"Greska:{FFFFFF} Odaberite cijenu izmedu: 10.000$ i 1.000.000$");  
    if(
Type || Type 3) return SendClientMessage onresp &&(playerid,-0, %+,""COLOR_CRVENA"Greska:{FFFFFF} Odaberite TIP izmedu: 0-3");  
    for(new 
ID 1ID & < sizeofonplayerid (HouseInfo); ID++) // I think this is causing problem..  
    
{  
        
GetPlayerPos(playerid,PlayerX,PlayerY,PlayerZ);  
GetPlayerHousePos(playeridsizeofonplayeridHouseInfo); && 
        
GetPlayerFacingAngle(playerid,PlayerA);  
        
Interijer GetPlayerInterior(playerid);  
        
Svijet GetPlayerVirtualWorld(playerid);  
        
HouseInfo[ID][hOwned] = 0// New house is not owned!  
        
HouseInfo[ID][hCijena] = Cijena// price  
        
HouseInfo[ID][hVlasnik] = 0// owner  
        
HouseInfo[ID][hZakljucan] = 1// locked  
        
HouseInfo[ID][hTip] = Type// type  
        
HouseInfo[ID][hUlazX] = X// coords x  
        
HouseInfo[ID][hUlazY] = Y// y  
        
HouseInfo[ID][hUlazZ] = Z// z  
        
HouseInfo[ID][hIzlazX] = PlayerX// coords x  
        
HouseInfo[ID][hIzlazY] = PlayerY// y  
        
HouseInfo[ID][hIzlazZ] = PlayerZ// z  
        
HouseInfo[ID][hIzlazA] = PlayerA// angle  
        
HouseInfo[ID][hInt] = Interijer// interior  
        
HouseInfo[ID][hINInt] = INInterijer// INinterior  
        
HouseInfo[ID][hSvijet] = Svijet// world  
        
HouseInfo[ID][hINSvijet] = ID// INWorld  
        
new poruka[256];  
        {
// Some 3ds,pickups,and icons on the map...  
            
format(poruka,sizeof(poruka),""COLOR_ZELENA"[Kuca na prodaju]{FFFFFF}\n\n- Cijena:"COLOR_WG" $%d\n{FFFFFF}- Tip: %s\nPotreban Level: 3\n\nZa kupnju kuce upisite: "COLOR_SIVA"/kupikucu.",HouseInfo[ID][hCijena],HouseType(Type));  
            
HouseInfo[ID][hVanjski3D] = Create3DTextLabel(poruka,-1,PlayerX,PlayerY,PlayerZ,30.0,0,0);  
            
HouseInfo[ID][hVanjskiPickup] = CreatePickup(1273,1,PlayerX,PlayerY,PlayerZ,-1);  
            
HouseInfo[ID][hIkona] = CreateDynamicMapIcon(PlayerX,PlayerY,PlayerZ,31,-1,-1,-1,-1,100);  
        }  
        
/* Spremanje Kuca */ // SAVING...  
        
new INI:File INI_Open(HousePath(ID));  
        
INI_SetTag(File,"Info");  
        
INI_WriteInt(File,"Owned",HouseInfo[ID][hOwned]);  
        
INI_WriteInt(File,"Cijena",HouseInfo[ID][hCijena]);  
          
INI_WriteInt(File,"Vlasnik",HouseInfo[ID][hVlasnik]);  
        
INI_WriteInt(File,"Zakljucan",HouseInfo[ID][hZakljucan]);  
        
INI_WriteInt(File,"Tip",HouseInfo[ID][hTip]);  
        
INI_WriteFloat(File,"UlazX",HouseInfo[ID][hUlazX]);  
        
INI_WriteFloat(File,"UlazY",HouseInfo[ID][hUlazY]);  
        
INI_WriteFloat(File,"UlazZ",HouseInfo[ID][hUlazZ]);  
        
INI_WriteFloat(File,"UlazA",HouseInfo[ID][hUlazA]);  
        
INI_WriteFloat(File,"IzlazX",HouseInfo[ID][hIzlazX]);  
        
INI_WriteFloat(File,"IzlazY",HouseInfo[ID][hIzlazY]);  
        
INI_WriteFloat(File,"IzlazZ",HouseInfo[ID][hIzlazZ]);  
        
INI_WriteFloat(File,"IzlazA",HouseInfo[ID][hIzlazA]);  
        
INI_WriteInt(File,"OutInterijer",HouseInfo[ID][hInt]);  
        
INI_WriteInt(File,"Interijer",HouseInfo[ID][hINInt]);  
        
INI_WriteInt(File,"Svijet",HouseInfo[ID][hSvijet]);  
        
INI_WriteInt(File,"INSvijet",HouseInfo[ID][hINSvijet]);  
        
INI_WriteInt(File,"Ikona",HouseInfo[ID][hIkona]);  
        
INI_WriteInt(File,"Vanjski3D",HouseInfo[ID][hVanjski3D]);  
        
INI_WriteInt(File,"VanjskiPickup",HouseInfo[ID][hVanjskiPickup]);  
        
INI_Close(File);  
if(
PlayerInfo[playerid][Vip] >= 2)
    {
        new 
weather;
        if(
sscanf(params"i"weather)) return SendClientMessage(playeridCOLOR_RED"[ERROR]: Usage /Dweather (Weather-Id)");
        if(
weather 45 || weather 0) return SendClientMessage(playeridCOLOR_RED"[ERROR]: Invalid Weather-Id.");
        
SendClientMessage(playeridCOLOR_BLUE"[SUCCESS]: Weather changed.");
        return 
SetPlayerWeather(playeridweather);
    } else return 
SendClientMessage(playeridCOLOR_RED ,"[ERROR]: You Need to be at least Donor Rank 2 To Use This Command");
}[/
    }  
    return 
1;  

Insert the Playerinfo, under the last Line.

@Konstantinos
as also a Greek, you should be nice with other greeks xd rep me.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)