Show Posts
|
Pages: [1] 2 3 ... 12
|
2
|
Scripting / Script Help / Re: pPlayer.Cash (Main.nut) - problem
|
on: March 23, 2014, 04:21:05 pm
|
Try This >>>>
else if ( szCmd == "spawncar" ) { if ( szParams ) { local pTemp = split( szParams, " " ), ID = 90; if ( IsNum( pTemp[ 0 ] ) ) ID = pTemp[ 0 ].tointeger(); if ( ( ID >= 90 ) && ( ID <= 150 ) ) { if ( pPlayer.Cash >= 250 ) { local v = pPlayer.Pos; pPlayer.Cash -= 250; MessagePlayer( "Der Mechaniker hat dir das Auto " + ID + " geliefert", pPlayer ); CreateVehicle( ID, Vector( v.x + 5, v.y, v.z ), pPlayer.Angle ); } else { MessagePlayer( "Sorry You Need 250$.", pPlayer ); } } } }
|
|
|
4
|
Liberty Unleashed / Liberty Unleashed Chat / Re: Some newbie questions..
|
on: February 10, 2014, 05:28:47 pm
|
<>
function onPlayerCommand( plr, cmd, text ) { if ( cmd == "c1" ) { if ( plr.Vehicle ) { local r = GetTok( text, " ", 1 ).tointeger(), g = GetTok( text, " ", 2 ).tointeger(), b = GetTok( text, " ", 3 ).tointeger(); plr.Vehicle.RGBColour1 = Colour( r, g, b ); } else { MessagePlayer( "[#00ff00]*Server* [#ff0000]You are not in a vehicle", plr ); } }
if ( cmd == "c2" ) { if ( plr.Vehicle ) { local r = GetTok( text, " ", 1 ).tointeger(), g = GetTok( text, " ", 2 ).tointeger(), b = GetTok( text, " ", 3 ).tointeger(); plr.Vehicle.RGBColour2 = Colour( r, g, b ); } else { MessagePlayer( "[#00ff00]*Server* [#ff0000]You are not in a vehicle", plr ); } } return 1; }
|
|
|
6
|
Scripting / Script Help / Re: Player and vehicle
|
on: December 10, 2013, 03:55:19 pm
|
Try This >>
function onPlayerCommand( plr, cmd, arguments ) { if ( cmd == "v" || cmd == "veh" || cmd == "car" ) { if ( plr.Spawned ) { if ( arguments ) { if ( IsNum( arguments ) ) { local pTemp = split( arguments, " " ), ID = 90; if ( IsNum( pTemp[ 0 ] ) ) ID = pTemp[ 0 ].tointeger(); if ( ( ID >= 90 ) && ( ID <= 150 ) ) { local v = plr.Pos; local pVehicle = CreateVehicle( ID, Vector( v.x, v.y, v.z ), plr.Angle ); pVehicle.OneTime = true;
local vehicle = GetClosestVehicle( plr ); if ( vehicle ) { plr.Vehicle = vehicle; } } } else MessagePlayer( "Invalid arguments. Usage: /" + cmd + " < ID >", plr, 250, 0, 0 ); } else MessagePlayer( "Invalid arguments. Usage: /" + cmd + " < ID >", plr, 250, 0, 0 ); } else MessagePlayer( "You first need spawn.", plr, 250, 0, 0 ); return true; }
return 1; }
|
|
|
7
|
Scripting / Script Help / Re: Help
|
on: November 12, 2013, 04:41:09 pm
|
Thanks For The Reply But I Can't Find The Error. The Error In This Code
local players = GetPlayers(); if (players == 0){ return false; }
players += 10;
local pPlayer = null, id = 0; while ( id < players ) { pPlayer = FindPlayer( id ); if ( pPlayer) { if(pPlayer.Score >= 500){ Text0.Text = "*System* "+pPlayer.Name+" >> [ King ]."; } } id += 1; }
|
|
|
10
|
Scripting / Script Help / Re: Help
|
on: November 08, 2013, 08:49:14 am
|
Man I Want To Get The Highest player Score on The Server, I Don't Want The player Score. You Can Give Me An Example ?
|
|
|
11
|
Scripting / Script Help / Help
|
on: November 07, 2013, 03:52:21 pm
|
What is The Error ? Or How To Get The Highest Score ?
g_pPlayer <- FindLocalPlayer();
function onScriptLoad() { // Start local Pos = VectorScreen( ScreenWidth - 148, ScreenHeight - 348 ); local Size = ScreenSize( 130, 208 );
local Text0Pos = VectorScreen( 5, 5 ); local TextSize = ScreenSize( 100, 10 ); Window <- GUIWindow( Pos, Size, "Kings Of The Server" ); Text0 <- GUILabel( Text0Pos, TextSize, "" ); Text0.FontName = "Verdana"; Text0.FontSize = 10; Window.Colour = Colour(10, 10, 10); Window.Alpha = 150; Text0.TextColour = Colour( 255, 255, 255 ); AddGUILayer( Window ); Window.AddChild( Text0 ); // End }
function onClientRender() { local players = GetPlayers(); if (players == 0){ return false; }
players += 10;
local pPlayer = null, id = 0; while ( id < players ) { pPlayer = FindPlayer( id ); if ( pPlayer) { if(pPlayer.Score >= 500) { Text0.Text = "*System* "+pPlayer.Name+" >> [ King ]."; } } id += 1; } }
|
|
|
14
|
Servers / General Server Chat / Re: Help
|
on: October 06, 2013, 03:03:48 pm
|
Try This >>
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "closesesame" ) { CloseGarage( PORTLAND_HIDEOUT_GARAGE ); } return 1; }
~~~~~~~~~
function onPlayerCommand( pPlayer, szCommand, szText ) { if ( szCommand == "opensesame" ) { OpenGarage( PORTLAND_HIDEOUT_GARAGE ); } return 1; }
And Find The Garages In This Link >> ( http://liberty-unleashed.co.uk/LUWiki/GarageIDs )
|
|
|
|