Problem with commands......
#1

My includes
PHP код:
#include <a_samp> 
and this commands dont work.....
PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/help"true))
    {
        
SendClientMessage(playerid, -1"Hello i'm ADMIN! And this WORLD IS MINE! And if you want to play here, you need to follow the rules!");
        
SendClientMessage(playerid, -1"If you want to see rules go to the forum server and you will find it!");
        
SendClientMessage(playerid, -1"To see forum link type in the console /foruminfo !!!");
        
SendClientMessage(playerid, -1"If you want to talk with ME type /contacttoadmin");
        return 
1;
    }
    
    if(!
strcmp(cmdtext"/foruminfo"true))
    {
        
SendClientMessage(playerid, -1"Okay here is the link - http://gangwars-roleplay.bulgarianforum.net/");
        return 
1;
    }
    
    if(!
strcmp(cmdtext"/contacttoadmin"true))
    {
        
SendClientMessage(playerid, -1"Skype: mactavish3241");
        return 
1;
    }
    return 
0;

Reply
#2

There's a mistake I may see but just wait for a experienced to tell you.
Reply
#3

Okay
Reply
#4

Try this.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/help", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, -1, "Hello i'm ADMIN! And this WORLD IS MINE! And if you want to play here, you need to follow the rules!");
        SendClientMessage(playerid, -1, "If you want to see rules go to the forum server and you will find it!");
        SendClientMessage(playerid, -1, "To see forum link type in the console /foruminfo !!!");
        SendClientMessage(playerid, -1, "If you want to talk with ME type /contacttoadmin");
        return 1;
    }
     
    if(strcmp("/foruminfo", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, -1, "Okay here is the link - http://gangwars-roleplay.bulgarianforum.net/");
        return 1;
    }
     
    if(strcmp("/contacttoadmin", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, -1, "Skype: mactavish3241");
        return 1;
    }
    return 0;
}
Reply
#5

You must length of the characters to be matched.
Reply
#6

Length is optional. The code is correct.

Do you have filterscripts or gamemodes that return 1 in OnPlayerCommandText?
Reply
#7

Is this a filterscript or gamemode?
Reply
#8

Write ...... This is not work too..
Reply
#9

Why didn't you answer Threshold's question?

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Length is optional. The code is correct.

Do you have filterscripts or gamemodes that return 1 in OnPlayerCommandText?
Reply
#10

Ohh aaa i think no only this commands is under oneplayercommand
PHP код:
Originally Posted by Threshold  View Post
Length is optional
The code is correct.
Do 
you have filterscripts or gamemodes that return 1 in OnPlayerCommandText
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)