[Pomoc] ID 0

Započeo MEMOREX™️, Februar 10, 2012, 01:26:40 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Scripta: Moja
Problem: Ovako, Uradio sam kad dodje igrac na neki korditant a to je na vrh zgrade da dobije padobran, a kad ima vise igraca na serveru od 1 . Moze taj padobran uzeti ID samo 0 i to imam bug na jos vise toga, npr: Neki textdraw na kucama, vidi samo ID 0. i kad puni kamion posao moze samo id 0...
Dio Scripte:
Padobran :

forward CustomsPickups(playerid);
public CustomsPickups(playerid)
{
//new PlayerNamee[MAX_PLAYER_NAME];
                if(PlayerToPoint(100.0,playerid,-353.9235,1174.6011,19.7422))
    {
       if (PlayerInfo[playerid][pAdmin] >=1 || PlayerInfo[playerid][pGameMaster] >= 1)
       {
                     return 1;
                   }
                   else
                   {
                   SendClientMessage(playerid, COLOR_LIGHTRED, "FATAL ERROR: Usli ste u zabranjeno podrucie. Te ste dobili Automacki kick");
                   TogglePlayerControllable(playerid, 0);
                   Kick(playerid);
   return 1;
                   }
                }
                if(PlayerToPoint(5.0,playerid,1544.5060,-1353.1533,329.4746))
                {
                GivePlayerWeapon(playerid, 46, 999);
        SendClientMessage(playerid, COLOR_GOLD, "INFO: Uspjesno ste izeli padobran, te mozete da skacete.");
        padobran1[playerid] = 1;
                }
                return 1;
}
i stavio sam , OnGameModeInit()
SetTimer("CustomsPickups", 1000, 1);

TextDraw na Kucama:

