Author Topic: Help?With Slap Command?  (Read 7898 times)

0 Members and 1 Guest are viewing this topic.

Offline Ankit

  • Street Thug
  • *
  • Posts: 29
    • View Profile
Help?With Slap Command?
« on: February 14, 2012, 08:13:41 am »
Hello Guys I Have A Problem I Have Made A Slap Comamnd , But When I Type /c slap 0
then it Tells me Usage: /c slap (nick/id)
i dont know whats wrong please have a look
[pawn]else if ( strcmp( cmd, "slap", true ) == 0 )
   {
      new reason[ 256 ], plr, szMsg[ 128 ];
      tmp = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c slap [Nick/ID]" );
        else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
      else
      {
         format( szMsg, sizeof( szMsg ), "Admin %s Slapped player:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ]);
         SendClientMessageToAll( COLOR_GREEN, szMsg );
         new Float:x,Float:y,Float:z,Float:health;
            GetPlayerPos(playerid,x,y,z);
            SetPlayerPos(playerid,x,y,z+5);
            health = GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid,health - 23);
         SetPlayerDrunk(plr,500 );
         SendClientMessage(plr,GREEN,"You Have Been Slapped By An Admin,Respawn To Get Rid Of It");
      }
      return 1;
   }[/pawn]
Name-Ankit Sharma
Age- 10
Location-India
WorkGroup:Small player and Scripter

Offline jimmy

  • Wiseguy
  • **
  • Posts: 94
    • View Profile
Re: Help?With Slap Command?
« Reply #1 on: February 14, 2012, 11:54:17 am »
Take this ;)

[pawn]   else if ( strcmp( cmd, "slap", true ) == 0 )
   {
      new reason[ 256 ], plr, szMsg[ 128 ];
      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 ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c slap [Nick/ID] [Reason]" );
        else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
      else
      {
         format( szMsg, sizeof( szMsg ), "Admin %s Slap player:[ %s ] Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +6 ] );
         SendClientMessageToAll( COLOR_GREEN, szMsg );
         new Float:x,Float:y,Float:z,Float:health;
            GetPlayerPos(playerid,x,y,z);
            SetPlayerPos(playerid,x,y,z+5);
            health = GetPlayerHealth(playerid,health);
            SetPlayerHealth(playerid,health - 23);
         SetPlayerDrunk(plr,500 );
         SendClientMessage(plr,GREEN,"You Have Been Slapped By An Admin,Respawn To Get Rid Of It");
     }
      return 1;
   }[/pawn]
Storm City Owner

Stormcity.smfnew.com

Offline jimmy

  • Wiseguy
  • **
  • Posts: 94
    • View Profile
Re: Help?With Slap Command?
« Reply #2 on: February 14, 2012, 11:56:34 am »
and your cmd isnot working because u add this reason [ 256 ] so it says again ;) if u dont want to give reason then delete Reason [ 256 ]
Storm City Owner

Stormcity.smfnew.com

Offline stormeus

  • VC:MP Developer
  • VC:MP Veteran
  • *
  • Posts: 1122
    • View Profile
Re: Help?With Slap Command?
« Reply #3 on: February 14, 2012, 02:34:55 pm »
and your cmd isnot working because u add this reason [ 256 ] so it says again ;) if u dont want to give reason then delete Reason [ 256 ]

That's not an error that would stop the command from working.
Do not PM me for support.




Offline RasikhQadeer

  • Street Thug
  • *
  • Posts: 49
  • Hero_Great! The Great Scripter!
    • View Profile
Re: Help?With Slap Command?
« Reply #4 on: February 14, 2012, 03:10:35 pm »
Ankit Use This In-Game To Slap That Player:

/c slap [Id] [Reason]. It Should Work ;)

Offline jimmy

  • Wiseguy
  • **
  • Posts: 94
    • View Profile
Re: Help?With Slap Command?
« Reply #5 on: February 14, 2012, 03:48:00 pm »
Stormeus ir right!
Storm City Owner

Stormcity.smfnew.com

Offline Innocent Heart

  • Wiseguy
  • **
  • Posts: 51
  • Crime Investigation Department Owner
    • View Profile
    • Crime Investigaton Department
Re: Help?With Slap Command?
« Reply #6 on: February 14, 2012, 04:29:32 pm »
Ankit Use This In-Game To Slap That Player:

/c slap [Id] [Reason]. It Should Work ;)
Yes Ankit I also Want to say that u Type /c slap [id] [Reason] then it Should WOrk.. RahikhQadeer Point is Right ..! And if Doesen't Work again THen take jimmy's Slap Command and then check then it should work .. or Fix Your Command.
Conatact Information :
Facebook:-www.facebook.com/dashingjaff
Youtube:-www.youtube.com/NooranScripter

====>My Server Info  < ========
ServerName :- CID-Server
Server Clan :- [D.R] Dakriders
Server Forum :- www.CidServer.tk
Clan Forum :-www.Drgang.tk
=====> DarkRiders Group <=====

Pm Me If U want To be Pro In Scripting !
Those Who Banned my Ip and My Freind's Ip They Are Big Fuckers...!

Offline Ankit

  • Street Thug
  • *
  • Posts: 29
    • View Profile
Re: Help?With Slap Command?
« Reply #7 on: February 15, 2012, 07:54:59 am »
jimmy's slap command is giving me 5 errors
Name-Ankit Sharma
Age- 10
Location-India
WorkGroup:Small player and Scripter

