Cannot use gamemode cmds after loaded fs?
#1

I cannot use the commands of the gamemode after I've loaded a filterscript,
but the other functions such as clocks,bad word filter,etc. works normal.
I've searched for a little but I cannot find similar questions.
The filterscript consists of scripts below(I list most of them):
-#define (colors)
- in-car talking function in OnPlayerText
Код:
if(text[0] == '=') {
	if(IsPlayerInAnyVehicle(playerid)) {
	new vehchat[256];
	new senderName[MAX_PLAYER_NAME];
	new string[256];
	strmid(vehchat,text,1,strlen(text));
	GetPlayerName(playerid, senderName, sizeof(senderName));
	format(string, sizeof(string)," In-car talk %s: %s", senderName, vehchat);
	for(new i = 0; i < MAX_PLAYERS; i++) {
	if (PlayerVehicle(i) == PlayerVehicle(playerid)){
	SendClientMessage(i, LIGHTGREEN, string);
	}
	}
 	}
	return 0;
	}
*Below functions are in OnPlayerCommandText
-strtok in OnPlayerCommandText
-Some basic commands(sendclientmessage,sendclientmessagetoall, etc.)
-function of committing suiside:
Код:
if (strcmp("/kill", cmdtext, true) == 0)
  {
  SetPlayerHealth(playerid, 0);
  new name[MAX_PLAYER_NAME];
  GetPlayerName(playerid, name, sizeof(name));
  printf("%s has committed suicide.",name);
  return 1;
  }
-music player(playing the sounds/musics from gtasa)
-lock/unlock car doors
-finding player id
-clearing chat box


*I use main() function for printing the messages on samp-server.exe,and there is no OnFilterScriptInit/Exit*

Could anyone help me?Thanks

Sorry if there is silimar questions
Reply
#2

look at OnPlayerCommandText, is there a "return 1;" at the end? if so remove it
Reply
#3

Or change it to 0
Reply
#4

Oh, there's really have "return 1;".
Thanks for both of you to solve my problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)