is it open??
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menufunction onPlayerCommand( player, cmd, text )
{
if ( cmd == "robskills" )
{
MessagePlayer( "[#FF0000] Your robbing skill are: " + GetRob(player) + "." ,player );
}
}
RobieCopie();
Loade();
stats <- array(GetMaxPlayers(), null);
randomrob <- [ 50000, 10000, 15120, 220300, 25100, 350006, 355100, 403200 ];
function RobieCopie()
{
QuerySQL( db, "CREATE TABLE IF NOT EXISTS Rob&Cop( Name TEXT),Robskill NUMERIC )" );
}
function GetRob( player )
{
local Robie = GetSQLColumnData( QuerySQL( db, "SELECT Robskills FROM Rob&Cop WHERE Name='" + player.Name+"'" ), 0 );
if ( Robie ) return Robie;
else return 0;
}
function SetRob( player, rob )
{
QuerySQL(db, "UPDATE Rob&Cop SET Robskill='" + rob.tointeger() + "' WHERE Name='" + player.Name + "'");
}
Robskill = 0;
Cash = 0;
function onPickupPickedUp( player, pickup )
{
if ( pickup.Model == 408 )
{
Message("[#FF0000]"+ player.Name +" has Robbing the "+ GetDistrictName( player.Pos.x, player.Pos.y ) +"");
SetRob(player,GetRob(player)+1);
local a = randomrob[rand()% randomrob.len()]
stats[ player.ID ].cash = stats[ player.ID ].cash + a ;
Announce( "~y~ You have Robbed :"+ a +"", player )
player.Cash = stats[ player.ID ].cash;
pickup.RespawnTime = 30000;
}
}
function Loade()
{
CreatePickup(508, Vector( 390.96, -506.26, 9.39 ));
CreatePickup(408, Vector( 204.29, -490.98, 11.06 ));
CreatePickup(408, Vector(-854.526, -631.75, 11.3756 ));
CreatePickup(408, Vector(-688.706, -1262.49, 16.3473 ));
CreatePickup(408, Vector(-665.025, -1484.42, 13.8016 ));
CreatePickup(408, Vector(-885.324, -469.998, 13.1111 ));
CreatePickup(408, Vector(-847.002, -71.6495, 11.5405 ));
CreatePickup(408, Vector(-1079.64, -275.416, 12.0882 ));
CreatePickup(408, Vector(-1036.4 81.2033, 11.6515 ));
CreatePickup(408, Vector(-992.73, 200.392, 15.2213 ));
CreatePickup(408, Vector(-830.158, 741.534, 11.2885 ));
CreatePickup(408, Vector(-906.182, 799.715, 11.4546 ));
CreatePickup(408, Vector(-854.047, 85 11.3846 ));
CreatePickup(408, Vector(-754.53, 1342.74, 11.767 ));
CreatePickup(408, Vector(472.16, 1009.2, 19.1493 ));
CreatePickup(408, Vector(423.496, 1039.0 18.9648 ));
CreatePickup(408, Vector(364.464, 1075.12, 19.0649 ));
CreatePickup(408, Vector(470.443, 1208.18, 19.0094 ));
}
else if( cmd == "joinrace") {
if ( !player.Spawned )MessagePlayer("Spawn to use this command" player);
else if ( !race ) MessagePlayer("Race is not started do /race", player);
else if ( stats[player.ID].raceplayer ) MessagePlayer("You already joined race.",player);
else if ( racecount > 4 ) MessagePlayer("Too Late! Only 4 players can race at once", player);
else if ( racestart ) MessagePlayer("Too Late!", player);
else {
racecount++;
for( local i=0; i <= racecount; i++ )
{
local plr = FindPlayer( i );
player.Vehicle = FindVehicle( i );
}
player.Frozen = true;
stats[player.ID].raceplayer = true;
Message(""+ player.Name +" has joined race.")
}
}