Tu je jos 1 bug, Kad jedan igrac gleda text draw, a dodje na drugo mesto tj na drugu kucu, pomesa im se textdraw msm Vlasnik, LvL
forward CustomPickups();
public CustomPickups()
{
new Float:oldposx, Float:oldposy, Float:oldposz;
//new string[528];
new string[528];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, oldposx, oldposy, oldposz);
// new tmpcar = GetPlayerVehicleID(i);
if(oldposx!=0.0 && oldposy!=0.0 && oldposz!=0.0)
{
                /*for(new h = 0; h < sizeof(SBizzInfo); h++)
{
if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
{
format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",SBizzInfo[h][sbMessage],(SBizzInfo[h][sbMaxProducts]-SBizzInfo[h][sbProducts]),SBizzInfo[h][sbPriceProd],SBizzInfo[h][sbTill]);
GameTextForPlayer(i, string, 5000, 3);
return 1;
}
if(PlayerToPoint(1.0, i, SBizzInfo[h][sbEntranceX], SBizzInfo[h][sbEntranceY], SBizzInfo[h][sbEntranceZ]))
{
if(SBizzInfo[h][sbOwned] == 1)
{
format(string, sizeof(string), "~w~%s~w~~n~Owner : %s~n~Extortion by : %s~n~Entrance Fee : ~g~$%d ~w~Level : %d ~n~to enter type /enter",SBizzInfo[h][sbMessage],SBizzInfo[h][sbOwner],SBizzInfo[h][sbExtortion],SBizzInfo[h][sbEntranceCost],SBizzInfo[h][sbLevelNeeded]);
}
else
{
format(string, sizeof(string), "~w~%s~w~~n~Biznis na prodaju~n~Cijena: ~g~$%d ~w~Level : %d ~n~Da kupis ovaj biz ukucaj /buybiz",SBizzInfo[h][sbMessage],SBizzInfo[h][sbBuyPrice],SBizzInfo[h][sbLevelNeeded]);
}
GameTextForPlayer(i, string, 5000, 3);
return 1;
}
}*/
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerToPoint(2.0, i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
{
if(HouseInfo[h][hOwned] == 1)
{
if(HouseInfo[h][hRentabil] == 0)
{
format(string, sizeof(string), "~y~Vlasnik ~w~%s~n~~y~Kuca nije dostupna za rentanje~n~~y~Level ~w~%d ",HouseInfo[h][hOwner],HouseInfo[h][hLevel]);
TextDrawSetString(House1, string);
                                TextDrawShowForPlayer(i, House1);
                                TextDrawShowForPlayer(i, House2);
                SetTimerEx("UnistiTDKuce",6000,0,"d",i);
}
else
{
format(string, sizeof(string), "~y~Vlasnik ~w~%s~n~~y~Rent: ~w~$%d~n~~y~Level: ~w~%d~n~~y~/rentroom",HouseInfo[h][hOwner],HouseInfo[h][hRent],HouseInfo[h][hLevel]);
                        TextDrawSetString(House1, string);
                                TextDrawShowForPlayer(i, House1);
                                TextDrawShowForPlayer(i, House2);
                SetTimerEx("UnistiTDKuce",6000,0,"d",i);
                 }
                 if(HouseInfo[h][hBanned] == 1)
                 {
                    format(string, sizeof(string), "~r~Kuca Banovanog igraca!~y~Vlasnik ~w~%s~n~~y~Level ~w~%d ",HouseInfo[h][hOwner],HouseInfo[h][hLevel]);
TextDrawSetString(House1, string);
                                TextDrawShowForPlayer(i, House1);
                                TextDrawShowForPlayer(i, House2);
                SetTimerEx("UnistiTDKuce",6000,0,"d",i);
                 }
return 1;
}
else
{
format(string, sizeof(string), "~g~Kuca je na prodaju~n~~w~%s~n~$%d~n~%d Level~n~~y~/buyhouse",HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hLevel]);
    TextDrawSetString(House1, string);
                            TextDrawShowForPlayer(i, House1);
                            TextDrawShowForPlayer(i, House2);
            SetTimerEx("UnistiTDKuce",6000,0,"d",i);
                        }
return 1;
}
}
for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(PlayerToPoint(2.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
{
if(BizzInfo[h][bOwned] == 1)
{
format(string, sizeof(string), "~w~%s~n~~g~Vlasnik: ~w~%s~n~~g~Reket: ~w~%s~n~~g~CjenaUlaza: ~w~$%d~n~~g~LeveL: %d",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost],BizzInfo[h][bLevelNeeded]);
TextDrawSetString(Bizz1, string);
                                TextDrawShowForPlayer(i, Bizz1);
                                TextDrawShowForPlayer(i, Bizz2);
                SetTimerEx("UnistiTDKuce",6000,0,"d",i);
    return 1;
}
else
{
format(string, sizeof(string), "~w~%s~n~~g~Biznis je na prodaju~n~~g~Cjena: ~w~$%d~n~~g~Level: ~w~%d~n~Da kupis biznis /buybiz",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
    TextDrawSetString(Bizz1, string);
                            TextDrawShowForPlayer(i, Bizz1);
                            TextDrawShowForPlayer(i, Bizz2);
            SetTimerEx("UnistiTDKuce",6000,0,"d",i);
                        }
return 1;
}
}
    if(PlayerToPoint(3.0,i,359.3790,182.2823,1008.3828))
    {
                GameTextForPlayer(i, "~w~Ured za zaposljavanje~n~~w~Ukucajte ~r~~h~~h~~h~~h~/takejob~w~ da uzmete posao.", 5000, 3);
    }
/*for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerToPoint(1.0, i, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]))
{
if(HouseInfo[h][hOwned] == 1)
{
if(HouseInfo[h][hRentabil] == 0)
{
format(string, sizeof(string), "~g~%s's crib~n~~w~Dostupne komande: /enter ",HouseInfo[h][hOwner]);
}
else
{
format(string, sizeof(string), "~w~Ova kuca se moze rentati~n~~g~Vlasnik %s Rent: $%d~n~~w~Dostupne komande: /enter /rentroom",HouseInfo[h][hOwner],HouseInfo[h][hRent]);
}
new playerid;
SetPlayerCheckpoint(playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 1.0);
TextDrawShowForPlayer(playerid, kucatext);
TextDrawSetString(kucatext, string);
SetTimer("UnistiText", 5000, 0);
return 1;
}
else
{
format(string, sizeof(string), "~g~Ova kuca je na prodaju: Cijena: $%d Level: %d~n~~w~Dostupne komande: /enter /buyhouse",HouseInfo[h][hValue],HouseInfo[h][hLevel]);
}
new playerid;
SetPlayerCheckpoint(playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 1.0);
TextDrawShowForPlayer(playerid, kucatext);
TextDrawSetString(kucatext, string);
SetTimer("UnistiText", 5000, 0);
return 1;
}
}*/
/*for(new h = 0; h < sizeof(BizzInfo); h++)
{
if(IsATruck(tmpcar) && PlayerToPoint(10.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
{
format(string, sizeof(string), "~w~%s~n~~r~Products Required~w~: %d~n~~y~Price per Product: ~w~: $%d~n~~g~Funds: ~w~: $%d",BizzInfo[h][bMessage],(BizzInfo[h][bMaxProducts]-BizzInfo[h][bProducts]),BizzInfo[h][bPriceProd],BizzInfo[h][bTill]);
GameTextForPlayer(i, string, 5000, 3);
return 1;
}
if(PlayerToPoint(2.0, i, BizzInfo[h][bEntranceX], BizzInfo[h][bEntranceY], BizzInfo[h][bEntranceZ]))
{
if(BizzInfo[h][bOwned] == 1)
{
format(string, sizeof(string), "~w~%s~w~~n~Vlasnik : %s~n~Reket : %s~n~CjenaUlaza : ~g~$%d ~w~LeveL : %d ~n~za ulazak /enter",BizzInfo[h][bMessage],BizzInfo[h][bOwner],BizzInfo[h][bExtortion],BizzInfo[h][bEntranceCost],BizzInfo[h][bLevelNeeded]);
}
else
{
format(string, sizeof(string), "~w~%s~w~~n~Biznis je na prodaju~n~Cjena: ~g~$%d ~w~LeveL : %d ~n~da kupis biznis /buybiz",BizzInfo[h][bMessage],BizzInfo[h][bBuyPrice],BizzInfo[h][bLevelNeeded]);
}
GameTextForPlayer(i, string, 5000, 3);
return 1;
}
}*/
}
}
}
return 1;
}
I Pod OnGameModeInit()
SetTimer("CustomPickups", 1000, 1);

Molio bih pomoc
Slike://
Skriptam za pare


Skinuo i isto :(((( Pomoc molim .
Skriptam za pare