SA-MP Forums

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 31/03/2010, 12:25 AM   #1
Manuel20
Little Clucker
 
Join Date: Jan 2010
Posts: 16
Reputation: 0
Default Kick and Ban have no Reasons

Hello i have this script for kicking an baning allways works but never sea the Reason what is wrong in this script ?

Code:
dcmd_kick(playerid, params[]){
  new string[128], message[64], pID;
  if(IsPlayerAdmin(playerid)){
    if(sscanf(params, "us", pID, message)) return SendClientMessage(playerid, COLOUR_RED, "Command: /kick [ID] [Reason]");
    format(string, sizeof(string), "[Anti-Hack] %s got kicked. Reason: %d", GetName(pID), string);
    SendClientMessageToAll(COLOUR_RED, string);
    Kick(pID);
    }
    else return SendClientMessage(playerid, COLOUR_RED, "* You are not a Admin!");
  return 1;
}

dcmd_ban(playerid, params[]){
  new string[128], message[64], pID;
  if(IsPlayerAdmin(playerid)){
    if(sscanf(params, "us", pID, message)) return SendClientMessage(playerid, COLOUR_RED, "Command: /ban [ID] [Reason]");
    if (!IsPlayerConnected(pID)) return SendClientMessage(playerid,COLOUR_RED,"* No Player found.");
    format(string, sizeof(string), "[Anti-Hack] %s got banned. Reason: %d", GetName(pID), string);
    SendClientMessageToAll(COLOUR_RED, string);
    Ban(pID);
    }
    else return SendClientMessage(playerid, COLOUR_RED, "* You are not a Admin!");
  return 1;
}

Sorry for Wrong posting -.-
Manuel20 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
NPC Timout??????? What can be the reasons for it???? DJ-CJ89 Help Archive 1 13/06/2010 01:53 PM
[Suggestion] Reasons LukeGFX General 8 17/01/2010 10:31 AM
Reasons aren't showing _Vortex Help Archive 9 07/09/2009 11:55 PM
Player disconnect reasons asteroid Help Archive 1 07/09/2009 02:54 PM
LVA problems for odd reasons Turricane Help Archive 7 20/06/2009 11:21 AM


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


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