Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: yazeen on March 24, 2011, 10:16:25 AM

Title: Help needed please
Post by: yazeen on March 24, 2011, 10:16:25 AM
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 !!
Title: Re: Help needed please
Post by: yazeen on March 24, 2011, 10:27:26 AM
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
Title: Re: Help needed please
Post by: cycu on March 24, 2011, 03: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 ;).
Title: Re: Help needed please
Post by: yazeen on March 24, 2011, 03:46:46 PM
Quote from: cycu on March 24, 2011, 03: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
Title: Re: Help needed please
Post by: BIG[H] on March 26, 2011, 01:37:17 PM
PERFECTLY FAILED!!
Title: Re: Help needed please
Post by: yazeen on March 26, 2011, 02:19:55 PM
Quote from: BIG[H] on March 26, 2011, 01:37:17 PM
PERFECTLY FAILED!!

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