24.11.2009, 11:08
This is my FS:
It compiled away the game but it says that the SERVER: UNKNOW CODE .
I USE TRANSLATOR -.-
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> #if defined FILTERSCRIPT public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !"); return 1; } if ((noooc) && PlayerInfo[playerid][pAdmin] < 1) { SendClientMessage(playerid, COLOR_GRAD2, " The OOC channel has been disabled by an Admin !"); return 1; } if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, " You can't speak, you have been silenced !"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]"); return 1; } format(string, sizeof(string), "(( %s: %s ))", sendername, result); OOCOff(COLOR_OOC,string); printf("%s", string); } return 1; } if(strcmp(cmd, "/noooc", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] >= 3 && (!noooc)) { noooc = 1; BroadCast(COLOR_GRAD2, " OOC chat channel disabled by an Admin !"); } else if (PlayerInfo[playerid][pAdmin] >= 3 && (noooc)) { noooc = 0; BroadCast(COLOR_GRAD2, " OOC chat channel enabled by an Admin !"); } else { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); } } return 1; } if(strcmp(cmd, "/speedo", true) == 0) { if(IsPlayerConnected(playerid)) { if (gSpeedo[playerid] == 1) { gSpeedo[playerid] = 2; GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~on", 5000, 5); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); } else if (gSpeedo[playerid] == 2) { gSpeedo[playerid] = 1; GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~off", 5000, 5); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); } else { SendClientMessage(playerid, COLOR_GRAD1, "you dont have a speedometer"); } } return 1; } if(strcmp(cmd, "/fuel", true) == 0) { if(IsPlayerConnected(playerid)) { if (gGas[playerid] == 0) { gGas[playerid] = 1; GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~g~Fuel Info on", 5000, 5); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); } else if (gGas[playerid] == 1) { gGas[playerid] = 0; GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~Fuel Info off", 5000, 5); PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0); } } return 1; } return 0; } #endif
I USE TRANSLATOR -.-