Keeps Repeating :S [URGENT]
#1

For some reason the RobCasino1 And RobCasino2 Work Fine
But when it comes to RobCasino3

It gives me cash and a wanted level and what other i asked for but it keep repeating over and over again and wont stop but i cant see the problem in the code

Thanks Ky[le]

http://pastebin.com/m44802132
Reply
#2

It repeats because you are doing for(new i=0; i < MAX_PLAYERS; i++) I'm guessing.. you should use SetTimerEx instead, for example:

pawn Код:
new mwah[MAX_PLAYERS]; // on top

SetTimerEx("RobCasino1",5000,0,"i",playerid); // somewhere..
// or
RobCasino1(playerid); // somewhere..

forward RobCasino1(playerid);
public RobCasino1(playerid)
{
  GameTextForPlayer(playerid, "~b~Robbing ~w~Casino~n~ ~p~Threatening ~w~Staff", 5000, 5);
  SetTimerEx("RobCasino2",5000,0,"i",playerid);
  return 1;
}

forward RobCasino2(playerid);
public RobCasino2(playerid)
{
  GameTextForPlayer(playerid, "~b~Robbing ~w~Casino~n~ ~p~Grabbing ~w~Money", 5000, 5);
  mwah[playerid] = SetTimerEx("RobCasino2",5000,0,"i",playerid);
  return 1;
}
Understand?
Reply
#3

Thanks Alot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)