Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: xXxPored poslato Januar 19, 2013, 00:27:20 PRE PODNE

Naslov: [Pomoc] Bizz Label
Poruka od: xXxPored poslato Januar 19, 2013, 00:27:20 PRE PODNE
Skripta koju koristim: moja!
Detaljan opis problema: Ovako, editovao sam Bizz i Sbizz sistem u GF i lijepo ga ubacio radio odlicno :) ali imam jedan problemcic, stoji label lijepo i sve i sad kad ja kucam /kupifirmu npr ja postanem vlasnik i upravljam firmom ali label se ne promijeni dok ne restartujem server :S znaci iako ga kupim ostane da je vlasnik niko ali kad rr onda se pojavi ko je vlasnik!
Dio skripte:
Neke slike ili video....:

Sta treba proslijedim :)
Naslov: Odg: [Pomoc] Bizz Label
Poruka od: Blaeks poslato Januar 19, 2013, 02:37:07 PRE PODNE
koristis funkciju Update3DTextLabelText
Naslov: Odg: [Pomoc] Bizz Label
Poruka od: xXxPored poslato Januar 19, 2013, 08:23:41 PRE PODNE
Da te napomenem da mi sprema u one cfg bizz i sbizz eh sad mi pomozi oko Update3DTextLabelText xD ja fkt pojma nemam SAMP wiki isto da mi pjeva na tunguzijanskom
Naslov: Odg: [Pomoc] Bizz Label
Poruka od: xXxPored poslato Januar 19, 2013, 09:25:45 PRE PODNE
Delete prvi post zaboravio sam ubaciti ovo

        for(new a=0; a<sizeof(BizzInfo); a++)
{
if(BizzInfo[a][bOwned]==0)
{
format(string, 256, "{0099FF}Naziv: {FFFFFF}%s\n{0099FF}Vlasnik: {FFFFFF}%s\n{0099FF}Level: {FFFFFF}%d\n{0099FF}Cijena: {FFFFFF}%d\n{FFFF00}/kupifirmu", BizzInfo[a][bMessage],BizzInfo[a][bOwner], BizzInfo[a][bLevelNeeded], BizzInfo[a][bBuyPrice]);
Create3DTextLabel(string, 0x00FF97FF,BizzInfo[a][bEntranceX], BizzInfo[a][bEntranceY], BizzInfo[a][bEntranceZ],25,0,1);
                        BizzPickup[a] = CreatePickup(1272, 1, BizzInfo[a][bEntranceX], BizzInfo[a][bEntranceY], BizzInfo[a][bEntranceZ]);
}
else
{
format(string, 256, "{0099FF}Naziv: {FFFFFF}%s\n{0099FF}Vlasnik: {FFFFFF}%s\n{0099FF}{0099FF}Level: {FFFFFF}%d", BizzInfo[a][bMessage],BizzInfo[a][bOwner], BizzInfo[a][bLevelNeeded]);
Create3DTextLabel(string, 0x00FF97FF,BizzInfo[a][bEntranceX], BizzInfo[a][bEntranceY], BizzInfo[a][bEntranceZ],25,0,1);
                        BizzPickup[a] = CreatePickup(1272, 1, BizzInfo[a][bEntranceX], BizzInfo[a][bEntranceY], BizzInfo[a][bEntranceZ]);
}
}


Tako ide za bizz eh kako sad da ovaj dole else tj kad je vlasnik da napravim da kad kuca na komadni /kupifirmu da updateuje label!
Naslov: Odg: [Pomoc] Bizz Label
Poruka od: Blaeks poslato Januar 19, 2013, 12:54:25 POSLE PODNE
necu da ti brisem posto samo nemoj da Dpas

stavis ovo u komandu buybiz new stringsbzz[500];
            format(string, 256, "{0099FF}Naziv: {FFFFFF}%s\n{0099FF}Vlasnik: {FFFFFF}%s\n{0099FF}{0099FF}Level: {FFFFFF}%d", BizzInfo[a][bMessage],BizzInfo[a][bOwner], BizzInfo[a][bLevelNeeded]);
            Update3DTextLabelText(bizsale, 0x00FF97FF, stringsbzz);
Naslov: Odg: [Pomoc] Bizz Label
Poruka od: xXxPored poslato Januar 19, 2013, 13:07:14 POSLE PODNE
Citat: Blaeks poslato Januar 19, 2013, 12:54:25 POSLE PODNE
necu da ti brisem posto samo nemoj da Dpas

