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 - Nihongo^

#196
Quote from: . on Nov 28, 2016, 02:24 PM
Quote from: Nihongo^ on Nov 28, 2016, 02:21 PMi mean i want an example like if someone pop your head it said headshot like this ?

Seriously dude? You can't even come up with that?

function onPlayerKill(killer, player, reason, body_part)
{
    if (body_part == BODYPART_HEAD)
    {
        PlayTheDamnSound(...);
    }
}
there's no Fucntion call PLAY THE DAMN SOUND btw that's what i want

https://forum.vc-mp.org/?topic=2329.msg17207#msg17207

Solved
#197
bro i dont have any idea about PlayTheDamnSound(...); Code -.- 
#198
i mean i want an example like if someone pop your head it said headshot like this ?
#199
yes but how does it works ?
#200
how can i run Voice function in server  LIKE EC have,  if someone pop your head it said "HEADSHOT"
#201
Solved Thanks
#202
i am trying to create goto function which canceled teleport if player move but i got an error

Command

else if ( cmd == "goto" )   
{
try{
if( !text ) MessagePlayer( "[#40FF00][COMMAND] - [#F7FE2E]/goto <player/ID>", player );
else if( !player.IsSpawned ) MessagePlayer( "[#FF0000][ERROR] - [#F7FE2E]You haven't spawned.", player );
else
{   
local plr = GetPlayer( GetTok( text, " ", 1 ) );
if( !plr ) MessagePlayer( "[#FF0000][ERROR] - [#F7FE2E]Unknown player/ID.", player );
else if( !plr.IsSpawned ) MessagePlayer( "[#FF0000][ERROR] - [#F7FE2E]The player you are trying to teleport has not spawned yet.", player );
else if( status[ plr.ID ].ngoto ) MessagePlayer( "[#FF0000][ERROR] - [#F7FE2E]The player you want to teleport to has nogoto on.", player );
else
{
MessagePlayer( "[#40FF00][COMMAND] - [#F7FE2E]You wont be Teleport if you move within 4 secs to prevent from death evade.", player );
NewTimer( "going", 300, 1, player.ID, plr.ID, player.Pos.x, player.Pos.y, player.Pos.z );
}
}
}
catch(e) print( "error goto: " + e)
}

Function


 function going( playerID, x, y, z )

{
local player = FindPlayer(playerID);
    if(player)
{

               local x1 = player.Pos.x;

               local y1 = player.Pos.y;

               local z1 = player.Pos.z;



      if( ( x==x1 ) && ( y==y1 ) && ( z==z1 ) ) PGoto( player );

      else MessagePlayer( "[#FF0000][ERROR] - [#F7FE2E]You have been moved so you haven't been healed.", player);

}

}

function PGoto( playerID, plrID )

local player = FindPlayer(playerID), plr = FindPlayer(plrID);
    if(player && plr)
{
         player.Pos = plr.Pos;

  MessagePlayer( "[#40FF00][COMMAND] - [#F7FE2E]Successfully teleported to " + plr + "." , player );
}
}
#203
Hi
i am using this Fjose Team System  but i found error on FInd Player
FULL IMAGE https://postimg.org/image/vwlz0v4xj/

#204
Quote from: Kewun on Nov 05, 2016, 08:00 AMwell we are trying to help you, just move the ramp to right using RotateTo function

http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Functions/Object.RotateTo

try it, it wont hurt.
Seriously i just found it a while ago and came here to modify my post i thought you're making fun Sorry if my words hurt you   ( and this stuff )
Thanks Solved
#205
Quote from: Kewun on Nov 04, 2016, 04:58 PMshow some code

CreateObject(583,0,Vector(-781.693,-0.359956,11.0865),255);
#206
This ramp is rotate to left how do i fix it ?

#208
Please ignore it and tell me something about it
#209
class PInfo
{
request = 51;
team = false;
teamp = null;
}

function onScriptLoad()
{
stats <- array( GetMaxPlayers(), null );
}

