OnPlayerCommandText
#1

I use this
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    
//dcmd//
    //Civilian commands//
    
dcmd(gcmds,5,cmdtext); //General Commands
    
dcmd(cmds,4,cmdtext);
    
dcmd(rules,5,cmdtext);
    }
    return 
SendClientMessage(playerid,COLOR_RED,"This is a wrong command , Read /cmds and /gcmds");

But i got those errors
PHP код:
C:\Users\user\Desktop\SFCRRPGv1.1\Los Santos TDM\gamemodes\new.pwn(249) : error 017undefined symbol "dcmd_gcmds"
C:\Users\user\Desktop\SFCRRPGv1.1\Los Santos TDM\gamemodes\new.pwn(251) : error 017undefined symbol "dcmd_rules"
C:\Users\user\Desktop\SFCRRPGv1.1\Los Santos TDM\gamemodes\new.pwn(252) : warning 209: function "OnPlayerCommandText" should return a value
C
:\Users\user\Desktop\SFCRRPGv1.1\Los Santos TDM\gamemodes\new.pwn(254) : error 010invalid function or declaration
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
3 Errors

Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

    //dcmd//
    //Civilian commands//
    dcmd(gcmds,5,cmdtext); //General Commands
    dcmd(cmds,4,cmdtext);
    dcmd(rules,5,cmdtext);

    return SendClientMessage(playerid,COLOR_RED,"This is a wrong command , Read /cmds and /gcmds");
}
Reply
#3

You should add this here:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
Reply
#4

Quote:
Originally Posted by DaRk_RaiN
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

    //dcmd//
    //Civilian commands//
    dcmd(gcmds,5,cmdtext); //General Commands
    dcmd(cmds,4,cmdtext);
    dcmd(rules,5,cmdtext);

    return SendClientMessage(playerid,COLOR_RED,"This is a wrong command , Read /cmds and /gcmds");
}
Thanks it works
@alon4210 .. No Comment
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)