stavis ovo u komandu buybiz new stringsbzz[500];
            format(string, 256, "{0099FF}Naziv: {FFFFFF}%s\n{0099FF}Vlasnik: {FFFFFF}%s\n{0099FF}{0099FF}Level: {FFFFFF}%d", BizzInfo[a][bMessage],BizzInfo[a][bOwner], BizzInfo[a][bLevelNeeded]);
            Update3DTextLabelText(bizsale, 0x00FF97FF, stringsbzz);


Ok hvala ti nego da te pitam da ovdje gdje format ne ide stringbzz? umjesto string

i sta da stavim umjesto bizsale?



if(strcmp(cmd, "/kupifirmu", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
            new stringsbzz[500];
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
if(PlayerInfo[playerid][pPbiskey] != 255)
{
SendClientMessage(playerid, COLOR_WHITE, "Imas firmu! Da prodas firmu kucaj /firmaprodaj.");
return 1;
}
for(new b = 0; b < sizeof(SBizzInfo); b++)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, SBizzInfo[b][sbEntranceX], SBizzInfo[b][sbEntranceY], SBizzInfo[b][sbEntranceZ]) && SBizzInfo[b][sbOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < SBizzInfo[b][sbLevelNeeded])
{
format(string, sizeof(string), "Moras biti level %d da bi kupio firmu.",SBizzInfo[b][sbLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
if(GetPlayerMoney(playerid) > SBizzInfo[b][sbBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b+100;
SBizzInfo[b][sbOwned] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(SBizzInfo[b][sbOwner], sendername, 0, strlen(sendername), 255);
GivePlayerMoney(playerid,-SBizzInfo[b][sbBuyPrice]);
PlayerPlayMusic(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Cestitamo na vasoj kupovini.");
SendClientMessage(playerid, COLOR_WHITE, "Kucaj /firmapomoc da bi vidio dostupne komande za vodjenje firme.");
OnPropUpdate();
OnPlayerUpdateEx(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Nemas dovoljno novca za kupovinu firme!");
return 1;
}
}
}
for(new b = 0; b < sizeof(BizzInfo); b++)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, BizzInfo[b][bEntranceX], BizzInfo[b][bEntranceY], BizzInfo[b][bEntranceZ]) && BizzInfo[b][bOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < BizzInfo[b][bLevelNeeded])
{
format(string, sizeof(string), "Moras biti Level %d da bi kupio firmu.",BizzInfo[b][bLevelNeeded]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
if(GetPlayerMoney(playerid) > BizzInfo[b][bBuyPrice])
{
PlayerInfo[playerid][pPbiskey] = b;
BizzInfo[b][bOwned] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(BizzInfo[b][bOwner], sendername, 0, strlen(sendername), 255);
GivePlayerMoney(playerid,-BizzInfo[b][bBuyPrice]);
PlayerPlayMusic(playerid);
SetPlayerInterior(playerid,BizzInfo[b][bInterior]);
PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior];
SetPlayerPos(playerid,BizzInfo[b][bExitX],BizzInfo[b][bExitY],BizzInfo[b][bExitZ]);
format(string, 256, "{0099FF}Naziv: {FFFFFF}%s\n{0099FF}Vlasnik: {FFFFFF}%s\n{0099FF}{0099FF}Level: {FFFFFF}%d", BizzInfo[a][bMessage],BizzInfo[a][bOwner], BizzInfo[a][bLevelNeeded]);
            Update3DTextLabelText(bizsale, 0x00FF97FF, stringsbzz);
GameTextForPlayer(playerid, "~w~Dobrodosao~n~Kada zelis izaci iz objekta priblizi se vratima i kucaj /exit.", 5000, 3);
PlayerInfo[playerid][pInt] = BizzInfo[b][bInterior];
PlayerInfo[playerid][pLocal] = b ;
SendClientMessage(playerid, COLOR_WHITE, "Cestitamo na vasoj kupovini.");
SendClientMessage(playerid, COLOR_WHITE, "Kucaj /firmapomoc da bi vidio dostupne komande za vodjenje firme.");
OnPropUpdate();
OnPlayerUpdateEx(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Nemas dovoljno novca za kupovinu firme");
return 1;
}
}
}
}
return 1;
}


eto i komanda kupifirmu!