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
- //#define FILTERSCRIPT
- #include <a_samp>
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Blank Filterscript by your name here");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Tank Wars");
- print("----------------------------------\n");
- }
- new Cooldown[MAX_PLAYERS];
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- //colors
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_LIME 0x10F441AA
- #define COLOR_MAGENTA 0xFF00FFFF
- #define COLOR_NAVY 0x000080AA
- #define COLOR_AQUA 0xF0F8FFAA
- #define COLOR_CRIMSON 0xDC143CAA
- #define COLOR_FLBLUE 0x6495EDAA
- #define COLOR_BISQUE 0xFFE4C4AA
- #define COLOR_BLACK 0x000000AA
- #define COLOR_CHARTREUSE 0x7FFF00AA
- #define COLOR_BROWN 0XA52A2AAA
- #define COLOR_CORAL 0xFF7F50AA
- #define COLOR_GOLD 0xB8860BAA
- #define COLOR_GREENYELLOW 0xADFF2FAA
- #define COLOR_INDIGO 0x4B00B0AA
- #define COLOR_IVORY 0xFFFF82AA
- #define COLOR_LAWNGREEN 0x7CFC00AA
- #define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
- #define COLOR_MIDNIGHTBLUE 0X191970AA
- #define COLOR_MAROON 0x800000AA
- #define COLOR_OLIVE 0x808000AA
- #define COLOR_ORANGERED 0xFF4500AA
- #define COLOR_PINK 0xFFC0CBAA // - Light light pink
- #define COLOR_SEAGREEN 0x2E8B57AA
- #define COLOR_SPRINGGREEN 0x00FF7FAA
- #define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
- #define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
- #define COLOR_MEDIUMAQUA 0x83BFBFAA
- #define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
- #endif
- public OnGameModeInit()
- {
- // Don't use these lines if it's a filterscript
- SetGameModeText("TW 1.0");
- AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- SetTimer("CooldownTimer",1000,true);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
- SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- if(strfind(name, "fuck", true) != -1 || strfind(name, "bitch", true) != -1 || strfind(name, "whore", true) != -1)
- {
- Kick(playerid);
- }
- Cooldown[playerid] = 0;
- 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)
- {
- new sVehicle;
- DestroyVehicle(sVehicle);
- return 1;
- }
- /*
- stock replaceSwear(string[], badWord[], replace = '*')
- {
- new
- i
- ;
- while((i = strfind(string, badWord, true)) != -1)
- {
- for(new x = (i + strlen(badWord)); i != x; ++i)
- {
- string[i] = replace;
- }
- }
- return 1;
- }
- */
- public OnPlayerText(playerid, text[])
- {
- /*
- new
- badWords[][] =
- {
- "bitch",
- "ass",
- "fuck",
- "shit",
- "crap",
- "noob",
- "fucking",
- "cum",
- "jew",
- "nigga",
- "nigger",
- "negro",
- "chongo",
- "cunt",
- "pussy",
- "dick",
- "cock",
- "wanker",
- "whore",
- "gay",
- "asshole",
- "tit"
- }
- ;
- for(new i; i != sizeof(badWords); ++i)
- {
- replaceSwear(text, badWords[i]);
- }
- GivePlayerMoney(playerid, -1);
- SendClientMessage(playerid, COLOR_RED, "<!>Everytime you swear you will loose something!");
- return 0;
- */
- return 0;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/kill", cmdtext, true, 10) == 0)
- {
- if(Cooldown[playerid]) return SendClientMessage(playerid,COLOR_RED,"<!>Please Wait Before Using This Command Again!");
- {
- SetPlayerHealth(playerid, 0);
- SendClientMessage(playerid, COLOR_RED, "<!>You have just killed yourself, and lost 50$!");
- new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "<!>%s have just used command /kill!", name);
- SendClientMessageToAll(COLOR_WHITE, string);
- GivePlayerMoney(playerid, -50);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- }
- if (strcmp("/signal", cmdtext, true) == 0 || strcmp("/s", cmdtext, true) == 0)
- {
- if(Cooldown[playerid]) return SendClientMessage(playerid,COLOR_RED,"<!>Please Wait Before Using This Command Again!");
- {
- new Float:x, Float:y, Float:z, SignalObj;
- GetPlayerPos(playerid, x, y, z);
- SetTimerEx( "Signal", 5000, false, "i", SignalObj );
- SignalObj = CreateObject(18714,x,y,z, 0.0, 0.0, 96.0);
- GameTextForPlayer(playerid, "Signal started", 1, 1);
- SendClientMessage(playerid, COLOR_BLUE, "<!>You can also press 'Crouch' button to activate this!");
- }
- return 1;
- }
- if (strcmp("/help", cmdtext, true) == 0 || strcmp("/h", cmdtext, true) == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, "|----------------------------------------------------------------|");
- SendClientMessage(playerid, COLOR_BLUE, "|<!> Commands: /(s)ignal, /kill, /(h)elp");
- SendClientMessage(playerid, COLOR_WHITE, "|----------------------------------------------------------------|");
- return 1;
- }
- return 0;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (PRESSED(KEY_CROUCH))
- {
- if(Cooldown[playerid]) return SendClientMessage(playerid,COLOR_RED,"<!>Please Wait Before Using This Command Again!");
- {
- new Float:x, Float:y, Float:z, SignalObj;
- GetPlayerPos(playerid, x, y, z);
- SetTimerEx( "Signal", 5000, false, "i", SignalObj );
- SignalObj = CreateObject(18714,x,y,z, 0.0, 0.0, 96.0);
- GameTextForPlayer(playerid, "Signal started", 1, 1);
- }
- return 1;
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- forward CooldownTimer();
- forward Signal( objectid );
- public Signal( objectid )
- {
- DestroyObject( objectid );
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement