• Welcome to Vice City Multiplayer.
 

Help needed please

Started by yazeen, March 24, 2011, 09:16:25 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

yazeen

Im Currently working on a Counter-Strike GM I need 2 commands Help from u guys plse help
1st:
Plantbomb

}
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:
}
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

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

cycu

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

Quote from: cycu on March 24, 2011, 02: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 ;).

thx man It helped

BIG[H]

My Guru FORUM MUST VISITmegavcmp.freeforums.org

BIG[H] = BIG HaLL

yazeen

Quote from: BIG[H] on March 26, 2011, 12:37:17 PM
PERFECTLY FAILED!!

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