Author Topic: Please Help  (Read 2143 times)

0 Members and 1 Guest are viewing this topic.

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Please Help
« on: December 16, 2012, 05:10:11 pm »
i try to make a cuff cmd
i use
[pawn]
else if ( strcmp( cmd, "cuff", true ) == 0 )
   {
      new reason[ 256 ], szMsg[ 128 ], plr;
      tmp = strtok( cmdtext, idx ), reason = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c cuff [Nick/ID]
        else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
      else
      {
         format( szMsg, sizeof( szMsg ), "Admin %s Freezed player:[ %s ] Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +8 ] );
         SendClientMessageToAll( COLOR_GREEN, szMsg );
         TogglePlayerControllable( plr, 0 );
      }
      return 1;
   }[/pawn]
but it not stop a player
there is a line missed
give me the line ple
line of player dissconnect when i go near to him
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline · KaTaNNa ·

  • Street Thug
  • *
  • Posts: 12
  • It's easy to talk about difficult mi.Lo is be me .
    • View Profile
Re: Please Help
« Reply #1 on: December 25, 2012, 04:59:13 pm »
Hi . I new

I just want to tell you if you can write moderately so I can translate it and can help you with something!

The cmd should actually be so. Do not really understand what your problem

:

[pawn]else if ( strcmp( cmd, "cuff", true ) == 0 )
   {
      new reason[ 256 ], szMsg[ 128 ], plr;
      tmp = strtok( cmdtext, idx ), reason = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c cuff [Nick/ID] [Reason]");
  else if (plr == INACTIVE_PLAYER_ID) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
      else
      {
         format( szMsg, sizeof( szMsg ), "Admin %s Freezed player:[ %s ] Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +8 ] );
         SendClientMessageToAll( COLOR_GREEN, szMsg );
         TogglePlayerControllable( plr, 0 );
      }
      return 1;
   } [/pawn]

I unfortunately do not see the problem in cmd. I want you to tell me what it is!
If you think you do dificil.No back ... go ahead and face it! ;D