SA-MP Forums Archive
Problem with variable ? - 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: Problem with variable ? (/showthread.php?tid=327817)



Problem with variable ? - jcvag44800 - 22.03.2012

Hi guys.

Well, I have a problem with my script here:

Код:
new etape[MAX_PLAYERS]=0;
SetTimerEx("imagec1", 3000, false, "is", 1337, "hello!");
public imagec1(playerid)
{
  if(etape[playerid]==0)
  {
     SetPlayerPos(playerid,1232.4000,-732.2592,96.0715);
     SetPlayerCameraPos(playerid,1237.2902,-737.0615,95.7084);
     SetPlayerCameraLookAt(playerid,1324.1943,-708.1240,92.4451);
     etape[playerid]++;
	 return 1;
  }
  else if(etape[playerid]==1)
  {
     SetPlayerPos(playerid,1330.9989,-712.6966,92.2625);
     SetPlayerCameraPos(playerid,1340.6370,-699.4767,91.8690);
     SetPlayerCameraLookAt(playerid,1443.1251,-707.5956,89.6152);
     etape[playerid]++;
	 return 1;
  }
  else if(etape[playerid]==2)
  {
	return 1;
  }
  else if(etape[playerid]==3)
  {
	return 1;
  }
  else if(etape[playerid]==4)
  {
	return 1;
  }
  else if(etape[playerid]==5)
  {
	return 1;
  }
  return 0;
}
Pay no attention to the disposal of certain lines ... I am 100% sure that imagec1 returned but does not go to step 1



Re: Problem with variable ? - aco_SRBIJA - 22.03.2012

You must use SetTimerEx in public...


Re : Problem with variable ? - jcvag44800 - 22.03.2012

Quote:
Originally Posted by jcvag44800
Посмотреть сообщение

Pay no attention to the disposal of certain lines ... I am 100% sure that imagec1 returned but does not go to step 1

It is in a "public" but I do not put it because it is too long ...