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>
- #include <sscanf2>
- #include <ZCMD>
- #define TERMINATOR 2
- #define HUMAN 1
- #define COLOR_GREY 0xAFAFAFAA
- #define HOLDING(%0) \
- ((newkeys & (%0)) == (%0))
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- #define RELEASED(%0) \
- (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
- new gTeam[MAX_PLAYERS];
- new Jump[MAX_PLAYERS];
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("Terminator Filterscript 1.0");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- #endif
- 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)
- {
- SendClientMessage(playerid, COLOR_GREY, "This is a basic script, only made due to lack of time");
- SendClientMessage(playerid, COLOR_GREY, "and to contribute to the filterscripts, it's quite random though, bare with me");
- }
- 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[])
- {
- return 1;
- }
- COMMAND:setteam(playerid, params[])
- {
- new setrace, target, string[128];
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You're not authorized as an adminstrator, sorry");
- if(sscanf(params, "ud", target, setrace)) return SendClientMessage(playerid, COLOR_GREY, "/setteam [playerid][TEAM]");
- {
- gTeam[playerid] = setrace;
- format(string, sizeof(string), "You've set the following player, %s to be the specified race.", GetName(target));
- SendClientMessage(playerid, COLOR_GREY, string);
- format(string, sizeof(string), "Your team has been set to team %d by %s", setrace,GetName(playerid) );
- SendClientMessage(target, COLOR_GREY, string);
- if(setrace == TERMINATOR)
- {
- SetPlayerSkin(playerid, 123);
- }
- }
- return 1;
- }
- COMMAND:speed(playerid, params[])
- {
- ApplyAnimation(playerid,"PED","sprint_civi",4.1,1,1,1,1,1);
- SendClientMessage(playerid, COLOR_GREY, "Terminator speed has been activated");
- return 1;
- }
- 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(gTeam[playerid] == 2)
- if(PRESSED(KEY_JUMP))
- {
- if((GetTickCount() - Jump[playerid]) < 2000)
- {
- SendClientMessage(playerid, COLOR_GREY, "Please wait before using this command again(( 2 Seconds))");
- return 1;
- }
- Jump[playerid] = GetTickCount();
- {
- new Float: x,Float: y,Float: z;
- GetPlayerVelocity(playerid, x, y, z);
- SetPlayerVelocity(playerid,x + 0.0,y - 0.0 ,z + 0.40);
- }
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerConnected(playerid))
- {
- new Float:Health;
- GetPlayerHealth(playerid,Health);
- if(Health < 100)
- SetPlayerHealth(playerid,Health+10);
- }
- 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;
- }
- stock GetName(playerid)
- {
- new Name[MAX_PLAYER_NAME];
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, Name, sizeof(Name));
- }
- else
- {
- Name = "Disconnected/Nothing";
- }
- return Name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement