Wrong Commands
#1

Hello i have downloaded a gamemode but when i write any wrong command it do nothing so i want something like :-
if the player write a wrong command like :
/ghwkjf
Server Send :
Wrong command blablabla
How can i do it
Reply
#2

What command processor are you using?
Reply
#3

Quote:
Originally Posted by _Jake_
Посмотреть сообщение
What command processor are you using?
Sorry i am beginner what do you mean
Reply
#4

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
Sorry i am beginner what do you mean
Show us one of your command. (Any)
Reply
#5

Quote:
Originally Posted by nezo2001
Посмотреть сообщение
Sorry i am beginner what do you mean
He's asking if you're using YCMD, ZCMD, OnPlayerCommand etcetera.
Reply
#6

Quote:
Originally Posted by Bingo
Посмотреть сообщение
Show us one of your command. (Any)
Quote:
Originally Posted by OsteeN
Посмотреть сообщение
He's asking if you're using YCMD, ZCMD, OnPlayerCommand etcetera.
Lemme, expend your words.

Open your game mode file which is located in "gamemodes" folder and then look at the first few lines where written "#include" and look for "zcmd" or "y_commands" if both do not present then click CTRL + F and type dcmd, if neither exist, then go to the callback named "OnPlayerCommandText" and look for strcmp, if it present then you're processing commands using strcmp.
Reply
#7

i am using zcmd

and here is one from commands
PHP код:
command(meplayeridparams[]) {
    new
        
string[128]; // Updated this as I forgot about the whole params usage at the time of originally creating this.... but seeing as how noobs constantly rip this command I might as well give them some good code to rip from! (yes I'm talking about you, RealCop228 and all the others)
    
if(isnull(params)) {
        return 
SendClientMessage(playeridWHITE"SYNTAX: /me [action]");
    }
    else {
        if(
Player[playerid][PrisonID] == 1) {
            
SendClientMessage(playeridWHITE"You're unable to do this right now!");
        }
        else {
            
format(stringsizeof(string), "* %s %s"GetName(playerid), params);
            
NearByMessage(playeridNICESKYstring);
            
            
Player[playerid][MeActions]++;
            switch(
Player[playerid][MeActions]) {
                case 
100: {
                    
SendClientMessage(playeridWHITE"You have unlocked a new achievement!");
                    
SendClientMessage(playeridGREY"You have executed 100 /me actions.");
                    
Player[playerid][AchievementRank]++;
                }
                case 
200: {
                    
SendClientMessage(playeridWHITE"You have unlocked a new achievement!");
                    
SendClientMessage(playeridGREY"You have executed 200 /me actions.");
                    
Player[playerid][AchievementRank]++;
                }
            }
        }
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)