want to change something...
#1

i have a question,
when i type a command that there isnt in my server then it says SERVER: Unknown command... but how to change this to EDC_BOT: I dont know this command...
becuz i want that one XD
niels
Reply
#2

For Strcmp:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return SendClientMessage(playerid, COLOR, "EDC_BOT: I dont know this command...");
}
For ZCMD:
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(success == 0)
        return SendClientMessage(playerid, COLOR, "EDC_BOT: I dont know this command...");
}
Reply
#3

it gives this error...
Код:
C:\my own drifting gamemode\gamemodes\NYD_Drifting1.pwn(3855) : warning 209: function "OnPlayerCommandPerformed" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#4

wait problem fixed
Reply
#5

Hmm, try this
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(success == 0) {
        SendClientMessage(playerid, COLOR, "EDC_BOT: I dont know this command...");
    }
    return 1;
}
Edit: Oh, okay!
Reply
#6

but how to make it that it says: in green: EDC_BOT: in blue: I dont know this command...? how to make that?
Reply
#7

Change the colors to these you want.
pawn Код:
// At The Top
#define BLUE 0x0000BBAA
#define GREEN 0x33AA33AA

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(success == 0) {
        SendClientMessage(playerid, GREEN, "EDC_BOT: {0000BB}I dont know this command...");
    }
    return 1;
}
Reply
#8

thnx bro
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)