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 - Saiyan Attack

#31
Quote from: Shadow on Sep 16, 2017, 10:43 PMHere is how I do it in my plugin. Check out this function.

The most important lines are this and this
Thanks @Shadow sir but will you explain me little bit about leftgap, heading, Vector3 ?
Quote from: Mahmoud Tornado on Sep 17, 2017, 10:09 AM
Quote from: Saiyan Attack on Sep 16, 2017, 05:23 PMno buddy i want position system for racers which show you, your position from your opponents. and i only know that distance are require for this but i don't know how it works ! i try it but failed cause i don't know how to run distance minus direction
here is an example of positions ....


sry i don't know how :( i am sry :(
It's okay friend don't you worry about it !!
#32
no buddy i want position system for racers which show you, your position from your opponents. and i only know that distance are require for this but i don't know how it works ! i try it but failed cause i don't know how to run distance minus direction
here is an example of positions ....


#33
bump help please :'( !!
#34
Hello everyone !!

I need help for making position system in race i saw in gta vice city RC bandit Race that player can seen their position when someone left back .... is that possible that we can make the same position system in vcmp ?? if yes then how ?

sorry for my bad english :'(
#35
Hello Everyone !!

Today I'm going to release a snippet called server lock & unlock system ... with this snippet you can get server password & detect that your server is lock & unlock ... This lock system will only worked when you use _Server.Password ... It's mean you guys just forget about SetPassword and starting using _Server.Password ... cause the ability to get lock pass & stats is in _Server.Password ... why do i tell that becoz some newbies doesn't know how to scripting ... if newbies want to use this so it will definitely know about how it work ... so lets get start ...

_Server <- {
lock = false,
password = null

function Password(pass)
{
if(pass!="") {
SetPassword(pass);
password=pass;
lock=true;
}
else {
SetPassword(pass);
password=pass;
lock=false;
}
}

function GetLock() { return lock; }
function GetPassword() { return password; }
}

function onScriptLoad()
{
print("Server Lock & Unlock System Loaded!");
}
function onPlayerCommand( player, command, text )
{
local cmd = command.tolower();
if ((cmd == "svr")||(cmd == "server"))
{
if (!text) MessagePlayer("[syntax] /"+cmd+" <stats/pass/lock/unlock>",player);
else {
local stat = GetTok(text," ", 1).tolower();
if ((stat == "stats")||(stat == "status")) {
if(_Server.GetLock() == true) MessagePlayer("This Server Are Locked",player);
else MessagePlayer("Server Is Open For Public Use!",player);
}
else if ((stat == "pass")||(stat=="password")) {
if(_Server.GetLock() == false) MessagePlayer("Server Is Running Without Password Protection !!",player);
else MessagePlayer("Server Password Is:[ "+_Server.GetPassword()+" ]",player);
}
else if ( stat == "lock" ) {
local password = GetTok(text, " ", 2);
if(!password) MessagePlayer("[syntax] /"+cmd+" <lock> <enter your password>",player);
else if (_Server.GetLock()==true) MessagePlayer("Server Is Already Locked!",player);
else {
_Server.Password(password);
PrivMessage(player,"Server Is Lock With Password: "+_Server.GetPassword()+", Status: "+_Server.GetLock());
}
}
else if ( stat == "unlock" ) {
if(_Server.GetLock()==false) MessagePlayer("Server Is Already Unlocked !!",player);
else {
_Server.Password("");
PrivMessage(player,"Server Is Now Open For Public Use!");
}
}
else MessagePlayer("[syntax] /"+cmd+" <stats/pass/lock/unlock>",player);
}
}
}
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();
}

credits :- [KoF]Killer
#36
topic locked !! problem solved !!
#37
Quote from: EK.IceFlake on May 19, 2017, 12:50 PM1. Why do you save it in an array? You do realize that you don't need to keep an instance to it, right?
2. While the timer is running, the player who this timer was intended for might leave and another player can take their ID. You'll need to add a few more checks:
NewTimer("TimerRuns", 1000, 10, player.ID, player.Name, player.UID, player.UID2, player.IP);function TimerRuns(id, name, uid, uid2, ip)
{
    local player = FindPlayer(id);
    if (player == null) return;
    if (player.ID != id || player.Name != name || player.UID != uid || player.UID2 != uid2 || player.IP != ip) return;

    MessagePlayer("This is just an example; this is not the actual code", player);
}
3. Alternatively, you could use this.
i use array becoz i am working on a mission called terror the police station, that will completes in 24 minutes ... and get soon as player can ... or if someone leave server then we can stop timer or mission progress ... which the player start ....
#38
hello everyone !!

