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 - !

#31
Support / Re: Ann/MSG in a world
Sep 09, 2018, 07:15 PM
local i = 0;
while( i < GetMaxPlayers() ) {
  local plr = FindPlayer(i);
  i++;
 
  if ( !plr ) continue;
  if ( plr.World != 2 ) continue;
  MessagePlayer( "Bla bla bla", plr );
}
#32
Support / Re: Ann/MSG in a world
Sep 09, 2018, 07:03 PM
function MessageWorld( world, text ) {
  for( local i = 0; i < GetMaxPlayers(); i++ ) {
    local plr = FindPlayer(i);
    if ( !plr ) continue;
    if ( plr.World != world.tointeger() ) continue;
    MessagePlayer( text, plr );
  }
}
#34
It can be improved by using squirrel table
Usage:
object & entity can be any of these types player/pckup/vehicle/object
attachEntity(instance object,instance entity,vector offset);
deattachEntity(instance object);

Snippet
g_Attach <- {}

function attachEntity(object,entity,offset)
{
if( g_Attach.rawin( object.ID ) ) print( "Object is already attached to an entity" );
g_Attach.rawset( object.ID, {
"Object": object,
"Entity": entity
"Offset": offset,
} );
}
function deattachEntity( object )
{
if( !g_Attach.rawin( object.ID ) ) print( "Object is not attached to any entity" );
g_Attach.rawdelete( object.ID );
}
function AttachUpdate()
{
foreach( id, attach in g_Attach )
{
if ( attach["Object"].Pos.x == 0 )
{
g_Attach.rawdelete( id );
continue;
}

if ( attach["Entity"].Pos.x == 0 )
{
g_Attach.rawdelete( id );
continue;
}

attach["Object"].Pos = attach["Entity"].Pos + attach["Offset"];
}
}

ATTACH_TIMER <- NewTimer("AttachUpdate",100,0);

Usage Example
/attach, /deattach
function onPlayerCommand(player, command, arguments)
{
switch( command )
{
case "attach":
if ( !arguments ) return MessagePlayer( "[#2add9b]Usage: /attach <player/pickup/vehicle/object> <id>", player );

local args = split( arguments, " " );
if ( args.len() < 7 ) return MessagePlayer( "[#2add9b]Usage: /attach <objType> <objid> <entityType> <entityID> <offsetX> <offsetY> <offsetZ> (Type: player/pickup/vehicle/object)", player );

local
objTp = args[0],
objID = args[1].tointeger(),
entTp = args[2],
entID = args[3].tointeger(),
offSetX = args[4],
offSetY = args[5],
offSetZ = args[6],
objIns,
entIns;
switch( objTp )
{
case "player": objIns = FindPlayer( objID ); break;
case "pickup": objIns = FindPickup( objID ); break;
case "vehicle": objIns = FindVehicle( objID ); break;
case "object": objIns = FindObject( objID ); break;
}
switch( entTp )
{
case "player": entIns = FindPlayer( entID ); break;
case "pickup": entIns = FindPickup( entID ); break;
case "vehicle": entIns = FindVehicle( entID ); break;
case "object": entIns = FindObject( entID ); break;
}

if ( !objIns || !entIns ) return MessagePlayer( "[#2add9b]One of the instance is not found.", player );
attachEntity( objIns, entIns, Vector( offSetX.tointeger(), offSetY.tointeger(), offSetZ.tointeger() ) );
MessagePlayer( "Attached object to entity.", player );
break;
case "deattach":
if ( !arguments ) return MessagePlayer( "[#2add9b]Usage: /detach <objType> <objid> (Type: player/pickup/vehicle/object)", player );

local args = split( arguments, " " );
if ( args.len() < 2 ) return MessagePlayer( "[#2add9b]Usage: /detach <objType> <objid> (Type: player/pickup/vehicle/object)", player );

local
objTp = args[0],
objID = args[1].tointeger(),
objIns;
switch( objTp )
{
case "player": objIns = FindPlayer( objID ); break;
case "pickup": objIns = FindPickup( objID ); break;
case "vehicle": objIns = FindVehicle( objID ); break;
case "object": objIns = FindObject( objID ); break;
}

if ( !objIns ) return MessagePlayer( "[#2add9b]The instance is not found.", player );
deattachEntity( objIns );
MessagePlayer( "Deattached object from entity.", player );
break;
}
}
:edit:
Forget to add 'return' before 'MessagePlayer'
#35
[RLC] Register, Login & Change Password

