Author Topic: Help needed please  (Read 2515 times)

0 Members and 1 Guest are viewing this topic.

yazeen

  • Guest
Help needed please
« on: March 24, 2011, 12:16:25 pm »
Im Currently working on a Counter-Strike GM I need 2 commands Help from u guys plse help
1st:
Plantbomb

Code: [Select]
}
if(strcmp(cmd, "PlantBomb", true) == 0)
{
new param[256];
    param = strtok(cmdtext,idx);
if(PlayerToPoint(25.0,playerid, -1108.7896, 300.2706, 12.2578))SendClientMessage(playerid,COLOR_GREEN,"You need to be in Bomb Site");
if(PlayerInfo[playerid][Ts] = 1) // Ts means Terrerist strike
if(IsPlayerHavingBombs[playerid] = 1)     
{
PlayerInfo[playerid][Bombplanted] = 1;
    SendClientMessageToAll(COLOR_RED,"Bomb Has Been Planted");
}
return 1;
}

in this When 10seconds over and Bomb Blasted it announces Terrorist Wins!!

2nd:
Code: [Select]
}
if(strcmp(cmd, "DefuseBomb", true) == 0)
{
new param[256];
    param = strtok(cmdtext,idx);
if(PlayerToPoint(25.0,playerid, -1108.7896, 300.2706, 12.2578))SendClientMessage(playerid,COLOR_GREEN,"You need to be in Bomb Site");
if(PlayerInfo[playerid][Cs] = 1) Counter-Stike
if(IsPlayerHavingDefuser[playerid] = 1)
if(PlayerInfo[playerid][Bombplanted] = 1)
{
PlayerInfo[playerid][BombDefused] = 1;
    SendClientMessageToAll(COLOR_RED,"Counter-Strike Wins!");
    SendClientMessageToAll(COLOR_RED,"Bomb Has Been Defused");
}
return 1;

If Defused With 10 sec It Announces Counter Terrerist Wins!!

im Not Good at Timerx function plse help me !!

yazeen

  • Guest
Re: Help needed please
« Reply #1 on: March 24, 2011, 12:27:26 pm »
And i forgot To add Defusing Bomb also in 10sec then Messages Bomb Defused!
Well Most of u guys play CS U Must know about it Without me explain

Offline cycu

  • VC:MP Beta Tester
  • Street Thug
  • *
  • Posts: 19
    • View Profile
Re: Help needed please
« Reply #2 on: March 24, 2011, 05:37:41 pm »
There can be some typos in this, done really quickly.

http://pastebin.com/vSXv1hqc

Now if you want to make it even cooler add another timer which will check if the player is in the radius of the bomb site, which will prevent from typing /c defuse and letting player to defuse bomb anywhere he wants.

I hope this helped ;).

yazeen

  • Guest
Re: Help needed please
« Reply #3 on: March 24, 2011, 05:46:46 pm »
There can be some typos in this, done really quickly.

http://pastebin.com/vSXv1hqc

Now if you want to make it even cooler add another timer which will check if the player is in the radius of the bomb site, which will prevent from typing /c defuse and letting player to defuse bomb anywhere he wants.

I hope this helped ;).

thx man It helped

Offline BIG[H]

  • Made Man
  • ***
  • Posts: 159
  • Sight of light
    • View Profile
Re: Help needed please
« Reply #4 on: March 26, 2011, 03:37:17 pm »
PERFECTLY FAILED!!
Outdoor city server Administrator, FS server owner!

yazeen

  • Guest
Re: Help needed please
« Reply #5 on: March 26, 2011, 04:19:55 pm »
PERFECTLY FAILED!!

Big  i dont Get any Buggs by using this!!
Its PASSED PERFECTLLY