Need help quickly - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need help quickly (
/showthread.php?tid=628976)
Reading only id 0 -
STONEGOLD - 17.02.2017
UPDATED
PHP код:
public OnTextMenuResponse(playerid,menuid,listitem)
{
for(new i = 0; i < MAX_BUSINESSES; i++)
{
if(menuid == BIZMENU)
{
switch(listitem)
{
case 1:
{
new file[40];
BizID[playerid] = i;
format(file, sizeof(file), BIZ_FILE, i);
static SpawnPlace[350],bool:form = true;
if(form)
{
format(SpawnPlace, sizeof(SpawnPlace), " ~y~1. ~w~Currently Name: %s~n~",BizInfo[i][bName]);
form = false;
}
TextMenuShowForPlayer(playerid,BIZMENU2,"~g~Change Spawn Place",SpawnPlace,1);
}
}
}
}
I am trying to get business names on textdraw but it's only reading ID 0 business and i tried to login with second account and it shows same business name which is from id 0.
Did i make a mistake something?
Re: Need help quickly -
STONEGOLD - 18.02.2017
Bump UPDATED
Re: Need help quickly -
StrikerZ - 18.02.2017
Try and can you tell me what's BIZMENU for?
PHP код:
public OnTextMenuResponse(playerid,menuid,listitem)
{
for(new i = 0; i < MAX_BUSINESSES; i++)
{
if(menuid == i)
{
switch(listitem)
{
case 1:
{
new file[40];
BizID[playerid] = i;
format(file, sizeof(file), BIZ_FILE, i);
static SpawnPlace[350],bool:form = true;
if(form)
{
format(SpawnPlace, sizeof(SpawnPlace), " ~y~1. ~w~Currently Name: %s~n~",BizInfo[i][bName]);
form = false;
}
TextMenuShowForPlayer(playerid,BIZMENU2,"~g~Change Spawn Place",SpawnPlace,1);
}
}
}
}
Re: Need help quickly -
STONEGOLD - 18.02.2017
Thanks Friend but changed my mind. I was trying to do something but got tired so will start tomorrow in a new way.
BIZMENU was the textdraw MENU