i am here to ask about timer that use for every single player when they need arise ... Is it okay ? if i use like that ...
function onScriptLoad() {
loadtimerforplayer <- array(100,null);
}

function onPlayerCommand(player, cmd, text) {
if (cmd == "runforme") {
loadtimerforplayer[player.ID] = NewTimer("TimerRuns",1000,10,player.ID);
}
}
function TimerRuns(player) {
local plr = FindPlayer(player);
if(plr) {
MessagePlayer("this is just an example this is not the actual code !!",plr);
}
}
#39
Quote from: Luis_Labarca on Apr 29, 2017, 04:45 AM:) this Functions to turn off the engine of the vehicle
player.Vehicle.Set Handling Data (13,1);
player.Vehicle.SetHandlingData (14.1);
player.Vehicle.SetHandlingData (28, 555555);
Works for helicopters and vehicles, and boats do not work
Thanks @Luis_Labarca :) It's Work For Both But Not Work In Plane

Quote from: EK.IceFlake on Apr 29, 2017, 03:56 AM
Quote from: kennedyarz on Apr 29, 2017, 01:57 AM
Quote from: Saiyan Attack on Apr 28, 2017, 11:44 PMHello Everyone !!

i am facing a problem since last week that killing heli's and boat's engine ....
i tried player.Vehicle.SetHandlingData(13,0);
player.Vehicle.SetHandlingData(14,0);
but this way not work on both ...
then i try player Vehicle.Speed = Vector(0,0,0); failed :( !!
is there any other way that can kill heli's and boat's engine without freezing player ?

Sorry for my bad english :(

Hi, I really do not understand
heli.KillEngine();
boat.KillEngine();
player.Frozen = false;
@EK.IceFlake KillEngine Worked Same As Vehicle.Kill(); Function it will make blast vehicles and i don't want to blast it i want to stop it when fuel is end !! So If We Want KillEngine Then We Need To Make Our Self Function !!
Quote from: kennedyarz on Apr 29, 2017, 01:57 AM
Quote from: Saiyan Attack on Apr 28, 2017, 11:44 PMHello Everyone !!

i am facing a problem since last week that killing heli's and boat's engine ....
i tried player.Vehicle.SetHandlingData(13,0);
player.Vehicle.SetHandlingData(14,0);
but this way not work on both ...
then i try player Vehicle.Speed = Vector(0,0,0); failed :( !!
is there any other way that can kill heli's and boat's engine without freezing player ?

Sorry for my bad english :(

Hi, I really do not understand, you can use this method to specify better. Use the translator "write your language and translate it into English" then translate from English into the language you speak and re-translate into English and do that process about three times, and you will better understand what it says.

Hey Friend !! Thanks For Advise thumbs up :) I Will Try It !!
#40
Hello Everyone !!

i am facing a problem since last week that killing heli's and boat's engine ....
i tried player.Vehicle.SetHandlingData(13,0);
player.Vehicle.SetHandlingData(14,0);
but this way not work on both ...
then i try player Vehicle.Speed = Vector(0,0,0); failed :( !!
is there any other way that can kill heli's and boat's engine without freezing player ?

Sorry for my bad english :(
#41
This Will Work When You Press Enter ...
function onScriptLoad()
{
canenter <- array(GetMaxPlayers(),false);
teleport <- array(GetMaxPlayers(),0);
ENTER <- BindKey(true, 0x0D, 0, 0);
MakePoint();
}

function MakePoint()
{
CreateCheckpoint(null, 1, true, Vector(18.6172,-1296.44,10.4633), ARGB(255, 0, 0,200), 1);
CreateCheckpoint(null, 1, true, Vector(-1483,476.697,3497.33), ARGB(255, 0, 0,200), 1);
CreateCheckpoint(null, 1, true, Vector(24.6771,-1360.43,10.4633), ARGB(255, 0, 0,200), 1);
CreateCheckpoint(null, 1, true, Vector(-1483,476.697,3497.33), ARGB(255, 0, 0,200), 1);
}

function onCheckpointEntered(player, checkpoint)
{
if (canenter[player.ID]==false) {
canenter[player.ID]=true;
teleport[player.ID]=checkpoint.ID;
}
}

function onKeyUp( player, key )
{
if (key == ENTER) {
if (canenter[player.ID] == true) {
switch(teleport[player.ID]) {
case 0: player.Pos = Vector(-1485.6,539.804,3497.3); break;
case 1: player.Pos = Vector(-368.43,-419.602,10.7295); break;
default: break;
}
Announce("~s~Point: ~y~Yes", player, 1);
canenter[player.ID]=false;
teleport[player.ID]=0;
}
else Announce("~s~Point: ~y~No",player,1);
}
}

And This Will Work When You Press Enter And Leave The Checkpoint ...
function onScriptLoad()
{
canenter <- array(GetMaxPlayers(),false)
canenter2 <- array(GetMaxPlayers(),false)
ENTER <- BindKey(true, 0x0D, 0, 0);
MakePoint();
}

function MakePoint()
{
CreateCheckpoint(null, 1, true, Vector(18.6172,-1296.44,10.4633), ARGB(255, 0, 0,200), 1);
CreateCheckpoint(null, 1, true, Vector(-1483,476.697,3497.33), ARGB(255, 0, 0,200), 1);
CreateCheckpoint(null, 1, true, Vector(24.6771,-1360.43,10.4633), ARGB(255, 0, 0,200), 1);
CreateCheckpoint(null, 1, true, Vector(-1483,476.697,3497.33), ARGB(255, 0, 0,200), 1);
}

function onCheckpointEntered(player, CheckPoint)
{
if(canenter[player.ID]==false) canenter[ player.ID ]=true;
}

function onCheckpointExited(player, checkpoint)
{
if((canenter[player.ID]==true) && (canenter2[ player.ID ] == true)) {
switch(CheckPoint.ID) {
case 0: player.Pos = Vector(-1485.6,539.804,3497.3); break;
case 1: player.Pos = Vector(-368.43,-419.602,10.7295); break;
}
canenter[player.ID]=false;
canenter2[player.ID]=false;
}
}

function onKeyUp( player, key )
{
if (key == ENTER) {
if (canenter[player.ID] == true) {
canenter2[player.ID] = true;
Announce( "~s~Point: ~y~Yes", player, 1 );
}
else Announce( "~s~Point: ~y~No", player, 1 );
}
}
#42
The Error We Got From 3DAnnounce Or 3DAnnounceAll Just Rename It And It Works !! As I do ...
function Movable( plr, text )
{
local data = Stream();
data.StartWrite();
data.WriteInt( 1 );
data.WriteString( text );
data.SendStream( plr );
}

function MovableAll( text )
{
local data = Stream();
data.StartWrite();
data.WriteInt( 1 );
data.WriteString( text );
data.SendStream( null );
}

Cmd ...
if ( cmd == "movable" )
{
if ( !text ) MessagePlayer("[#00EE00]SYNTAX: [#FFFFFF]/"+cmd+" <plr/all> <text>",player);
else {
local plr = GetTok(text," ", 1), msgs = GetTok(text," ",2,NumTok(text," "));
if ( msgs.len() > 50 ) return MessagePlayer("[#00EE00]ERROR [#FFFFFF]You announcement is too long." , player);
else {
if( plr.tolower() == "all" ) Movable( plr, msgs );
else if( FindPlayer( plr ) ) MovableAll( msgs );
else { MessagePlayer("[#00EE00]ERROR [#FFFFFF] Unknown Player.",player); }
}
}
}
#43
It's Simple Friend When VIP's Player drowning then he will come out from water without any lost of health ... for example If player drown location is haiti then he will come out near bank boat station ... if he drown in boat yard then he come out in boat yard station .... otherwise game will react as usualreutine ...
if you don't like my idea than what about swimming system :P ....
#44
lol @kennedyarz Noway I'm Making This Code For VIP's When Vip Player Drowning This Code Will Save VIP's Life :P Or The Others Get This Message ..