06.11.2011, 00:05
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.
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; } } }