Author Topic: Please HELP me in !DM script  (Read 6836 times)

0 Members and 1 Guest are viewing this topic.

Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Please HELP me in !DM script
« on: February 10, 2013, 12:49:04 pm »
HY,
        i want a good dm command that player type !dm then player die then player again spawn in dm without typing !dm l. player spawn in game when player type !leave to leave dm please some one can help me please post what i need to put in this script i have simple dm script already!

Code: [Select]
else if ( strcmp( cmd, "!DM", true ) == 0 )
{
            SetPlayerWep(playerid, 20, 9999 };
            SetPlayerHealth{playerid,100.0 };
    SetPlayerPos(playerid,79.8332, 1103.0068, 32.6039, 89.6475,0);
    format( szMsg, 128, "%s Started DeathMatch Want to DM with him type !dm ",gPlayers[playerid]);
    SendClientMessageToAll( RED, szMsg );
           
return 1;

  }
SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Please HELP me in !DM script
« Reply #1 on: February 10, 2013, 01:06:17 pm »
JaVeD, make a new variable ( for example, playerisondm[MAX_PLAYERS];) and set it's value to 1 when player types "!DM"
then, in public OnPlayerSpawn
[pawn]
if(playerisonDM[playerid]==1)
{
            SetPlayerWep(playerid, 20, 9999 };
            SetPlayerHealth{playerid,100.0 };
       SetPlayerPos(playerid,79.8332, 1103.0068, 32.6039, 89.6475,0);
       format( szMsg, 128, "%s Started DeathMatch Want to DM with him type !dm ",gPlayers[playerid]);
       SendClientMessageToAll( RED, szMsg );
}
[/pawn]


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Re: Please HELP me in !DM script
« Reply #2 on: February 10, 2013, 02:04:50 pm »
Not Working :( Please can u give me this command ?
« Last Edit: February 10, 2013, 02:22:57 pm by JaVeD »
SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Please HELP me in !DM script
« Reply #3 on: February 10, 2013, 03:09:30 pm »
new DM[MAX_PLAYERS];

then
[pawn]      else if ( strcmp( cmd, "!DM", true ) == 0 )
   {
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else
      {
       SetPlayerPos(playerid,79.8332, 1103.0068, 32.6039, 89.6475,0);
         SendClientMessageToAll( COLOR_GREEN, "Started The DM Fight" );
         RemovePlayerMarker( playerid );
         DM[playerid] = 1;
      }
      return 1;
   }[/pawn]
you can edit this
put this in onplayerspawn
[pawn]      if(DM[playerid] == 1) {

        SendClientMessage(playerid,0xAA3333AA,"You Have Entered Into DM");
        SetPlayerHealth( playerid, 100.100 );
SetPlayerPos(playerid,79.8332, 1103.0068, 32.6039, 89.6475,0);
}[/pawn]
put in onplayerdeath
[pawn]DM[playerid] = 0;[/pawn]
leave cmd
[pawn]         else if ( strcmp( cmd, "!leave", true ) == 0 )
   {
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else
      {
         SendClientMessageToAll( COLOR_GREEN, "DM end" );
         RemovePlayerMarker( playerid );
   DM[playerid] = 0;
      }
      return 1;
   }[/pawn]

My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Re: Please HELP me in !DM script
« Reply #4 on: February 10, 2013, 03:38:17 pm »
THNXXX MAN ITS WORKED ROCKING MAN !!!!! 8)

SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: Please HELP me in !DM script
« Reply #5 on: February 10, 2013, 03:42:50 pm »
My Pleasure And Need More Help? ask here
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Re: Please HELP me in !DM script
« Reply #6 on: February 10, 2013, 05:39:10 pm »
Man its bugged OnPlayerDeath >>  DM[playerid] = 0; then player spawn at road without typing !leave and DM[playerid] = 1; then player spawn at dm if we type or don't type !leave!

