=RK=MarineForce

  • Sr. Member
  • why noise ??? Re 100%
  • Posts: 388
Re: Needed a Important Help
« Reply #16,  »Last edited
I didn't undertstand from This

how do server know dp?


I didn't Understand Mohamed how Server know ? what is Dp?
and some commands

Untested cmds
else if ( cmd == "diepos on " )
{
if( dp[ player.ID ].diepos == true ) MessagePlayer(" Your Diepos is already On ", player);
else{
dp[ player.ID ].diepos == true;
}
}
else if ( cmd == "diepos off " )
{
if( dp[ player.ID ].diepos == false ) MessagePlayer(" Your Diepos is already off ", player);
dp[ player.ID ].diepos == false;
}

else if ( cmd == "diepos" )
{
MessagePlayer(" [#0000FF] Error- [#00FFFF] /" + cmd + " on and off ", player);
}

and 1 thing

player.Pos.x.y.z = dp[ player.ID ].x.y.z;
Re: Needed a Important Help
« Reply #17,  »
Didn't working :/


class diepos
{
diepos = false;
x = 0;
y = 0;
z = 0;
}

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

function onPlayerJoin( player )
{
dp[ player.ID ] = diepos( );
}

function onPlayerSpawn(player)
{
if( dp[ player.ID ].diepos = true ) {
player.Pos.x = dp[ player.ID ].x;
player.Pos.y = dp[ player.ID ].y;
player.Pos.z = dp[ player.ID ].z;
}

function onPlayerDeath( player, reason )
{
if( dp[ player.ID ].diepos = true ) {
player.Pos.x = dp[ player.ID ].x;
player.Pos.y = dp[ player.ID ].y;
player.Pos.z = dp[ player.ID ].z;
}

and i have more functions spawnloc set spawnwep in added didn't working for  showing any error line 259 in onplayerdeath

when i type /kill and spawn its say You are spawnwed at your location its spawnloc cmd . but diepos no works
i added

Mohamed

  • Full Member
  • Regards, We3da
  • Posts: 242
Re: Needed a Important Help
« Reply #18,  »
The system it's have many errors, Tomorrow i'll Create one diepos system for you.
Feel Free To PM Me For Any Support, I'm Care.
Anyway u can Contact Me Ingame!
Ingame Name: [AFt]We3da^
My Own Server: ViceEvil Server

Saiyan Attack

  • Jr. Member
  • [KoF]Killer
  • Posts: 66
Re: Needed a Important Help
« Reply #19,  »Last edited
GetTok is required ... you have to paste them correctly and then it works as you want
Code: [Select]
// add this on top of your main.nut or anywhere ...
Death <- {
Position = array(100,null),
Stats = array(100,false),

function Spawn(player)
{
if(this.Stats[player.ID] == true) {
local coord = ::split(this.Position[player.ID],", ");
local axisX = coord[0], axisY = [1], axisZ = [2];
player.Pos = ::Vector(axisX.toflaot(), axisY.tofloat(), axisZ.tofloat());
::PrivMessage(player,"Spawn to your last diepos");
}
}

function Save(player)
{
if(this.Stats[player.ID] == true ) {
this.Position[player.ID] = player.Pos.x+", "+player.Pos.y+", "+player.Pos.z;
}
}

function Add(player)
{
this.Stats[player.ID] = true;
::PrivMessage(player,"Diepos enable to your account!");
}

function Remove(player)
{
if(this.Stats[player.ID] == true ) {
this.Position[player.ID] = null;
this.Stats[player.ID] = false;
}
}
};
onPlayerSpawn
Code: [Select]
// add this line after your code ....
Death.Spawn(player);

onPlayerPart
Code: [Select]
Death.Remove(player);

onPlayerDeath and onPlayerKill
Code: [Select]
Death.Save(player);

onPlayerCommand
Code: [Select]
if(cmd.tolower() == "diepos")
{
if(!text) MessagePlayer("Correct Syntax: /"+cmd+" [On/Off]",player);
else {
local state = GetTok(text," ",1);
switch(state.tolower()) {
case "on":
if(Death.Stats[player.ID] == true) MessagePlayer("you're already enable diepos in your account!",player);
else Death.Add(player);
break;
case "off":
if(Death.Stats[player.ID] == false) MessagePlayer("you're already disable diepos in your account!",player);
else {
Death.Remove(player);
PrivMessage(player,"Diepos disable to your account!");
}
break;
default: MessagePlayer("Correct Syntax: /"+cmd+" [On/Off]",player); break;
}
}
}

umar4911

  • Sr. Member
  • Creating own server!
  • Posts: 375
Re: Needed a Important Help
« Reply #20,  »
Quote from Mahmoud Tornado on May 15th, 06:00 PM
Quote from =RK=MarineForce on May 15th, 03:58 PM
If You Don't Want to help so go away from this topic! I don't want Your Help You are not biggest scripter of VC-MP There are more best scripters are help me more than u Go away from this topic if u want to not help if u want to help so what i m giving Request if u can't give me it so go away from this topic there are more best scripters man ARE THERE @Tornado,Mohammed,SaiyanAttack,Zeus,Anik,.,vitogta They are best than u if u want to help so give here what i want plese!
Why you angry now? He is right, you must learn you will never make your server with the others help, Just Try!!!,
Quote from =RK=MarineForce on May 15th, 07:55 AM
I m trying Thanks For Support Gud~
You was right that you said you will try, but did you tried? Ha, Did you?
Bro just try, I'm Become Scripter from 2018, i was just beginner in 2017.
But it didn't Matter when you started it's with you want to be or not.
Scripting don't want an English grammar to make, it want to just thinking what you will do and how?
English grammars only in Massages! :V
Quote from Ali Ahmed on May 15th, 05:42 PM
This is not tested there may be mistakes
Code: [Select]
class diepos
{
diepos = false;
x = 0;
y = 0;
z = 0;
}
function onPlayerJoin( player )
{
dp[ player.ID ] = diepos( );
}
function onPlayerDeath( player, reason )
{
dp[ player.ID ].x; = player.Pos.x
dp[ player.ID ].y; = player.Pos.y
dp[ player.ID ].z; = player.Pos.z
}
function onPlayerSpawn( player )
{
if( dp[ player.ID ].diepos = true ) {
player.Pos.x = dp[ player.ID ].x;
player.Pos.y = dp[ player.ID ].y;
player.Pos.z = dp[ player.ID ].z; }
}
Here is your want, from Ali Ahmed.
Do you think this is very hard as you said?
Quote from =RK=MarineForce on May 15th, 07:59 AM
Its Hard Plese, Give me The code i will get some more helps from him
Just try to understand it, not only copy and paste.
Now I am outta his topic. No more help for marine ever.
Quote from Ali Ahmed on May 15th, 06:44 PM
I know it's easy but the way umar was ignoring him and the message he sent made me emotional so i made it and posted it
I wanted him to not to copy the code but to use his effort to make a code if that is even wrong, I will fix that but I dont think he is interested in learning squirrel.

Good Luck for future marine.
I am gamer, programmer and hacker. Try to find me!
xD

Ali Ahmed

  • Full Member
  • Why so rude,be more rude
  • Posts: 103
Re: Needed a Important Help
« Reply #21,  »
Ok, I'm going t answer sincerely. I was bored so i made that shit. That is the Answer to all of youur questions and marine please lock the damn topic and try something yourself
Need some Help pm me.Wanna see my server the name is Pakistan Theft Auto Reloaded

Xmair

  • Wiki Contributor
  • Posts: 869
Re: Needed a Important Help
« Reply #22,  »
Code: [Select]
diePos <- array( GetMaxPlayers( ), false );

class CDie <- {
enabled = false;
pos = null;
}

function onPlayerJoin( player ) {
diePos[ player.ID ] = CDie( );
}

function onPlayerSpawn( player ) {
if ( diePos[ player.ID ].enabled == true && diePos[ player.ID ].pos != null ) {
player.Pos = diePos[ player.ID ].pos;
}
}

function onPlayerDeath( player, reason ) {
if ( diePos[ player.ID ].enabled == true ) {
diePos[ player.ID ].pos = player.Pos;
}
}

function onPlayerKill( killer, player, reason, bodypart ) {
if ( diePos[ player.ID ].enabled == true ) {
diePos[ player.ID ].pos = player.Pos;
}
}

function onPlayerTeamKill( killer, player, reason, bodypart ) {
if ( diePos[ player.ID ].enabled == true ) {
diePos[ player.ID ].pos = player.Pos;
}
}

function onPlayerCommand( player, cmd, text ) {
if ( cmd.tolower( ) == "diepos" ) {
switch( diePos[ player.ID ].enabled ) {
case true:
diePos[ player.ID ].enabled = false;
MessagePlayer( "[#0099CC]You'll no longer spawn where you died.", player );
break;

case false:
diePos[ player.ID ].enabled = true;
MessagePlayer( "[#0099CC]You'll now spawn where you died.", player );
break;

default:
diePos[ player.ID ].enabled = true;
MessagePlayer( "[#0099CC]You'll now spawn where you died.", player );
break;
}
}
}
Untested.
I convert minecraft worlds to VCMP, if you want your worlds to be converted, shoot me a PM! (Please note the paintings, flower pots, armour stands and custom skulls won't be converted within the model. Also big objects won't be converted)

Mohamed

  • Full Member
  • Regards, We3da
  • Posts: 242
Re: Needed a Important Help
« Reply #23,  »
Tested.
Code: [Select]
class Diepos
{
 Diepos = false;
 X = 0;
 Y = 0;
 Z = 0;
}
function onScriptLoad()
{
dstats <- array( GetMaxPlayers(), null );
}
function onPlayerJoin( player )
{
dstats[ player.ID ] = Diepos();
}
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "credits" )
{
MessagePlayer("[#00ffff]Information: [#ffffff]Diepos System By We3da^",player);
}
else if ( cmd == "diepos" )
{
if ( !player.IsSpawned ) MessagePlayer( "[#ff0000]Error: You Must Spawn First.", player );
else if ( player.Vehicle ) MessagePlayer( "[#ff0000]Information: [#ffffff]You Can't Teleport You Need To Exit That's Cars.", player );
else if (  !text ) MessagePlayer("[#00ffff]Syntax: [#ffffff]/diepos <on/off>",player);
else if ( text == "on" ) MessagePlayer("[#00ffff]Information: [#ffffff]Die Pos Enabled",player), dstats[ player.ID ].Diepos = true;
else if ( text == "off" ) MessagePlayer("[#00ffff]Information: [#ffffff]Die Pos Disabled",player),  dstats[ player.ID ].Diepos = false;
else MessagePlayer("[#00ffff]Syntax: [#ffffff]/diepos <on/off>",player);
}
}
function onPlayerSpawn( player )
{
if ( dstats[ player.ID ].Diepos )
{
player.Pos = Vector( dstats[ player.ID ].X, dstats[ player.ID ].Y, dstats[ player.ID ].Z );
}
}
function onPlayerDeath( player, reason )
{
if ( dstats[ player.ID ].Diepos == true )
{
dstats[ player.ID ].X = player.Pos.x.tofloat();
dstats[ player.ID ].Y = player.Pos.y.tofloat();
dstats[ player.ID ].Z = player.Pos.z.tofloat();
}
}
function onPlayerKill( killer, player, reason, bodypart )
{
if ( dstats[ player.ID ].Diepos == true )
{
dstats[ player.ID ].X = player.Pos.x.tofloat();
dstats[ player.ID ].Y = player.Pos.y.tofloat();
dstats[ player.ID ].Z = player.Pos.z.tofloat();
}
}
Feel Free To PM Me For Any Support, I'm Care.
Anyway u can Contact Me Ingame!
Ingame Name: [AFt]We3da^
My Own Server: ViceEvil Server

Athanatos

  • Hero Member
  • Working on maybe the best VC:MP server ever
  • Posts: 622
Re: Needed a Important Help
« Reply #24,  »
Quote from =RK=MarineForce on May 15th, 03:58 PM
ARE THERE @Tornado,Mohammed,SaiyanAttack,Zeus,Anik,.,vitogta They are best than u if u want to help so give here what i want plese!
L M A O . Nice grammar dude.