ok so do i make 1 global var for $price or 1 for each $price["X"]
<?php
IF( ToNum( GetCurrentPlayerVar( "Cash" ) - $Price[toupper($argv)] ) >= "1" )
THEN
privmsg( "You Just Bought The " . toupper($argv) . " For " . $Price[toupper($argv)] . "." );
SetCurrentPlayerVar( "Cash", ToNum( GetCurrentPlayerVar( "Cash" ) - $Price[toupper($argv)] ) );
SetCurrentPlayerVar( "HC_" . toupper($argv), "1" );
SetCurrentPlayerVar( "HC", ToNum( GetCurrentPlayerVar( "HC") + 1 ) );
privMsg( "You Now Have $" . GetCurrentPlayerVar( "Cash" ) );
ELSE
privmsg( "Not Enough Cash!");
ENDIF
?>
Event OnRotateTrack() # Lapper Event
globalMsg(langEngine( "%{main_track_changed1}%") );
globalMsg(langEngine( "%{main_track_changed2}%", getLapperVar( "CurrLongRotateTrack" )));
cmdLFS( "/wind=2" );
cmdLFS( "/qual=0" );
IF( getLapperVar("ShortTrackName") == "KY2" )
THEN
cmdLFS( "/laps=50" );
ENDIF
/
EndEvent
Event OnRotateTrack() # Lapper Event
globalMsg(langEngine( "%{main_track_changed1}%") );
globalMsg(langEngine( "%{main_track_changed2}%", getLapperVar( "CurrLongRotateTrack" )));
cmdLFS( "/wind=2" );
cmdLFS( "/qual=0" );
IF( getLapperVar("ShortTrackName") == "KY2" )
THEN
cmdLFS( "/laps=50" );
ENDIF
[COLOR=red]/ #remove this one[/COLOR]
EndEvent
id key username nickname nicknameStripped numval strval
2 ps_points_total tim nl ^1[^7NLR^4]^6Tim [NLR]Tim 2961
id key username nickname nicknameStripped numval strval
2 ps_points_total tim nl ^1[^7NLR^4]^6Tim [NLR]Tim
id key username nickname nicknameStripped numval strval
2 ps_points_total tim nl ^1[^7NLR^4]^6Tim [NLR]Tim 2961
id key username nickname nicknameStripped numval strval
2 ps_points_total tim nl ^1[^7NLR^4]^6Tim [NLR]Tim 2961 2961
<?php
$Refund["1"] = "13200";
$Refund["2"] = "26400";
$Refund["3"] = "39600";
$Refund["4"] = "52800";
$Refund["5"] = "66000";
?>
<?php
IF( GetCurrentPlayerVar("TotDistMeter") == $Refund[ GetCurrentPlayerVar("Refund") ] )
THEN
SetCurrentPlayerVar("Refund", ToNum( GetCurrentPlayerVar("Refund") + "1" ) );
globalMsg( "^7" . $userName . " Recived $2500 ^1Reason: ^7Distance bonus" );
SetCurrentPlayerVar( "Cash", ToNum( GetCurrentPlayerVar( "Cash" ) + "2500" ) );
ENDIF
?>
<?php
$Refund = "13200";
?>
<?php
IF( GetCurrentPlayerVar("TotDistMeter") == ToNum( $Refund * GetCurrentPlayerVar("Refund") ) )
THEN
SetCurrentPlayerVar("Refund", ToNum( GetCurrentPlayerVar("Refund") + "1" ) );
globalMsg( "^7" . $userName . " Recived $2500 ^1Reason: ^7Distance bonus" );
SetCurrentPlayerVar( "Cash", ToNum( GetCurrentPlayerVar( "Cash" ) + "2500" ) );
ENDIF
?>
<?php
$Refund[1] = 13200;
$Refund[2] = 26400;
$Refund[3] = 39600;
$Refund[4] = 52800;
$Refund[5] = 66000;
?>
<?php
IF( GetCurrentPlayerVar("TotDistMeter") >= $Refund[ GetCurrentPlayerVar("Refund") ] )
THEN
SetCurrentPlayerVar("Refund", ToNum( GetCurrentPlayerVar("Refund") + 1 ) );
globalMsg( "^7" . $userName . " Recived $2500 ^1Reason: ^7Distance bonus" );
SetCurrentPlayerVar( "Cash", ToNum( GetCurrentPlayerVar( "Cash" ) + 2500 ) );
ENDIF
?>
<?php
$Refund = 13200;
?>
<?php
IF( GetCurrentPlayerVar("TotDistMeter") >= ToNum( $Refund * GetCurrentPlayerVar("Refund") ) )
THEN
SetCurrentPlayerVar("Refund", ToNum( GetCurrentPlayerVar("Refund") + 1 ) );
globalMsg( "^7" . $userName . " Recived $2500 ^1Reason: ^7Distance bonus" );
SetCurrentPlayerVar( "Cash", ToNum( GetCurrentPlayerVar( "Cash" ) + 2500 ) );
ENDIF
?>
<?php
WriteLine( GetCurrentPlayerVar("UserName") . ":" . GetCurrentPlayerVar("TotDistMeter") );
IF( GetCurrentPlayerVar("TotDistMeter") >= ToNum( $Refund * GetCurrentPlayerVar("Refund") ) )
THEN
WriteLine( GetCurrentPlayerVar("UserName") . ": Refunded with $2500" );
SetCurrentPlayerVar("Refund", ToNum( GetCurrentPlayerVar("Refund") + 1 ) );
globalMsg( "^7" . $userName . " Recived $2500 ^1Reason: ^7Distance bonus" );
SetCurrentPlayerVar( "Cash", ToNum( GetCurrentPlayerVar( "Cash" ) + 2500 ) );
ENDIF
?>