Offline jimmy

  • Wiseguy
  • **
  • Posts: 94
    • View Profile
Re: Help?With Slap Command?
« Reply #8 on: February 15, 2012, 11:50:18 am »
But is it Compile or not
Storm City Owner

Stormcity.smfnew.com

Offline Innocent Heart

  • Wiseguy
  • **
  • Posts: 51
  • Crime Investigation Department Owner
    • View Profile
    • Crime Investigaton Department
Re: Help?With Slap Command?
« Reply #9 on: February 15, 2012, 12:44:51 pm »
But is it Compile or not
Afcorse Not Because they are errors. In Errors Pawno Can't Compile .But in Warning Pawn Can be Compil .So it Means Your Slap Command is Don''t Right. So Jimmy Fix it.!
Conatact Information :
Facebook:-www.facebook.com/dashingjaff
Youtube:-www.youtube.com/NooranScripter

====>My Server Info  < ========
ServerName :- CID-Server
Server Clan :- [D.R] Dakriders
Server Forum :- www.CidServer.tk
Clan Forum :-www.Drgang.tk
=====> DarkRiders Group <=====

Pm Me If U want To be Pro In Scripting !
Those Who Banned my Ip and My Freind's Ip They Are Big Fuckers...!

Offline jimmy

  • Wiseguy
  • **
  • Posts: 94
    • View Profile
Re: Help?With Slap Command?
« Reply #10 on: February 15, 2012, 02:10:16 pm »
Guys but in my Scripts it compile u can come and see
Storm City Owner

Stormcity.smfnew.com

Offline Innocent Heart

  • Wiseguy
  • **
  • Posts: 51
  • Crime Investigation Department Owner
    • View Profile
    • Crime Investigaton Department
Re: Help?With Slap Command?
« Reply #11 on: February 15, 2012, 03:34:15 pm »
Guys but in my Scripts it compile u can come and see
Hmmmm oK yes i Also Check your Command your Cmd is working in my script .. But in Ankit is Not Wokring :-/
Conatact Information :
Facebook:-www.facebook.com/dashingjaff
Youtube:-www.youtube.com/NooranScripter

====>My Server Info  < ========
ServerName :- CID-Server
Server Clan :- [D.R] Dakriders
Server Forum :- www.CidServer.tk
Clan Forum :-www.Drgang.tk
=====> DarkRiders Group <=====

Pm Me If U want To be Pro In Scripting !
Those Who Banned my Ip and My Freind's Ip They Are Big Fuckers...!

Offline jimmy

  • Wiseguy
  • **
  • Posts: 94
    • View Profile
Re: Help?With Slap Command?
« Reply #12 on: February 15, 2012, 03:46:37 pm »
lol this is Ankit problem not us  ;)
Storm City Owner

Stormcity.smfnew.com

Offline RasikhQadeer

  • Street Thug
  • *
  • Posts: 49
  • Hero_Great! The Great Scripter!
    • View Profile
Re: Help?With Slap Command?
« Reply #13 on: February 15, 2012, 04:07:24 pm »
Anyway take this!

[pawn]}
   else if ( strcmp( cmd, "slap", true ) == 0 )
   {
      new reason[ 256 ], plr, szMsg[ 128 ];
      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 ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c slap [Nick/ID] [Reason]" );
        else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
      else
      {
          new Float:x, Float:y, Float:z;
          GetPlayerPos( plr, x, y, z );
         SetPlayerPos( plr, x+3, y+3, z+3, 0, 0 );
         format( szMsg, sizeof( szMsg ), "Admin %s slaped player:[ %s ] Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +6 ] );
         SendClientMessageToAll( COLOR_GREEN, szMsg );
         SetPlayerDrunk(playerid, 300, 300);
      }
      return 1;[/pawn]

Offline Innocent Heart

  • Wiseguy
  • **
  • Posts: 51
  • Crime Investigation Department Owner
    • View Profile
    • Crime Investigaton Department
Re: Help?With Slap Command?
« Reply #14 on: February 15, 2012, 06:05:27 pm »
Anyway take this!

[pawn]}
   else if ( strcmp( cmd, "slap", true ) == 0 )
   {
      new reason[ 256 ], plr, szMsg[ 128 ];
      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 ( !IsAuthorized( playerid, cmd ) ) SendClientMessage( playerid, COLOR_RED, "You don't have access to use this command!" );
      else if ( !strlen(reason) ) SendClientMessage( playerid, COLOR_RED, "USAGE: /c slap [Nick/ID] [Reason]" );
        else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
      else
      {
          new Float:x, Float:y, Float:z;
          GetPlayerPos( plr, x, y, z );
         SetPlayerPos( plr, x+3, y+3, z+3, 0, 0 );
         format( szMsg, sizeof( szMsg ), "Admin %s slaped player:[ %s ] Reason:[ %s ]", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +6 ] );
         SendClientMessageToAll( COLOR_GREEN, szMsg );
         SetPlayerDrunk(playerid, 300, 300);
      }
      return 1;[/pawn]
Nice Work.!
Conatact Information :
Facebook:-www.facebook.com/dashingjaff
Youtube:-www.youtube.com/NooranScripter

====>My Server Info  < ========
ServerName :- CID-Server
Server Clan :- [D.R] Dakriders
Server Forum :- www.CidServer.tk
Clan Forum :-www.Drgang.tk
=====> DarkRiders Group <=====

Pm Me If U want To be Pro In Scripting !
Those Who Banned my Ip and My Freind's Ip They Are Big Fuckers...!