Needed a Important Help

Started by =RK=MarineForce, May 13, 2018, 08:07 PM

Previous topic - Next topic

=RK=MarineForce

Thanks Man You're Best Humans

=RK=MarineForce

#16
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;

=RK=MarineForce

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 Boubekri

The system it's have many errors, Tomorrow i'll Create one diepos system for you.
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

Saiyan Attack

#19
GetTok is required ... you have to paste them correctly and then it works as you want
// 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
// add this line after your code ....
Death.Spawn(player);

onPlayerPart
Death.Remove(player);
onPlayerDeath and onPlayerKill
Death.Save(player);
onPlayerCommand
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

Quote from: Mahmoud Tornado on May 15, 2018, 05:00 PM
Quote from: =RK=MarineForce on May 15, 2018, 02:58 PMIf 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 15, 2018, 06:55 AMI 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 15, 2018, 04:42 PMThis is not tested there may be mistakes
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 15, 2018, 06:59 AMIts 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 15, 2018, 05:44 PMI 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

Retard

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
Just another retard roaming around.

Xmair

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.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Mohamed Boubekri

Tested.
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();
}
}
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

NicusorN5

Quote from: =RK=MarineForce on May 15, 2018, 02:58 PMARE 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.