repeating
#1

Well the problem i got is when every a player finishs a race all the race post that that the players has finished the race instead of just the one they are doing.

Ill post two off them to see if ive messed something up as ive just copy and pasted them to copy them.

Код:
case 26:
			{
				DisablePlayerRaceCheckpoint(playerid);
				{
					Offroadrace[playerid] = 0; //Resets the checkpoint variable
					new Moneys  = 1000 + random( 7000 ),
					Score   = 30   + random( 10   ),
					Cookies = 10   + random( 20   ),
					String[ 256 ];

					foreach(Player, i)
					{
						if ( i != playerid )
							{
							FormMessage( i, -1, ""COL_OGREEN"%s{FFFFFF} Has Finished HardCore Offroading, And Won A Prize!", PlayerName2( playerid ) );//this is the lines that it happens wit
						}
					}
					format( String, sizeof String, " ~g~ FINISHED~n~~n~~w~You Finished Hardcore OffRoading!~n~~n~~g~ REWARD!~n~~W~Cash:~g~~h~$%d~n~~w~Score: ~g~~h~%d~n~~w~Cookies: ~g~~h~%d",Moneys, Score, Cookies );
					Info( playerid, String,12000);
					P_DATA[ playerid ][ P_Cookies ] += Cookies;
					SetPlayerScore( playerid, GetPlayerScore( playerid ) + Score );
					GivePlayerMoney( playerid, Moneys );
					KillTimer(Offroadracetimer);
					iOffroadraceclock = 0;
					P_DATA[ playerid ][ P_OnStyle ] = false;
				}
			}
		}
Код:
case 9:
			{
				DisablePlayerRaceCheckpoint(playerid);
				{
					Waterrace[playerid] = 0; //Resets the checkpoint variable
					new Moneys  = 1000 + random( 7000 ),
					Score   = 30   + random( 10   ),
					Cookies = 10   + random( 20   ),
					String[ 256 ];

					foreach(Player, i)
					{
						if ( i != playerid )
							{
							FormMessage( i, -1, ""COL_OGREEN"%s{FFFFFF} Has Finished The WaterWay Race, And Won A Prize!", PlayerName2( playerid ) );//this is the lines that it happens with
						}
					}
					format( String, sizeof String, " ~g~ FINISHED~n~~n~~w~You Finished The WaterWay Race!~n~~n~~g~ REWARD!~n~~W~Cash:~g~~h~$%d~n~~w~Score: ~g~~h~%d~n~~w~Cookies: ~g~~h~%d",Moneys, Score, Cookies );
					Info( playerid, String,12000);
					P_DATA[ playerid ][ P_Cookies ] += Cookies;
					SetPlayerScore( playerid, GetPlayerScore( playerid ) + Score );
					GivePlayerMoney( playerid, Moneys );
					KillTimer(Waterracetimer);
					iWaterraceclock = 0;
					P_DATA[ playerid ][ P_OnStyle ] = false;
				}
			}
		}
Reply
#2

Can you rephrase that? I have absolutely no idea what you just said.
Reply
#3

Sorry easy why to put this is when i complete the race Offroad it sends a message to all player that i have completed it but it is also sending the message from the rest of the races so it ends up like this

%s{FFFFFF} Has Finished The WaterWay Race, And Won A Prize!
%s{FFFFFF} Has Finished Hardcore Offroading Race, And Won A Prize!
%s{FFFFFF} Has Finished The East Coast street Race, And Won A Prize!

But it should have only sent the 1st one not all of them.

Hope i have made it clearer for you know.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)