Update Reason: Used vcmp official hashing, unique id concept has been used and installation is made simple.

Topic Updated: Link


:edit:
Quote from: [SC]Spartan on Sep 07, 2018, 07:05 AMAN ERROR HAS OCCURED [the index 'VARCHAR' does not exist]
I tried everything.
If there is no solution, could someone help me to do another one to change the nickname if the name is not removed
This snippet is not related to this topic if you have any issue in installation or found bug in this topic post here otherwise get dafaq out of this topic and create a support ticket over there Link
#36
Quote from: [SC]Spartan on Sep 06, 2018, 07:33 AMEs un foro en ingles -_- enterate de una vez.
Is an english forum lel.
No one cares for such boards.

QuoteOnly screenshots of VC:MP are allowed. No screenshots or videos of hacks or cheats are permitted.
#37
Snippet Showroom / Re: GTA V Spawn Camera
Sep 06, 2018, 07:36 AM
Quote from: Saiyan Attack on Sep 05, 2018, 09:48 PMthen re-test the code becuz it has bug in timers ...
Check if player exist in each function I would rather update the snippet.
It works on a blank server and it is supposed to work nothing is wrong in it.


:edit:
Quote from: =RK=MarineForce on Sep 05, 2018, 11:34 AM@zeus bro, i m added. this and on player spawn .

function onPlayerSpawn( player )
{
GTAVSpawn ( 84, -1167.65, -631.166, 11.8277 );
}

and dofile too .

not working bro :)
Where dafaq I said to do it like this, the arguments in function
GTAVSpawn( instance player, vector Pos )
function onPlayerSpawn( player ) {
GTAVSpawn( player , Vector( -381.691, -538.03, 17.2833 ) );
}
#38
Snippet Showroom / Re: GTA V Spawn Camera
Sep 05, 2018, 04:52 PM
Quote from: =RK=MarineForce on Sep 05, 2018, 11:34 AM@zeus bro, i m added. this and on player spawn .

function onPlayerSpawn( player )
{
GTAVSpawn ( 84, -1167.65, -631.166, 11.8277 );
}

and dofile too .

not working bro :)
It was tested on a blank server before publish.
#39
Quote from: Takanaue on Aug 29, 2018, 06:32 AM
Quote from: Xmair on Aug 29, 2018, 06:17 AMWhy do you use a custom encryption method?
Maybe he don't know how to use Hashing plugin
Yep he is right 11 months ago I never knew about hashing plugin maybe I can update this topic later and remove the custom encryption made by Stormeus and use the official hashing function.
#40
Quote from: [SC]Spartan on Aug 28, 2018, 02:40 PMThanks KrooB , i dont know if it work when i go home i will test it but what language is it?
Turkish
#41
Off-Topic General / Re: Look At This Topic!
Aug 23, 2018, 06:26 PM
Quote from: Tiggyh55 on Aug 23, 2018, 04:58 PMAre Uncompleted
Yep it's upto you whether you want to complete it('which you can't') or not cause no one there will give you a complete script.
#42
Off-Topic General / Re: Look At This Topic!
Aug 23, 2018, 04:33 PM
Quote from: Tiggyh55 on Aug 23, 2018, 03:26 PMDear, VCMP Players
I Need A Scripts Server To Play, Who Can Help Me With This?
If You Can Contact Me Here Or In Discord #Toretto#3157
If you need scripted servers to play than there it is
Clicky
#43
Quote from: =TRC=Kelvin on Aug 22, 2018, 04:56 PMI did that already, after installing it I enable Windows Defender again and it deletes VC:MP.
Open windows defender check for the detected list and allow vcmp from that list the vcmp setup file will be restored to its location.
Quote from: ! on Aug 22, 2018, 12:38 PMInstead of disabling allow it from quarantine files list after downloading
#44
Quote from: (SpCy)Alex. on Aug 22, 2018, 12:38 PMVC-MP is a virus, it infect your brain and making you wasting time to 2002 game multiplayer mod xD
It's a support board you better read the rules again or will get another ban.
#45
Instead of disabling allow it from quarantine files list after downloading