Needed a Important Help

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

Previous topic - Next topic

=RK=MarineForce

Hello, Guyz i need a help.

can u give me Diepos on system i mean,

when Players die. if he spawn player pos = where he die.

and with cmd
else if ( cmd == "diepos" )
{
if(!text) MessagePlayer(" /diepos on and off ", player);
case"on"
{
}
calse"off"
{
}
}
 can u give me this?
don't understand i think sorry.

and irc system

umar4911

Okay I am going to help you by not giving you the code, just giving hint and you will makw yourself.
There will be 2 class like diepos = false; and dieposloc = null;

If player uses the cmd /diepos and the arguments are true, it will set the diepos class to true.
Okay, as soon as a player is killed or dies, its location where he died will be set into dieposloc.

As soon as play spawn, it checks that if the class diepos = true and dieposloc!= null then set the pos of player that in dieposloc
RT Member | Asian City Scripter | CTB Contributor | VKs Contributor | European City Contributor | EAD Scripter

=RK=MarineForce

Only i need This

else if ( cmd =="diepos on")
{
diepos = true;
}
else if ( cmd == "diepos off" )
{
diepos = false;
}

plz give me the code i don't know more about it
else{
i

=RK=MarineForce

i don't learn about this in wiki can u give me how to learn this to make it by ownself! plz help Thank For Support!s

Mohamed Boubekri

Uhh! i Also have the command. @umar4911 try to use stats[player.ID].Diepos Better than diepos = on.
Because diepos = on, that will enable diepos of all players, but stats[player.ID].Diepos = true, that will enabel diepos for player.
@=RK=MarineForce, Just Create a Class, You can check examples on an account system,
Then create cmd /diepos, you can save diepos of player by stats[player.ID].X = player.Pos.x.............
But make it on function onplayerdeath, then add on onplayerspawn to teleport player to the die pos. which it's saved already on function onplayerdeath.
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].

umar4911

Quote from: Mohamed on May 14, 2018, 01:26 PMUhh! i Also have the command. @umar4911 try to use stats[player.ID].Diepos Better than diepos = on.
Because diepos = on, that will enable diepos of all players, but stats[player.ID].Diepos = true, that will enabel diepos for player.
@=RK=MarineForce, Just Create a Class, You can check examples on an account system,
Then create cmd /diepos, you can save diepos of player by stats[player.ID].X = player.Pos.x.............
But make it on function onplayerdeath, then add on onplayerspawn to teleport player to the die pos. which it's saved already on function onplayerdeath.
I mentioned "make 2 classes"
RT Member | Asian City Scripter | CTB Contributor | VKs Contributor | European City Contributor | EAD Scripter

umar4911

Quote from: vitogta on May 14, 2018, 05:26 PMan array is not a class.
yeah I know. A class will look lile stats[player.ID].diepos
RT Member | Asian City Scripter | CTB Contributor | VKs Contributor | European City Contributor | EAD Scripter

=RK=MarineForce

I m trying Thanks For Support Gud~

=RK=MarineForce

#8
Its Hard Plese, Give me The code i will get some more helps from him

Brothers can u help me how to make Database and functions Commands and load script from database

since i m member of 2013 i don't know each other :'(

umar4911

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

Brothers can u help me how to make Database and functions Commands and load script from database

since i m member of 2013 i don't know each other :'(
I became a vcmp scripter in 2017.

Okay post the code uptil now you made.
RT Member | Asian City Scripter | CTB Contributor | VKs Contributor | European City Contributor | EAD Scripter

=RK=MarineForce

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!

Retard

This 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; }
}

Mahmoud Tornado

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.

Retard

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

Mohamed Boubekri

#14
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; }
}
Maybe you need to add the line in function onscriptload:-( Because you need definition of dp. )
dp <- array( GetMaxPlayers(), null );And Also change the function onplayerspawn from:-
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; }
}
To:-
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; }
}
And Also Change Function onplayerdeath From:-
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
}
To:-
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;
}
Anyway, Nice you got my idea!
| What now ? | Not yet ! |
Morrocan:- [ 🇲🇦 ].