21.01.2017, 18:18
(
Последний раз редактировалось Triggerz; 22.01.2017 в 23:11.
)
Never mind, I fixed it myself. I forgot to add something.
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/vehicle", true)) { //Your stuff return 1; // Returning 1 informs the server that the command has been processed. // OnPlayerCommandText won't be called in other scripts. } return 0; //<!--- This is what you are missing. // Returning 0 informs the server that the command hasn't been processed by this script. // OnPlayerCommandText will be called in other scripts until one returns 1. // If no scripts return 1, the 'SERVER: Unknown Command' message will be shown to the player. }
GameTextForPlayer(playerid, "Text", 5000, 2);
Line 623, the error says it all. OnPlayerCommandText is supposed to return a value.
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/vehicle", true)) { //Your stuff return 1; // Returning 1 informs the server that the command has been processed. // OnPlayerCommandText won't be called in other scripts. } return 0; //<!--- This is what you are missing. // Returning 0 informs the server that the command hasn't been processed by this script. // OnPlayerCommandText will be called in other scripts until one returns 1. // If no scripts return 1, the 'SERVER: Unknown Command' message will be shown to the player. } Line 637: GameTextForPlayer has more arguments than just two. Код:
GameTextForPlayer(playerid, "Text", 5000, 2); |