Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: [Tkiller] on February 27, 2012, 07:46:10 am
-
I make an auto event Royal rumble,But the problem is that i want when event started the friendly fire set to be 0(same skin players kill same skin players) for only 5 minutes,after that friendly fire set to be 1(same skin player cannot be able to kill same skin players)...
On gamemodeinit i put this,
[pawn]SetTimer("RoyalRumble",200000,1);[/pawn]
In function i put that,
[pawn]public RoyalRumble()
{
new playerid;
for(new i = 0; i <= MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) SetPlayerPos(i,-1723.20898,-156.52439,14.86832,0,0);
SetPlayerFriendlyFire(1);
TogglePlayerControllable(playerid, 0);
SetPlayerWeapon(i, 21, 999);
SetPlayerWeapon(i, 23, 999);
SetPlayerWeapon(i, 26, 999);
SendClientMessageToAll(RED,"Event Started Kill every one to Be a winner");
SetTimer( "CountRace1", 1000, 0 );
SetTimer( "CountRace2", 2000, 0 );
SetTimer( "CountRace3", 3000, 0 );
SetTimer( "FinalCountRace", 4000, 0 );
}
return 1;
}[/pawn]
And in final count i put that For Toggle player controllable
[pawn]public FinalCountRace()
{
new plr;
GameTextForAll("==~o~Go ~p~Go! ~x~Go==" );
TogglePlayerControllable(plr, 1);
}[/pawn]
Please Help me....
-
as you did a Finalcuant public function you need to make a CountDown1, CountDown2 etc. :D
-
I make an auto event Royal rumble,But the problem is that i want when event started the friendly fire set to be 0(same skin players kill same skin players) for only 5 minutes,after that friendly fire set to be 1(same skin player cannot be able to kill same skin players)...
On gamemodeinit i put this,
[pawn]SetTimer("RoyalRumble",200000,1);[/pawn]
In function i put that,
[pawn]public RoyalRumble()
{
new playerid;
for(new i = 0; i <= MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) SetPlayerPos(i,-1723.20898,-156.52439,14.86832,0,0);
SetPlayerFriendlyFire(1);
TogglePlayerControllable(playerid, 0);
SetPlayerWeapon(i, 21, 999);
SetPlayerWeapon(i, 23, 999);
SetPlayerWeapon(i, 26, 999);
SendClientMessageToAll(RED,"Event Started Kill every one to Be a winner");
SetTimer( "CountRace1", 1000, 0 );
SetTimer( "CountRace2", 2000, 0 );
SetTimer( "CountRace3", 3000, 0 );
SetTimer( "FinalCountRace", 4000, 0 );
}
return 1;
}[/pawn]
And in final count i put that For Toggle player controllable
[pawn]public FinalCountRace()
{
new plr;
GameTextForAll("==~o~Go ~p~Go! ~x~Go==" );
TogglePlayerControllable(plr, 1);
}[/pawn]
Please Help me....
[pawn]SetTimer("RoyalRumble",200000,1);[/pawn]
SetTimer( "CountRace1", 1000, 0 );
SetTimer( "CountRace2", 2000, 0 );
SetTimer( "CountRace3", 3000, 0 );
SetTimer( "FinalCountRace", 4000, 0 );
SetTimer( "CountRace1", 1000, 0 );
SetTimer( "CountRace2", 2000, 0 );
SetTimer( "CountRace3", 3000, 0 );
(http://chifredoboi.files.wordpress.com/2011/02/fuuu2.png)
You use waaaayyy to much timers, amd about the friendly fire thing, I don't think it works.
Ohh and a note: We cannot pass playerid from function to timer
This is totally wrong as it will refer to 0
for(new i = 0; i <= MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) SetPlayerPos(i,-1723.20898,-156.52439,14.86832,0,0);
SetPlayerFriendlyFire(1);
TogglePlayerControllable(i, 0);
SetPlayerWeapon(i, 21, 999);
SetPlayerWeapon(i, 23, 999);
SetPlayerWeapon(i, 26, 999);
SendClientMessageToAll(RED,"Event Started Kill every one to Be a winner");
SetTimer( "CountRace1", 1000, 0 );
SetTimer( "CountRace2", 2000, 0 );
SetTimer( "CountRace3", 3000, 0 );
SetTimer( "FinalCountRace", 4000, 0 );
This is the correct version
SOO... Conclusion:
You use too much timers which lag the server, I will use just one...
But the idea is original and good
-
You use waaaayyy to much timers, amd about the friendly fire thing, I don't think it works.
Ohh and a note: We cannot pass playerid from function to timer
This is totally wrong as it will refer to 0
Quote
for(new i = 0; i <= MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) SetPlayerPos(i,-1723.20898,-156.52439,14.86832,0,0);
SetPlayerFriendlyFire(1);
TogglePlayerControllable(i, 0);
SetPlayerWeapon(i, 21, 999);
SetPlayerWeapon(i, 23, 999);
SetPlayerWeapon(i, 26, 999);
SendClientMessageToAll(RED,"Event Started Kill every one to Be a winner");
SetTimer( "CountRace1", 1000, 0 );
SetTimer( "CountRace2", 2000, 0 );
SetTimer( "CountRace3", 3000, 0 );
SetTimer( "FinalCountRace", 4000, 0 );
This is the correct version
SOO... Conclusion:
You use too much timers which lag the server, I will use just one...
But the idea is original and good
Thanks,
But still the fucking Friendly fire problem.....
-
I do believe that SetFriendlyFire can be used JUST in OnGameModeInit (IIRC).
-
Lol....
I know it's set in Gmaemodeinit,but i want to set it for My event man,you don't get it(o_0)
-
I do believe that SetFriendlyFire can be used JUST in OnGameModeInit (IIRC).
So badly people cannot read the bold letters
-
I do believe that SetFriendlyFire can be used JUST in OnGameModeInit (IIRC).
So badly people cannot read the bold letters
Oh,Sorry,I can't focus my mind..... :-[
-
No problem, also, an off-topic tip: Try to put [ img ] [ /img ] before and after your image
so it should look like
[ img ] http://a6.sphotos.ak.fbcdn.net/hphotos-ak-snc7/428622_364395856916866_100000393638744_1258428_149334923_n.jpg [/ img ]
but without spaces.
-
Oh thanks.... :o
[ img ] http://a6.sphotos.ak.fbcdn.net/hphotos-ak-snc7/428622_364395856916866_100000393638744_1258428_149334923_n.jpg [/ img ]
-
but without spaces.