Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <zcmd> // ZeeX
- #include <streamer> // Incognito
- #include <OPSP> // wups
- new TerroristBomb[MAX_PLAYERS];
- new pickupterrorist;
- new LimitTimer;
- forward TimeLimit(playerid);
- public TimeLimit(playerid)
- {
- RemovePlayerAttachedObject(playerid, 5);
- TerroristBomb[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid,0xFF0000AA,"Working time you're done , and you do not finish it.");
- }
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Job Terrorist By Kucin666 Loaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print(" Job Terrorist By Kucin666 Unloaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- TerroristBomb[playerid] = 0;
- pickupterrorist = CreatePickup(1252 , 1, 2657.9956,-1589.4816,13.9864);
- CreateDynamicMapIcon(2657.9956,-1589.4816,13.9864, 43, 0);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- RemovePlayerAttachedObject(playerid, 5);
- TerroristBomb[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- KillTimer(LimitTimer);
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == pickupterrorist)
- {
- GameTextForPlayer(playerid,"Please type /terrorist to work as a terrorist.",3000,1);
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(IsPlayerInAnyVehicle(playerid)) {
- SendClientMessage(playerid,0xFF0000AA,"You must be on foot to put a bomb.");
- return 1;
- }
- else
- if(TerroristBomb[playerid] == 1){
- TerroristBomb[playerid] = 2;
- SetPlayerCheckpoint(playerid,2692.1714,-1708.7668,11.8478,3);
- ClearAnimations(playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(TerroristBomb[playerid] == 2){
- TerroristBomb[playerid] = 3;
- SetPlayerCheckpoint(playerid,2817.4719,-1622.7756,11.0918,3);
- ClearAnimations(playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(TerroristBomb[playerid] == 3){
- TerroristBomb[playerid] = 4;
- SetPlayerCheckpoint(playerid,2852.9338,-1532.5073,11.0938,3);
- ClearAnimations(playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(TerroristBomb[playerid] == 4){
- TerroristBomb[playerid] = 5;
- SetPlayerCheckpoint(playerid,2750.3342,-1468.0583,30.4531,3);
- ClearAnimations(playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(TerroristBomb[playerid] == 5){
- TerroristBomb[playerid] = 6;
- SetPlayerCheckpoint(playerid,2635.1741,-1394.8597,30.4168,3);
- ClearAnimations(playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- return 1;
- }
- if(TerroristBomb[playerid] == 6){
- TerroristBomb[playerid] = 7;
- SetPlayerCheckpoint(playerid,2658.0977,-1591.6510,13.7122,3);
- ClearAnimations(playerid);
- ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
- RemovePlayerAttachedObject(playerid, 5);
- return 1;
- }
- if(TerroristBomb[playerid] == 7){
- TerroristBomb[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid,0xFFFF00AA,"You have completed the job and get 15000$");
- GivePlayerMoney(playerid,15000);
- KillTimer(LimitTimer);
- return 1;
- }
- return 1;
- }
- public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
- {
- if ( Shooter != INVALID_PLAYER_ID && TerroristBomb[Shooter] == 1 || TerroristBomb[Shooter] == 2 || TerroristBomb[Shooter] == 3 || TerroristBomb[Shooter] == 4 || TerroristBomb[Shooter] == 5 || TerroristBomb[Shooter] == 6 || TerroristBomb[Shooter] == 7 )
- {
- new Float:hp, Float:armour;
- GetPlayerHealth(Target, hp);
- GetPlayerArmour(Target, armour);
- SetPlayerArmour(Target, armour + ArmourLost);
- SetPlayerHealth(Target, hp + HealthLost);
- GameTextForPlayer(Shooter,"you are at work and unable to attack other players!",3000,5);
- return 1;
- }
- if ( Shooter != INVALID_PLAYER_ID && TerroristBomb[Shooter] == 0)
- {
- if(TerroristBomb[Target] == 1 || TerroristBomb[Target] == 2 || TerroristBomb[Target] == 3 || TerroristBomb[Target] == 4 || TerroristBomb[Target] == 5 || TerroristBomb[Target] == 6 || TerroristBomb[Target] == 7)
- {
- new Float:hp, Float:armour;
- GetPlayerHealth(Target, hp);
- GetPlayerArmour(Target, armour);
- SetPlayerArmour(Target, armour + ArmourLost);
- SetPlayerHealth(Target, hp + HealthLost);
- GameTextForPlayer(Shooter,"players are working and can not be attacked.",3000,5);
- return 1;
- }
- }
- return 1;
- }
- CMD:terrorist(playerid, params[])
- {
- if(IsPlayerInRangeOfPoint(playerid, 2, 2657.9956,-1589.4816,13.9864))
- {
- if(TerroristBomb[playerid] == 1 || TerroristBomb[playerid] == 2 || TerroristBomb[playerid] == 3 || TerroristBomb[playerid] == 4 || TerroristBomb[playerid] == 5 || TerroristBomb[playerid] == 6 || TerroristBomb[playerid] == 7)
- {
- SendClientMessage(playerid,0xFF0000AA,"You have started a terrorist work and can't use this command again.");
- return 1;
- }
- else
- TerroristBomb[playerid] = 1;
- new name[MAX_PLAYER_NAME], string[128];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "%s was working as a Terrorist. Type /jobterrorist for go to work terrorist.", name );
- SendClientMessageToAll(0xFFFF00AA, string);
- SendClientMessage(playerid,0xFFFF00AA,"Please follow the red checkpoint to start working as a terrorist and put a bomb.");
- SetPlayerCheckpoint(playerid, 2692.1714,-1708.7668,11.8478,3);
- SetPlayerAttachedObject(playerid,5,1252,8, -0.079999, -0.039999, 0.109999, -90.100006, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- LimitTimer = SetTimerEx("TimeLimit", 300000, 0, "d", playerid);
- return 1;
- }
- else
- {
- SendClientMessage(playerid, 0xFF0000AA, "You must be at work terrorist to use this command.");
- }
- return 1;
- }
- CMD:jobterrorist(playerid, params[])
- {
- if(TerroristBomb[playerid] == 1 || TerroristBomb[playerid] == 2 || TerroristBomb[playerid] == 3 || TerroristBomb[playerid] == 4 || TerroristBomb[playerid] == 5 || TerroristBomb[playerid] == 6 || TerroristBomb[playerid] == 7)
- {
- SendClientMessage(playerid, 0xFF0000AA, "You're not allowed to use this command while working.");
- return 1;
- }
- else
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, 2657.2930,-1596.1967,12.9181);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement