// This is a comment // uncomment the line below if you want to write a filterscript //created on 12/1/2013 #define FILTERSCRIPT #include <a_samp> #include <sscanf2> #include <streamer> #include <foreach> #include <zcmd> #if defined FILTERSCRIPT #if !defined isnull #define isnull(%1) \ ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1])))) new eventcp , eventcppickup , Float:eventcpx, Float:eventcpy, Float:eventcpz , eventcpdaset , eventreward , Text3D:eventmtext, eventstart , eventformattext[128]; CMD:createmevent(playerid,params[]) { new Float,Float:y,Float:z , f[128] ,amount; if(sscanf(params,"i",amount)) return SendClientMessage(playerid,-1,"stynx usage /createmevent [price reward(number only)]"); if(eventcpdaset == 1) return SendClientMessage(playerid,-1,"|you already creating the moneybag |"); else { GetPlayerPos(playerid,x,y,z); eventreward = amount; eventcpx = x; eventcpy = y; eventcpz = z; eventcpdaset = 1; format(f,sizeof(f),"you has set mb event at %d,%d,%d || reward : %d",x,y,z,amount); SendClientMessage(playerid,-1,f); } return 1; } CMDtartmevent(playerid,params[]) { new f[128]; if(isnull(params)) return SendClientMessage(playerid,-1,"stynx usage /startmevent [name or words or clue or something nice xD]"); if(eventcpdaset == 0) return SendClientMessage(playerid,-1,"you did't not have create moneybag yet"); if(eventstart == 1) { format(f,128,"%s",eventformattext); SendClientMessageToAll(-1,f); } if(eventstart == 0) { eventcppickup = CreateDynamicPickup(1550,1,eventcpx, eventcpy, eventcpz,-1,-1,-1,100.0); eventcp = CreateDynamicCP(eventcpx, eventcpy, eventcpz,1,-1,-1,-1,1.0); eventmtext = CreateDynamic3DTextLabel("> moneybag <", 0xFF8040FF, eventcpx, eventcpy, eventcpz,3.0); format(f,sizeof(f),"*** MoneyBagEvent(find the hidden moneybag) !!! at %s |reward : %d ***={FF8040}REAL",params,eventreward); eventformattext = f; eventstart = 1; SendClientMessageToAll(-1,f); } return 1; } CMD:cancelmevent(playerid,params[]) { if(eventcpdaset == 1) { eventcpdaset = 0; eventstart = 0; DestroyDynamicPickup(eventcppickup); DestroyDynamicCP(eventcp); DestroyDynamic3DTextLabel(eventmtext); SendClientMessage(playerid,-1,"| kau da cancel event moneybags |"); } else return SendClientMessage(playerid,-1,"you did't not set the any moneybag"); return 1; } public OnPlayerEnterDynamicCP(playerid, checkpointid) { if(checkpointid == eventcp && IsValidDynamicCP(eventcp) && eventcpdaset == 1) { new f[128]; format(f,sizeof(f),"***%s has found the moneybag and won $%d (moneybag event over)***={FF8040}REAL ",GetName(playerid),eventreward); SendClientMessageToAll(-1,f); GivePlayerMoney(playerid,eventreward); eventcpdaset = 0; DestroyDynamicPickup(eventcppickup); DestroyDynamicCP(eventcp); DestroyDynamic3DTextLabel(eventmtext); eventstart = 0; PlaySoundForAll(36205 , 0.0, 0.0, 0.0); return 1; } return 1; } public OnFilterScriptInit() { print("\n--------------------------------------"); print(" mb event jajaja"); print("--------------------------------------\n"); return 1; } public OnFilterScriptExit() { return 1; } //#else main() { } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { return 0; } PlaySoundForAll(soundid, Float, Float:y, Float:z) { foreach(new i : Player) { if (IsPlayerConnected(i)) { PlayerPlaySound(i, soundid, x, y, z); } } } stock GetName(playerid) { new name[24]; GetPlayerName(playerid, name, sizeof(name)); //strreplace(name, '_', ' '; return name; } #endif |
error 001: expected token: "#endif", but found "-end of file-" |
warning 209: function "SSCANF_OnFilterScriptInit" should return a value |
#endif
#define FILTERSCRIPT
#if !defined isnull
#define isnull(%1) \
((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#if !defined isnull
#define isnull(%1) \
((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
#endif
// This is a comment
// uncomment the line below if you want to write a filterscript
//created on 12/1/2013
#define FILTERSCRIPT
#include <a_samp>
#include <sscanf2>
#include <streamer>
#include <foreach>
#include <zcmd>
#if defined FILTERSCRIPT
#if !defined isnull
#define isnull(%1) \
((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
new eventcp ,
eventcppickup ,
Float:eventcpx,
Float:eventcpy,
Float:eventcpz ,
eventcpdaset ,
eventreward ,
Text3D:eventmtext,
eventstart ,
eventformattext[128];
CMD:createmevent(playerid,params[])
{
new Float,Float:y,Float:z , f[128] ,amount;
if(sscanf(params,"i",amount)) return SendClientMessage(playerid,-1,"stynx usage /createmevent [price reward(number only)]");
if(eventcpdaset == 1) return SendClientMessage(playerid,-1,"|you already creating the moneybag |");
else
{
GetPlayerPos(playerid,x,y,z);
eventreward = amount;
eventcpx = x;
eventcpy = y;
eventcpz = z;
eventcpdaset = 1;
format(f,sizeof(f),"you has set mb event at %d,%d,%d || reward : %d",x,y,z,amount);
SendClientMessage(playerid,-1,f);
}
return 1;
}
CMDtartmevent(playerid,params[])
{
new f[128];
if(isnull(params)) return SendClientMessage(playerid,-1,"stynx usage /startmevent [name or words or clue or something nice xD]");
if(eventcpdaset == 0) return SendClientMessage(playerid,-1,"you did't not have create moneybag yet");
if(eventstart == 1)
{
format(f,128,"%s",eventformattext);
SendClientMessageToAll(-1,f);
}
if(eventstart == 0)
{
eventcppickup = CreateDynamicPickup(1550,1,eventcpx, eventcpy, eventcpz,-1,-1,-1,100.0);
eventcp = CreateDynamicCP(eventcpx, eventcpy, eventcpz,1,-1,-1,-1,1.0);
eventmtext = CreateDynamic3DTextLabel("> moneybag <", 0xFF8040FF, eventcpx, eventcpy, eventcpz,3.0);
format(f,sizeof(f),"*** MoneyBagEvent(find the hidden moneybag) !!! at %s |reward : %d ***={FF8040}REAL",params,eventreward);
eventformattext = f;
eventstart = 1;
SendClientMessageToAll(-1,f);
}
return 1;
}
CMD:cancelmevent(playerid,params[])
{
if(eventcpdaset == 1)
{
eventcpdaset = 0;
eventstart = 0;
DestroyDynamicPickup(eventcppickup);
DestroyDynamicCP(eventcp);
DestroyDynamic3DTextLabel(eventmtext);
SendClientMessage(playerid,-1,"| kau da cancel event moneybags |");
}
else return SendClientMessage(playerid,-1,"you did't not set the any moneybag");
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == eventcp && IsValidDynamicCP(eventcp) && eventcpdaset == 1)
{
new f[128];
format(f,sizeof(f),"***%s has found the moneybag and won $%d (moneybag event over)***={FF8040}REAL ",GetName(playerid),eventreward);
SendClientMessageToAll(-1,f);
GivePlayerMoney(playerid,eventreward);
eventcpdaset = 0;
DestroyDynamicPickup(eventcppickup);
DestroyDynamicCP(eventcp);
DestroyDynamic3DTextLabel(eventmtext);
eventstart = 0;
PlaySoundForAll(36205 , 0.0, 0.0, 0.0);
return 1;
}
return 1;
}
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" mb event jajaja");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
//#else
main()
{
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 0;
}
PlaySoundForAll(soundid, Float, Float:y, Float:z)
{
foreach(new i : Player)
{
if (IsPlayerConnected(i))
{
PlayerPlaySound(i, soundid, x, y, z);
}
}
}
stock GetName(playerid)
{
new
name[24];
GetPlayerName(playerid, name, sizeof(name));
//strreplace(name, '_', ' ';
return name;
}
#endif
#endif
#else
#endif