SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 10/05/2008, 04:37 PM   #1
McDonald
Little Clucker
 
Join Date: May 2008
Posts: 2
Reputation: 0
Default /ban /kick /teletransport

I'm noob at this... well... here's my question...

I'm doing a server, and i need /kick /ban cmds, so I searched in wikisamp and I found that

Quote:
Originally Posted by WIKISAMP
public OnPlayerCommandText( playerid, cmdtext[] )
{
if( strcmp( cmdtext, "/banme", true ) == 0 )
{
// Ban the player who offers this command.
Ban( playerid );
return 1;
}
}
but it bans myself.... What can I do??

thx for your attention,
McDonald
McDonald is offline  
Old 10/05/2008, 04:38 PM   #2
Mr.Lennart
Little Clucker
 
Join Date: Jun 2007
Posts: 38
Reputation: 0
Default Re: /ban /kick /teletransport

Quote:
Originally Posted by McDonald
I'm noob at this... well... here's my question...

I'm doing a server, and i need /kick /ban cmds, so I searched in wikisamp and I found that

Quote:
Originally Posted by WIKISAMP
public OnPlayerCommandText( playerid, cmdtext[] )
{
if( strcmp( cmdtext, "/banme", true ) == 0 )
{
// Ban the player who offers this command.
Ban( playerid );
return 1;
}
}
but it bans myself.... What can I do??

thx for your attention,
McDonald
Lol, it looks like you want to ban your self /banME
Mr.Lennart is offline  
Old 10/05/2008, 04:44 PM   #3
Zh3r0
High-roller
 
Join Date: Mar 2008
Posts: 4,513
Reputation: 398
Default Re: /ban /kick /teletransport

Quote:
Originally Posted by MrLennart`
Quote:
Originally Posted by McDonald
I'm noob at this... well... here's my question...

I'm doing a server, and i need /kick /ban cmds, so I searched in wikisamp and I found that

Quote:
Originally Posted by WIKISAMP
public OnPlayerCommandText( playerid, cmdtext[] )
{
if( strcmp( cmdtext, "/banme", true ) == 0 )
{
// Ban the player who offers this command.
Ban( playerid );
return 1;
}
}
but it bans myself.... What can I do??

thx for your attention,
McDonald
Lol, it looks like you want to ban your self /banME
SPAM!
@ McDonald i want a Double hamburger (Joke).: Try to find Adnre's Admi filterscript it has the commands /kick and /ban
Nice! ya,
__________________
Zh3r0 is offline  
Old 10/05/2008, 05:24 PM   #4
McDonald
Little Clucker
 
Join Date: May 2008
Posts: 2
Reputation: 0
Default Re: /ban /kick /teletransport

lol, it was on wiki samp!!!

Lol, i tried to search, nbut i couldn't find anything ...
McDonald is offline  
Old 11/06/2008, 04:15 PM   #5
Rykker
Little Clucker
 
Join Date: Jun 2008
Posts: 14
Reputation: 0
Default Re: /ban /kick /teletransport

Quote:
Originally Posted by ♫ -Źḥ€яʘ- ♫
Quote:
Originally Posted by MrLennart`
Quote:
Originally Posted by McDonald
I'm noob at this... well... here's my question...

I'm doing a server, and i need /kick /ban cmds, so I searched in wikisamp and I found that

Quote:
Originally Posted by WIKISAMP
public OnPlayerCommandText( playerid, cmdtext[] )
{
if( strcmp( cmdtext, "/banme", true ) == 0 )
{
// Ban the player who offers this command.
Ban( playerid );
return 1;
}
}
but it bans myself.... What can I do??

thx for your attention,
McDonald
Lol, it looks like you want to ban your self /banME
SPAM!
@ McDonald i want a Double hamburger (Joke).: Try to find Adnre's Admi filterscript it has the commands /kick and /ban
Nice! ya,
LOL its Andre's Admin
Rykker is offline  
Old 11/06/2008, 04:41 PM   #6
viper_viper
Little Clucker
 
Join Date: Feb 2008
Posts: 35
Reputation: 2
Default Re: /ban /kick /teletransport

/banme would seem that its bans themself but here is answer to your problem.

hope this helps

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
  new giveplayerid;

  if( strcmp( cmdtext, "/ban", true ) == 0 )
  {
   Ban(giveplayerid);
   return 1;
   }
   return 0;
}
viper_viper is offline  
Old 11/06/2008, 04:44 PM   #7
Toad
Big Clucker
 
Join Date: Apr 2008
Posts: 60
Reputation: 0
Default Re: /ban /kick /teletransport

this bans id 0
Toad is offline  
Old 11/06/2008, 04:46 PM   #8
cedryk_cedryk
Little Clucker
 
Join Date: Nov 2007
Posts: 45
Reputation: 0
Default Re: /ban /kick /teletransport

i would like a coke...a big mac...some fries...and some fukin soda! ... hmm ..look for otherz admins FS... is easier :P
cedryk_cedryk is offline  
Old 11/06/2008, 04:57 PM   #9
Backwardsman97
High-roller
 
Backwardsman97's Avatar
 
Join Date: Nov 2007
Posts: 1,501
Reputation: 36
Default Re: /ban /kick /teletransport

Quote:
Originally Posted by viper_viper
/banme would seem that its bans themself but here is answer to your problem.

hope this helps

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
  new giveplayerid;

  if( strcmp( cmdtext, "/ban", true ) == 0 )
  {
   Ban(giveplayerid);
   return 1;
   }
   return 0;
}
lol....

http://pastebin.com/m27605517

This should work. It's kind of big only because it requires strtok and IsNumeric but if you already have those then you can cut most of this out.
Backwardsman97 is offline  
Old 11/06/2008, 04:59 PM   #10
LarzI
High-roller
 
LarzI's Avatar
 
Join Date: Apr 2007
Location: Norway
Posts: 2,628
Reputation: 136
Default Re: /ban /kick /teletransport

Or just make it using dcmd, much smaller, and faster (check the wiki for more information)...

http://pawn.pastebin.com/m2489de63
__________________


NEW: [FS] Simple Cellphones

if( strfind( title, "REP", true ) != -1 )
{________________________________________
Sigh();__________________________
}________________________________________


LarzI is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/kick cmd Ihsan_Cingisiz Help Archive 5 30/05/2010 07:30 PM
How to kick someone out of car... Steven82 Help Archive 3 17/03/2010 01:10 AM
[Kick by name?] Help devteamsnDOTcom Help Archive 2 16/12/2009 06:04 PM
[HELP]Can't use /kick or /ban. [GWE]Ghost_Rider Help Archive 3 18/11/2009 02:08 PM
/kick Ironboy500 Help Archive 6 17/10/2009 12:58 PM


All times are GMT. The time now is 07:12 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.