function onPlayerJoin( player )
{
print( "Player " + player.Name + " joined. [" + player.ID + "]" );
        stats[ player.ID ] = PInfo();
}

function onPlayerSpawn( player )
{
  if ( stats[ player.ID ].team )
       {
    local plr = GetPlayer( stats[ player.ID ].teamp );
    if ( plr.Spawned )
   {
   player.Skin = 0;
       player.Skin = plr.Skin;
       player.Team = plr.Team;
   player.Pos = plr.Pos;
   }
   }
}

function onPlayerCommand( player, cmd, text )
{
local i = 0;
local plr = player;
if ( text )
{
i = NumTok( text, " " );
if (i == 1) plr = GetPlayer( text );
}
 
  if ( cmd.tolower() == "team" )
    {
      local plr = GetPlayer( text );
      if ( !text )MessagePlayer( "Wrong syntax.", player );
      else if (( text ) && ( !plr )) MessagePlayer( "Unknown Player.", player );
      else if ( stats[ player.ID ].team ) MessagePlayer( "Already in team.", player );
      else if (( plr ) && ( stats[ plr.ID ].team )) MessagePlayer( "This player is already in a team.", player );
      else
         {
     PrivMessage( ">>" + player.Name + " would like to team up with you.", plr );
     PrivMessage( "Team-up message sent.", player );
     stats[ player.ID ].request = plr.ID;
     }
    }

   else if ( cmd.tolower() == "accept" )
     {
       local plr = GetPlayer( text );
       if ( !text ) MessagePlayer( "Wrong syntax. [/c accept player].", player );
       else if (( text ) && ( !plr )) MessagePlayer( "Unknown Player.", player );
       else if (( plr ) && ( player.ID != stats[ plr.ID ].request )) MessagePlayer( "This player haven't sent you team request.", player );
       else if ( stats[ player.ID ].team ) MessagePlayer( "Already in a team.", player );
       else
          {
       Message( ">> " + player.Name + " has teamed-up with " + plr.Name + "." );
       stats[ player.ID ].team = true;
       player.Skin = 0;
       player.Skin = plr.Skin;
       player.Team = plr.Team;
   player.Pos = plr.Pos;
       stats[ plr.ID ].teamp = player.Name;
       stats[ player.ID ].teamp = plr.Name;
      }
     }

   else if ( cmd.tolower() == "deny" )
    {
     local plr = GetPlayer( text );
    if ( !text ) MessagePlayer( "Wrong syntax. [/c deny player].", player );
    else if (( text ) && ( !plr )) MessagePlayer( "Unknown Player.", player );
    else if (( plr ) && ( player.ID != stats[ plr.ID ].request )) MessagePlayer( "This player haven't sent you team request.", player );
    else
       {
        Message( ">>" + player.Name + " denied team request from " + plr.Name + "." );
    stats[ plr.ID ].request = 51;
       }
    }

  else if ( cmd.tolower() == "leave" )
   {
    if ( stats[ player.ID ].team )
       {
   local plr = GetPlayer( stats[ player.ID ].teamp );
   Message( ">>" + player.Name + " left the team." );
   stats[ player.ID ].team = false;
   stats[ plr.ID ].teamp = null;
   stats[ player.ID ].teamp = null;
   }
     }
}

function onPlayerPart( player, reason )
{
  if ( stats[ player.ID ].team )
       {
   local plr = GetPlayer( stats[ player.ID ].teamp );
   Message( ">>" + player.Name + " left the team." );
   stats[ plr.ID ].teamp = null;
   stats[ player.ID ] = null;
   }
}

function GetPlayer( plr )
{
    if ( plr )
    {
        if ( IsNum( plr ) )
        {
            plr = FindPlayer( plr.tointeger() );
            if ( plr ) return plr;
            else return null;
        }
    else
        {     
            plr = FindPlayer( plr );
            if ( plr ) return plr;
            else return null;
        }
    }
    else return null;
}

function NumTok(string, separator)
{
local tokenized = split(string, separator);
return tokenized.len();
}

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;
}
#210
any one ?