Tutorial only appears for ID 0 -
garotin - 07.10.2015
I ask for help, I'm racking my brain to try to figure out why the tutorial only appears for id 0, and when another player enters the id 0 back to the beginning of the tutorial ...
Code that call the tutorial:
http://pastebin.com/mrZ9Fxdn
Re: Tutorial only appears for ID 0 -
jlalt - 07.10.2015
can you show us where you're calling MySQL_Login?
Re: Tutorial only appears for ID 0 -
garotin - 07.10.2015
Here it is:
http://pastebin.com/Zc5HHsk7
Re: Tutorial only appears for ID 0 -
Ahmad45123 - 07.10.2015
Post the function
IniciarTuto please.
Re: Tutorial only appears for ID 0 -
garotin - 07.10.2015
PHP код:
forward IniciarTuto(playerid);
public IniciarTuto(playerid)
{
Tuto[playerid] = 1;
ProxTuto[playerid] = 1;
SetPlayerCameraPos(playerid, -2535.5281, 1302.9382, 78.0744);
SetPlayerCameraLookAt(playerid, -2536.0571, 1303.7841, 77.8044);
for(new i=0;i<11;++i) PlayerTextDrawShow(playerid, TutorialTD[i]);
SetTimerEx_("PularTuto", 20000, 20000, 1, "d", playerid);
return 1;
}
Re: Tutorial only appears for ID 0 -
Ahmad45123 - 07.10.2015
Please post all functions in timers...
I need PularTuto
And if there is any timers.. I need them too..
Re: Tutorial only appears for ID 0 -
garotin - 07.10.2015
PHP код:
forward PularTuto(playerid);
public PularTuto(playerid)
{
if(Tuto[playerid] == 1)
{
PodePular[playerid] = 1;
}
else
{
Tuto[playerid] = 0;
ProxTuto[playerid] = 0;
TogglePlayerSpectating(playerid, 0);
for(new i=0;i<11;++i) PlayerTextDrawHide(playerid, TutorialTD[i]);
}
return 1;
}
PHP код:
if(oldkeys & KEY_SECONDARY_ATTACK)
{
if(Tuto[playerid] == 1)
{
if(PodePular[playerid] == 1)
{
for(new i=1;i<11;++i) PlayerTextDrawHide(playerid, TutorialTD[i]);
if(ProxTuto[playerid] < 15)
{
ProxTutor(playerid);
}
else
{
PlayerTextDrawHide(playerid, TutorialTD[0]);
Tuto[playerid] = 0;
ProxTuto[playerid] = 0;
PodePular[playerid] = 0;
TogglePlayerSpectating(playerid, 0);
}
return 1;
}
}
return 1;
}
ProxTutor(playerid)
http://pastebin.com/kiqbQaDt
Re: Tutorial only appears for ID 0 -
Ahmad45123 - 07.10.2015
AFAK you should not need a playerid in the array but according to your code and the symptoms..
You will have to use an index for the playerid.
Код:
new PlayerText:TutorialTD[11][MAX_PLAYERS]
Re: Tutorial only appears for ID 0 -
garotin - 07.10.2015
You think replacing it:
PHP код:
new PlayerText:TutorialTD[11]
By this:
PHP код:
new PlayerText:TutorialTD[11][MAX_PLAYERS]
It will work?
Re: Tutorial only appears for ID 0 -
garotin - 07.10.2015
@Resolved
I checked all gamemode then able to find the error in SetTimerEx_