11.06.2010, 05:50
Hi, I have been trying to figure out this problem I currently have.
The problem here is that the server doesn't recognize the filterscript, whenever I type /incinerate it says "Server: Unknown Command". I already logged-in as a rcon admin but still doesn't work. I could really use some help over here fellas.
Code:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#if defined FILTERSCRIPT
#define ORANGE 0xF97804FF
#define RED 0xE60000FF
#define YELLOW 0xFFFF00FF
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define invalidcmd SendClientMessage(playerid,RED,"Invalid Command, Use /commands to see all commands");
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Script Loaded");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Test");
print("----------------------------------\n");
}
#endif
public OnGameModeExit()
{
print("\n--------------------------------------");
print(" Incinirate");
print("--------------------------------------\n");
return 1;
}
CMD:incinerate(playerid,params[])
{
new id, string[128], aname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
if(IsPlayerAdmin(playerid)) return invalidcmd
if(sscanf(params,"u",id)) return SendClientMessage(playerid,ORANGE,"Usage: /incinerate [id]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,RED,"invalid user");
ApplyAnimation(playerid, "shop", "ROB_Loop_Threat", 6.0, 0, 0, 0, 0, 0);
new Float:x, Float:y, Float:z;
GetPlayerPos(id,x,y,z);
CreateExplosion(x,y,z,12,1);
GetPlayerName(playerid,aname,sizeof(aname));
GetPlayerName(id,pname,sizeof(pname));
format(string,sizeof(string),"%s(%d) exploded %s(%d)",aname,playerid,pname,id);
SendClientMessage(playerid,RED,string);
return 1;
}

