Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- #include <a_samp>
- #include <sscanf>
- #define FILTERSCRIPT
- #define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- forward SaveToLog(filename[],text[]);
- public OnGameModeInit()
- {
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- dcmd(addlabel,8,cmdtext);
- return 0;
- }
- dcmd_addlabel(playerid,params[])
- {
- new label,Float: X, Float: Y, Float: Z,text[100],distance;
- GetPlayerPos(playerid, X,Y,Z);
- if(sscanf(params,"sd",text)) return SendClientMessage(playerid,0xFB9204FF,"USAGE: /addlabel [text][distance]");
- label = Create3DTextLabel(text,0x03B8FCFF,X,Y,Z,distance,GetPlayerVirtualWorld(playerid));
- SaveToLog("labels",label);
- return 1;
- }
- public SaveToLog(filename[],text[])
- {
- new File:ffile;
- new filepath[128];
- new string[128];
- format(filepath,sizeof(filepath),"%s.txt",filename);
- ffile = fopen(filepath,io_append);
- format(string,sizeof(string)," %s\r\n",text);
- fwrite(ffile,string);
- fclose(ffile);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement