Menu

Show posts

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 Menu

Messages - Luis_Labarca

#31
good night my friend, my suggestion is that if you could add these audio functions you could add mp3 from the store

FindSound( "Store/Audio/Audio.mp3" );
Sound.Open
Sound.Play
Sound.Pause
Sound.Stop



function of http://liberty-unleashed.co.uk

function onPlayerCommand( pPlayer, szCommand, szText )
{
if ( szCommand == "moo" )
{
local sound = FindSound( "moo.mp3" );
if ( sound )
{
sound.Open( pPlayer );
sound.Play( pPlayer );
sound.Close( pPlayer );
}
}
return 1;
}



#32
Quote from: Xenon on Jun 25, 2019, 09:01 PMYes, you can disable sprint by giving HEAVY flag to your weapons (but then you can't jump also), or by changing ID of wep behaves as eg. M60
friend could you pass me n example use SetWeaponDataValue( 17 , 24 , GetWeaponDataValue( 32 , 24 ))
and it does not work
#33
Quote from: Sebastian on Feb 27, 2015, 04:10 PM
QuoteCObject * CPlayer::StandingOnObject()
{
   int obj = functions->GetPlayerStandingOnObject( this->nPlayerId );
   if( obj < 1 )
      return NULL;
   else
   {
      this->m_standingOn.nObjectId = obj;
      return &this->m_standingOn;
   }
}

Seems like it just returns if a player is or not on an object.
But if you tried it, and it doesn't work, then you may be needed to use a function on the object first, so it can answer to your function.
The function may be this one:

object.SetReportingBumps( bool toReport )
Here is the vcmp squirrel source. You can find there the info you need, until the wiki will be completed.


hello friend could you pass a better explained example @Sebastian ;D
#34
Quote from: Xenon on Jun 25, 2019, 09:01 PMYes, you can disable sprint by giving HEAVY flag to your weapons (but then you can't jump also), or by changing ID of wep behaves as eg. M60
ok friend the function is like this?

SetWeaponDataValue( 17 , 24 , 32832)
it does not work
#35
Script and Content Requests / help - Sprint
Jun 25, 2019, 12:11 AM

there is some way to prevent them from using sprints that can not be run on the server that when trying to run just walk ??? ???
#36
Quote from: Markhoz on Jun 23, 2019, 06:40 PMIt does not work with an existing sound either. but likewise thank you for answering

friend does not work because that stop sound function does not exist for PlaySound ()

I also asked me how to stop a sound and they told me that I could not :-\ :-\
#37

hello friend that works does not exist only works to play once the audio started can not be stopped until I finish in a while I asked that question and you can not :-\
#38
Quote from: Sebastian on May 04, 2019, 09:01 PMThis gamemode fits so good the vcmp comunity.
Too bad we don't have real npcs' functions.

No matter how much you try to make them feel real, they are still moving objects. Im dealing myself with this problem, but it's easier in my case.


I hope you do it and I just hope you do that function to make a zombie rpg I have functions to make them on the ground and those things but only lack the NPC I hope and do that functions soon :D :D ;)
#39
Quote from: GTA-Cheng on May 10, 2019, 05:22 AMEnter Pickup Card and Checkpoint Display Gui


Hello friend, I hope and this works for you

add on your server, Server/Script/main.nut

function onCheckpointEntered(player, checkpoint)
{
if( checkpoint.ID == 0)
{
Stream.StartWrite()
Stream.WriteString("Checkpoint1")
Stream.SendStream(player)
}
}
function onClientScriptData(player)
{
local ReadString = Stream.ReadString();
local ReadNum = Stream.ReadInt();

if( ReadString == "AcceptChecpoint")
{
//Add you function
//Add you function
//Add you function
//Add you function
Stream.StartWrite()
Stream.WriteString("DeletMenuCheckpoint")
Stream.SendStream(player)
}
if( ReadString == "CloseCheckpoint")
{
Stream.StartWrite()
Stream.WriteString("DeletMenuCheckpoint")
Stream.SendStream(player)
}
}




Add in the store -- /Store/tu script


///--- Tables
CheckpointAndGUI <- null;
AcceptChecpoint <- null;
CloseCheckpoint <- null;
ScreenX <- GUI.GetScreenSize().X;
ScreenY <- GUI.GetScreenSize().Y;
Size <- ScreenY / 40;

function Server::ServerData(stream)
{
local ReadStrind = stream.ReadString();
if(ReadString=="Checkpoint1")
{
::GUI.SetMouseEnabled(true);
::CheckpointAndGUI <- GUIMemobox( VectorScreen(( ScreenX * 0.50 ) - ( ScreenY / Size), ScreenY * 0.40),VectorScreen(220, 110), Colour(20, 20, 20), GUI_FLAG_MEMOBOX_TOPBOTTOM | GUI_FLAG_VISIBLE);
::CheckpointAndGUI.TextColour = Colour(255, 255, 255);
::CheckpointAndGUI.Alpha=200;
::CheckpointAndGUI.FontName = "Tahoma";
::CheckpointAndGUI.FontSize = 10;
::CheckpointAndGUI.AddFlags(GUI_FLAG_TEXT_TAGS | GUI_FLAG_SCROLLABLE | GUI_FLAG_SCROLLBAR_HORIZ);
::CheckpointAndGUI.TextPaddingTop = 10;
::CheckpointAndGUI.TextPaddingBottom = 4;
::CheckpointAndGUI.TextPaddingLeft = 10;
::CheckpointAndGUI.TextPaddingRight = 10;
::CheckpointAndGUI.AddLine("------- Menu -------");
::CheckpointAndGUI.AddLine("Checkpoint and GUI");
//--------
::AcceptChecpoint <- GUIButton(VectorScreen(30,65), VectorScreen(50, 22), Colour(75,75,75), "Acept", GUI_FLAG_BORDER | GUI_FLAG_VISIBLE);
::AcceptChecpoint.TextColour = Colour(255, 255, 255);
::AcceptChecpoint.FontName =  "Tahoma";
::AcceptChecpoint.FontSize = 10;
::AcceptChecpoint.Alpha=180;
//--------
::CloseCheckpoint <- GUIButton(VectorScreen(120,65), VectorScreen(50, 22), Colour(75,75,75), "Close", GUI_FLAG_BORDER | GUI_FLAG_VISIBLE);
::CloseCheckpoint.TextColour = Colour(255, 255, 255);
::CloseCheckpoint.FontName =  "Tahoma";
::CloseCheckpoint.FontSize = 10;
::CloseCheckpoint.Alpha=180;
//--
::CheckpointAndGUI.AddChild(CloseCheckpoint);
::CheckpointAndGUI.AddChild(AcceptChecpoint);
}
////--- Delet GUI checkpoint
if(ReadString=="DeletMenuCheckpoint")
{
::GUI.SetMouseEnabled(false);
::CheckpointAndGUI <- null;
::AcceptChecpoint <- null;
::CloseCheckpoint <- null;
}
}
function GUI::ElementClick(element, mouseX, mouseY)
{
if(element == ::AcceptChecpoint)
{
local Dates = Stream();
Dates.WriteString("AcceptChecpoint");
Server.SendData(Dates);
}
if(element == ::CloseCheckpoint)
{
local Dates = Stream();
Dates.WriteString("CloseCheckpoint");
Server.SendData(Dates);
}
}

function Script::ScriptProcess()
{
::ScreenX = GUI.GetScreenSize().X;
::ScreenY = GUI.GetScreenSize().Y;
if(::CheckpointAndGUI)
{
::CheckpointAndGUI.Position = ::VectorScreen(( ScreenX * 0.30 ) - ( ScreenY / Size), ScreenY * 0.400)
}
}



#40
Quote from: =RK=MarineForce on May 17, 2019, 03:13 PMHey? How can i find those pickup sounds: Gun Pickup, Health Pickup, and armour

i didn't know where can i find this but i see those things in gta vc filse.. but in this gta i didn't find..

friend here is the list of sounds

http://wiki.vc-mp.org/wiki/Sounds
and the function to activate a sound

PlaySound( player.UniqueWorld , 50002 , player.Pos );

50002 is id sound


I hope to see helped :) ;)
#42
Script and Content Requests / Re: 3d text?
Feb 24, 2019, 04:19 AM
Quote from: Doom_Kill3R on Feb 19, 2019, 04:10 AMThen simply creating and storing labels in different vars, get screen from world pos per frame, and draw the first label, second is +15 y of first and so on.

