OnPlayerCommandText don't work. -
Hirsw0w - 22.07.2014
Help me! OnPlayerCommandText don't work on GameModeInit...
see what i did i have main only, OnGameModeInit and OnPlayerCommandText
and that don't do nothing@!!!
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
printf("commandtext");
return 1;
}
please help me ty.
Re: OnPlayerCommandText don't work. -
Segura - 22.07.2014
what did you expected to happen?
Re: OnPlayerCommandText don't work. -
driftpower - 22.07.2014
did you make anything else at all?
Re: OnPlayerCommandText don't work. -
Hirsw0w - 22.07.2014
Quote:
Originally Posted by Segura
what did you expected to happen?
|
i try more things like give jetpack or just write message to player but nothing that not return anything...
Quote:
Originally Posted by driftpower
did you make anything else at all?
|
no. that all what write in ther..
Re : OnPlayerCommandText don't work. -
S4t3K - 22.07.2014
@****** : But if those includes (y_commands and ZCMD for example) use hooking, it's to allow the scripter to use the callback again in his code without expecting any error, isn't it the case ?
Re: OnPlayerCommandText don't work. -
Hirsw0w - 22.07.2014
Quote:
Originally Posted by ******
Do you have any includes? Several, such as y_commands and ZCMD, replace OnPlayerCommandText.
|
In my code I use only a_samp and in other include I don't know to use and don't want to.
someone know what the problem.
that all my code
Код:
#include <a_samp>
main()
{
print("\n----------------------------------");
print(" ------");
print("----------------------------------\n");
}
public OnGameModeInit()
{
SetGameModeText("Map");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
printf("commandtext");
return 1;
}
Re : OnPlayerCommandText don't work. -
S4t3K - 22.07.2014
You never call "OnplayerCommandText", so how would you expect something from the callback if it's never called ?
Two ways :
• Type a random command InGame and you'll see the message
• Use CallLocalFunction under the "main" (passing a random command and 0 as playerid)
Re: Re : OnPlayerCommandText don't work. -
Hirsw0w - 22.07.2014
Quote:
Originally Posted by S4t3K
You never call "OnplayerCommandText", so how would you expect something from the callback if it's never called ?
Two ways :
• Type a random command InGame and you'll see the message
• Use CallLocalFunction under the "main" (passing a random command and 0 as playerid)
|
see what I posted right now i call him that need to be called alone...
Re : OnPlayerCommandText don't work. -
S4t3K - 22.07.2014
Quote:
Originally Posted by S4t3K
You never call "OnplayerCommandText", so how would you expect something from the callback if it's never called ?
Two ways :
• Type a random command InGame and you'll see the message
• Use CallLocalFunction under the "main" (passing a random command and 0 as playerid)
|
Use either of the solutions I gave you.
Re: Re : OnPlayerCommandText don't work. -
Hirsw0w - 22.07.2014
Quote:
Originally Posted by S4t3K
Use either of the solutions I gave you.
|
I check it! that the bug all work but this don't OnPlayerText work,
OnPlayerCommandText don't! that a little wired