Code Select
local i = 0;
while( i < GetMaxPlayers() ) {
local plr = FindPlayer(i);
i++;
if ( !plr ) continue;
if ( plr.World != 2 ) continue;
MessagePlayer( "Bla bla bla", plr );
}
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 MenuattachEntity(instance object,instance entity,vector offset);
deattachEntity(instance object);
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);
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:Quote from: [SC]Spartan on Sep 07, 2018, 07:05 AMAN ERROR HAS OCCURED [the index 'VARCHAR' does not exist]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
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
Quote from: [SC]Spartan on Sep 06, 2018, 07:33 AMEs un foro en ingles -_- enterate de una vez.No one cares for such boards.
Is an english forum lel.
QuoteOnly screenshots of VC:MP are allowed. No screenshots or videos of hacks or cheats are permitted.
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.
Quote from: =RK=MarineForce on Sep 05, 2018, 11:34 AM@zeus bro, i m added. this and on player spawn .Where dafaq I said to do it like this, the arguments in function
function onPlayerSpawn( player )
{
GTAVSpawn ( 84, -1167.65, -631.166, 11.8277 );
}
and dofile too .
not working bro
function onPlayerSpawn( player ) {
GTAVSpawn( player , Vector( -381.691, -538.03, 17.2833 ) );
}
Quote from: =RK=MarineForce on Sep 05, 2018, 11:34 AM@zeus bro, i m added. this and on player spawn .It was tested on a blank server before publish.
function onPlayerSpawn( player )
{
GTAVSpawn ( 84, -1167.65, -631.166, 11.8277 );
}
and dofile too .
not working bro
Quote from: Takanaue on Aug 29, 2018, 06:32 AMYep 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.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
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
Quote from: Tiggyh55 on Aug 23, 2018, 04:58 PMAre UncompletedYep 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.
Quote from: Tiggyh55 on Aug 23, 2018, 03:26 PMDear, VCMP PlayersIf you need scripted servers to play than there it is
I Need A Scripts Server To Play, Who Can Help Me With This?
If You Can Contact Me Here Or In Discord #Toretto#3157
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
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 xDIt's a support board you better read the rules again or will get another ban.