Can you fix this bug ?
SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com

Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Re: Please HELP me in !DM script
« Reply #7 on: February 10, 2013, 05:46:07 pm »
LOL I Spawn in dm when i die hahaha without entering !DM lol man please fix this bug
SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Please HELP me in !DM script
« Reply #8 on: February 10, 2013, 07:10:35 pm »
Oh ok so lemme give u dat:
in the beginning of your gm:
[pawn]new Float:xbefore, Float:ybefore, Float:zbefore;
new playerisondm[MAX_PLAYERS];[/pawn]

then

[pawn]public OnPlayerDisconnect(playerid, reason)
{
   playerisondm[playerid]=0;
   return 0;
}[/pawn]

then

[pawn]public OnPlayerSpawn(playerid, classid)
{
   if(playerisondm[playerid])
   {
        SetPlayerPos(playerid, 112.35513, -1150.53576, 31.30939, 0, 0);
   }
   return 1;
}[/pawn]

and then

[pawn]public OnPlayerText(playerid, text[])
{
   if(strcmp(text, "!dm", true)==0)
   {
      GetPlayerPos(playerid, xbefore, ybefore, zbefore);
      playerisondm[playerid]=1;
      SetPlayerPos(playerid, 112.35513, -1150.53576, 31.30939, 0, 0);
      SendClientMessage(playerid, 0xFF0000AA, "You have joined DM!");
   }
   else if(strcmp(text, "!leavedm", true)==0)
   {
       if(playerisondm[playerid])
       {
          playerisondm[playerid]=1;
          SetPlayerPos(playerid, xbefore, ybefore, zbefore, 0, 0);
          playerisondm[playerid]=0;
          SendClientMessage(playerid, 0xFF0000AA, "You have left the DM!");
      }
      else
      {
          SendClientMessage(playerid, 0xFF0000AA, "You are not on DM!");
      }
      return 1;
   }
   return 1;
}[/pawn]
« Last Edit: February 14, 2013, 07:36:02 pm by NeskWriter »


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Re: Please HELP me in !DM script
« Reply #9 on: February 11, 2013, 06:14:43 am »
NOT WORKING! There is too many errors in pawn man i am using GUPS but i modified the GUPS and changed the script but some of my function is GUPS function. Please change your !DM system to GUPS.
SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com

Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Re: Please HELP me in !DM script
« Reply #10 on: February 11, 2013, 08:38:07 am »
WORKED!!! my friends thnxx alot command worked mrockxkingbutt's command worked we need to remove DM[playerid] =0; from OnplayerDeath :D thnx u all for helping me Thank you nestwriter.
SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: Please HELP me in !DM script
« Reply #11 on: February 11, 2013, 08:48:45 am »
WORKED!!! my friends thnxx alot command worked mrockxkingbutt's command worked we need to remove DM[playerid] =0; from OnplayerDeath :D thnx u all for helping me Thank you nestwriter.

my pleasure) Use DM[playerid]=0 in public OnPlayerDisconnect(playerid), but it's for servers with registrarion sys


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Re: Please HELP me in !DM script
« Reply #12 on: February 11, 2013, 09:01:43 am »
I have registration system in my server but it work without DM[playerid] =0; :D
SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: Please HELP me in !DM script
« Reply #13 on: February 11, 2013, 04:03:27 pm »
NOT WORKING! There is too many errors in pawn man i am using GUPS but i modified the GUPS and changed the script but some of my function is GUPS function. Please change your !DM system to GUPS.
IS THIS SCRIPT WORKING FOR YOU ?
WORKED!!! my friends thnxx alot command worked mrockxkingbutt's command worked we need to remove DM[playerid] =0; from OnplayerDeath :D thnx u all for helping me Thank you nestwriter.

Don't make triple post next time ok ? Use <EDIT> button ;)

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Re: Please HELP me in !DM script
« Reply #14 on: February 11, 2013, 05:43:59 pm »
SORRY sseebbyy i am new in forum i use edit next time :D
SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com