SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 20/01/2013, 10:42 AM   #1
Sellize
Gangsta
 
Sellize's Avatar
 
Join Date: Jan 2013
Location: (ง ͠° ͟ل͜ ͡°)ง fight me irl
Posts: 709
Reputation: 293
Default Unknown command with ZCMD

What am i doing wrong here? It keeps saying unknown command when im using /mute

http://pastebin.com/Hq93waQc
__________________
dead
Sellize is offline   Reply With Quote
Old 20/01/2013, 10:47 AM   #2
zde5
Little Clucker
 
Join Date: Jul 2009
Location: Croatia
Posts: 48
Reputation: 4
Default Re: Unknown command with ZCMD

Code:
COMMAND:mute(playerid, params[])
{
        if(IsPlayerAdmin(playerid))
	{
		//place your mute code here
	}
	else SendClientMessage(playerid, COLOR_RED, "You can not use this command!");
        return 1;// if you return 0 you will get "unknown command" text
}
zde5 is offline   Reply With Quote
Old 20/01/2013, 10:54 AM   #3
Devilxz97
Gangsta
 
Devilxz97's Avatar
 
Join Date: Dec 2011
Location: Malaysia
Posts: 748
Reputation: 37
Default Re: Unknown command with ZCMD

pawn Code:
CMD:mute(playerid, params[])
{
    new id;
    new reason[128];
    new str[256];
    new AdminName[MAX_PLAYER_NAME];
    new Target[MAX_PLAYER_NAME];
    if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "You aren't authorized to use this command!");
    if(sscanf(params, "us[128]", id, reason)) return SendClientMessage(playerid, grey, "Usage:/mute (playerid/partofname) (reason)");
    else if(id == INVALID_PLAYER_ID) SendClientMessage(playerid, lightred, "[{B4B5B7}System{FF6347}]: {B4B5B7}Player not found!");
    else
    {
        GetPlayerName(playerid, AdminName, sizeof(AdminName));
        GetPlayerName(id, Target, sizeof(Target));
        format(str, sizeof(str), "[{B4B5B7}Admin{FF6347}]{B4B5B7}'%s has muted {FF6347}[{B4B5B7}Player{FF6347}]{B4B5B7}'%s. {FF6347}Reason; {B4B5B7}%s .", AdminName, Target, reason);
        SendClientMessageToAll(lightred, str);
        PlayerInfo[id][isMuted] = 1;
    }
     return 1;
}

pawn Code:
public OnPlayerText(playerid, text[])
{
    if(PlayerInfo[playerid][isMuted] >= 1)
    {
        SendClientMessage(playerid, lightred, "[INFO]: {B4B5B7}You were muted by an Admin!");
        return 0;
    }
    return 1;
}

pawn Code:
enum pInfo
{
    isMuted,
    isJailed
}
new PlayerInfo[MAX_PLAYERS][pInfo];
__________________


- Skype Name: ejam.blacklistcrew -
- ******** Acc: http://www.********.com/DevConnection -

Selling Gamemode [DRIFT/FREEROAM/ROLEPLAY] for $9.99
Devilxz97 is offline   Reply With Quote
Reply

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
zcmd, unknown command? niels44 Scripting Help 7 23/10/2012 04:04 PM
zcmd - unknown command Frapsy Русский/Russian 5 28/02/2012 01:53 PM
zcmd - unknown command Frapsy Scripting Help 2 28/02/2012 11:46 AM
Help with a zcmd command(Unknown) ServerScripter Scripting Help 6 04/02/2012 03:23 PM
Executed ZCMD command returns SERVER: Unknown Command SexTourist Scripting Help 12 03/01/2012 03:38 PM


All times are GMT. The time now is 04:51 AM.


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