21.03.2009, 07:42
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
*Below functions are in OnPlayerCommandText
-strtok in OnPlayerCommandText
-Some basic commands(sendclientmessage,sendclientmessagetoall, etc.)
-function of committing suiside:
-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
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; }
-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; }
-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