mmm if friend so it was that I managed to do it thanks for the help
#43
Script and Content Requests / 3d text?
Feb 17, 2019, 07:27 PM
the 3d text of gta samp you can create several lines example




my doubt is that if vcmp can create a 3d text with several lines as it appears in the image I could only create a text with a line
#44
Hi friends, as I have a problem, I would like to close the server to save the data, I use this example to save

function onServerStop()
{
for (local i=0; i<10; i++)
{
WriteIniString( "Datos.ini", "Objectos", i+"","2 3 4 5 6" );
}
}

and it does not work for me I try on onServerStart and it works



that's how it works
function onServerStart()
{
for (local i=0; i<10; i++)
{
WriteIniString( "Datos.ini", "Objectos", i+"","2 3 4 5 6" );
}
}

what is the problem?? :-[
#45
Snippet Showroom / Re: Some Teleports
Sep 15, 2017, 12:16 AM
bro uses something like this is better ;)
function onScriptLoad()
{
DataBase<- ConnectSQL( "DataBase.db" );
QuerySQL( DataBase, "CREATE TABLE IF NOT EXISTS Saveloc (NameLoc TEXT,Creator TEXT, X FLOAT, Y FLOAT, Z FLOAT )" );
}

function onPlayerCommand ( player , cmd , text )
{
cmd = cmd.tolower ( );
if ( cmd == "saveloc" )
{
local q = QuerySQL(DataBase, "SELECT * FROM Saveloc WHERE NameLoc='" + text + "'");
if ( !text ) MessagePlayer("[#FFD700]Use: /"+cmd+" [Loc]", player );
else if ( FindLoc( GetTok( text, " ", 1 ) ) ) MessagePlayer("[#ADFF2F]Loc Name it already exists", player );
else {
SaveLoc( player, text );
}
}
else if ( cmd == "gotoloc" )
{
local q = QuerySQL(DataBase, "SELECT * FROM Saveloc WHERE NameLoc='" + text + "'");
if ( !text ) MessagePlayer("[#FFD700]Use: /"+cmd+" [ Loc ]", player );
else if ( !FindLoc( GetTok( text, " ", 1 ) ) ) MessagePlayer( "[#FFD700] LocName : "+text+" Does not exist.", player );
else {
local Loc = text;
local Name = QuerySQL( DataBase, "SELECT NameLoc, Creator, X, Y, Z FROM Saveloc WHERE NameLoc='"+Loc+"'" );
local LName = GetSQLColumnData( Name, 0 );
local Creator = GetSQLColumnData( Name, 1 );
local X = GetSQLColumnData( Name, 2 );
local Y = GetSQLColumnData( Name, 3 );
local Z = GetSQLColumnData( Name, 4 );
player.Pos = Vector( X, Y, Z );
MessagePlayer("[#ADFF2F]Teleport to the [#4682B4]Loc Name :"+LName+"[#ffffff] Creator : "+Creator, player );
}
}
}
function SaveLoc( player, NameLocLugar )
{
local Loc = NameLocLugar;
local Pos = player.Pos;
QuerySQL( DataBase, "INSERT INTO Saveloc( NameLoc, Creator, X, Y, Z ) VALUES ( '" + Loc + "', '" + player.Name + "', '" + Pos.x + "', '" + Pos.y + "', '" + Pos.z + "')" );
MessagePlayer("[#ADFF2F]Saveloc:[ "+NameLocLugar+" ].", player );
}
function FindLoc( LugarNameLoc )
{
local Name = QuerySQL( DataBase, "SELECT NameLoc FROM Saveloc WHERE NameLoc='" + LugarNameLoc + "'" );
local LName = GetSQLColumnData( Name, 0 );
return LName;
FreeSQLQuery( Name );
}
function GetTok(string, separator, n, ...)
{
local m = vargv.len() > 0 ? vargv[0] : n,
tokenized = split(string, separator),
text = "";
if (n > tokenized.len() || n < 1) return null;
for (; n <= m; n++)
{
text += text == "" ? tokenized[n-1] : separator + tokenized[n-1];
}
return text;
}
function NumTok(string, separator)
{
local tokenized = split(string, separator);
return tokenized.len();
}