Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: andr on February 24, 2013, 12:32:17 pm

Title: Who can give me anti-vehicle-kill script
Post by: andr on February 24, 2013, 12:32:17 pm
plz
Title: Re: Who can give me anti-vehicle-kill script
Post by: dynavolt71 on February 24, 2013, 04:12:42 pm
What your point ? I dont understand. Are you talking "when player car damaged it will be auto fix" ?
Title: Re: Who can give me anti-vehicle-kill script
Post by: mrockxkingbutt on February 24, 2013, 06:09:46 pm
he need a anti-vehicle killer
some players are noobs and kill inside a vehicle
Title: Re: Who can give me anti-vehicle-kill script
Post by: VC[88]PD on February 24, 2013, 06:22:19 pm
Write this in public OnPlayerDeath.
[pawn]if ( reason == 39 )
      {
            format( string, 128, "Auto-Kill:[ %s ] Reason:[ Vehicle-Kill ]", gPlayers[ killerid ] );
            SendClientMessageToAll( COLOR_GREEN, string );
            SetPlayerHealth( killerid , 0);
                                RemovePlayerFromVehicle( killerid );
      }[/pawn]
I haven't test it,but it should be work.
Title: Re: Who can give me anti-vehicle-kill script
Post by: andr on February 25, 2013, 03:40:36 pm
Write this in public OnPlayerDeath.
[pawn]if ( reason == 39 )
      {
            format( string, 128, "Auto-Kill:[ %s ] Reason:[ Vehicle-Kill ]", gPlayers[ killerid ] );
            SendClientMessageToAll( COLOR_GREEN, string );
            SetPlayerHealth( killerid , 0);
                                RemovePlayerFromVehicle( killerid );
      }[/pawn]
I haven't test it,but it should be work.
Code: [Select]
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(102) : error 017: undefined symbol "strtok"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(102) : error 033: array must be indexed (variable "tmp")
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(115) : error 017: undefined symbol "FindPlayerIDFromString"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(133) : error 017: undefined symbol "strtok"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(133) : error 033: array must be indexed (variable "tmp")
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(148) : error 017: undefined symbol "strtok"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(148) : error 033: array must be indexed (variable "tmp")
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(163) : error 017: undefined symbol "strtok"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(163) : error 033: array must be indexed (variable "tmp")
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(164) : error 017: undefined symbol "FindPlayerIDFromString"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(189) : error 017: undefined symbol "strtok"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(189) : error 033: array must be indexed (variable "tmp")
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(206) : error 017: undefined symbol "strtok"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(206) : error 033: array must be indexed (variable "tmp")
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(210) : error 017: undefined symbol "FindPlayerIDFromString"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(228) : error 017: undefined symbol "strtok"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(228) : error 033: array must be indexed (variable "tmp")
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(241) : error 017: undefined symbol "strtok"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(241) : error 033: array must be indexed (variable "tmp")
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(254) : error 017: undefined symbol "strtok"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(254) : error 033: array must be indexed (variable "tmp")
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(267) : error 017: undefined symbol "strtok"
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(267) : error 033: array must be indexed (variable "tmp")
F:\Program Files\GTA Vice City\My server\gamemodes\mode.pwn(277) : error 017: undefined symbol "strtok"

Compilation aborted.Pawn compiler 3.0.3367 Copyright (c) 1997-2005, ITB CompuPhase


26 Errors.
Title: Re: Who can give me anti-vehicle-kill script
Post by: aledark24 on February 26, 2013, 12:46:48 am
need put another }
in the end of public OnPlayerDeath
Title: Re: Who can give me anti-vehicle-kill script
Post by: Akcent Ohare on February 26, 2013, 12:56:13 am
need put another }
in the end of public OnPlayerDeath
O c'mon, he didn't even use that in the code.
Title: Re: Who can give me anti-vehicle-kill script
Post by: NeskWriter on February 27, 2013, 03:55:21 pm
Write this in public OnPlayerDeath.
[pawn]if ( reason == 39 )
      {
            format( string, 128, "Auto-Kill:[ %s ] Reason:[ Vehicle-Kill ]", gPlayers[ killerid ] );
            SendClientMessageToAll( COLOR_GREEN, string );
            SetPlayerHealth( killerid , 0);
                                RemovePlayerFromVehicle( killerid );
      }[/pawn]
I haven't test it,but it should be work.

what about a new string first? This guy looks like justice user, so he won't know how to do it.
And, why did u put RemovePlayerFromVehicle(killerid)? Tell me the way to kill someone who is in vehicle when u too? or, maybe, u mean anti-driveby? So then u can use [pawn]DisableDriveby(playerid, 1)[/pawn] in OnPlayerConnect. Learn a_vcmp functions, it's easy, and u will write scripts with the simple code.
Title: Re: Who can give me anti-vehicle-kill script
Post by: MatheuS on February 27, 2013, 05:32:32 pm
Write this in public OnPlayerDeath.
[pawn]if ( reason == 39 )
      {
            format( string, 128, "Auto-Kill:[ %s ] Reason:[ Vehicle-Kill ]", gPlayers[ killerid ] );
            SendClientMessageToAll( COLOR_GREEN, string );
            SetPlayerHealth( killerid , 0);
                                RemovePlayerFromVehicle( killerid );
      }[/pawn]
I haven't test it,but it should be work.

what about a new string first? This guy looks like justice user, so he won't know how to do it.
And, why did u put RemovePlayerFromVehicle(killerid)? Tell me the way to kill someone who is in vehicle when u too? or, maybe, u mean anti-driveby? So then u can use [pawn]DisableDriveby(playerid, 1)[/pawn] in OnPlayerConnect. Learn a_vcmp functions, it's easy, and u will write scripts with the simple code.

add in GameModeInit:

[pawn]DisableDriveby(playerid, 1)[/pawn]
Title: Re: Who can give me anti-vehicle-kill script
Post by: NeskWriter on February 27, 2013, 06:51:40 pm
Write this in public OnPlayerDeath.
[pawn]if ( reason == 39 )
      {
            format( string, 128, "Auto-Kill:[ %s ] Reason:[ Vehicle-Kill ]", gPlayers[ killerid ] );
            SendClientMessageToAll( COLOR_GREEN, string );
            SetPlayerHealth( killerid , 0);
                                RemovePlayerFromVehicle( killerid );
      }[/pawn]
I haven't test it,but it should be work.

what about a new string first? This guy looks like justice user, so he won't know how to do it.
And, why did u put RemovePlayerFromVehicle(killerid)? Tell me the way to kill someone who is in vehicle when u too? or, maybe, u mean anti-driveby? So then u can use [pawn]DisableDriveby(playerid, 1)[/pawn] in OnPlayerConnect. Learn a_vcmp functions, it's easy, and u will write scripts with the simple code.

add in GameModeInit:

[pawn]DisableDriveby(playerid, 1)[/pawn]

sorry but DUMB! OnGameModeInit is called when user ( server owner ) starts server process. You can't pass playerid var into OnGameModeInit. Use DisableDriveby only in OnPlayerConnect or in OnPlayerSpawn.
Title: Re: Who can give me anti-vehicle-kill script
Post by: mrockxkingbutt on March 20, 2013, 12:55:21 am
put this in onplayerdeath and onplayerkill
if ( IsPlayerInAnyVehicle( killerid )) SetPlayerHealth(killerid, 0);

if anybody kill you with vehicle he got kill automatic
Title: Re: Who can give me anti-vehicle-kill script
Post by: killvn1 on April 30, 2013, 03:15:48 am
put this in onplayerdeath and onplayerkill
if ( IsPlayerInAnyVehicle( killerid )) SetPlayerHealth(killerid, 0);

if anybody kill you with vehicle he got kill automatic

I'd love a harder way . With my way you can anti both vehicle killer and drive-by killer :))
Take this :
Put it in public OnPlayerDeath

                if (IsPlayerInAnyVehicle(killerid)) {
      SendClientMessage(killerid, RED, "Fuck you ...");
      Ban(killerid);
      }
PROBLEM ?
Title: Re: Who can give me anti-vehicle-kill script
Post by: mrockxkingbutt on April 30, 2013, 08:03:00 am
lolx ban
Title: Re: Who can give me anti-vehicle-kill script
Post by: MatheuS on April 30, 2013, 04:18:21 pm
put this in onplayerdeath and onplayerkill
if ( IsPlayerInAnyVehicle( killerid )) SetPlayerHealth(killerid, 0);

if anybody kill you with vehicle he got kill automatic

I'd love a harder way . With my way you can anti both vehicle killer and drive-by killer :))
Take this :
Put it in public OnPlayerDeath

                if (IsPlayerInAnyVehicle(killerid)) {
      SendClientMessage(killerid, RED, "Fuck you ...");
      Ban(killerid);
      }
PROBLEM ?

[pawn]Put it in public OnPlayerDeath

                if (IsPlayerInAnyVehicle(killerid)) {
      SendClientMessage(killerid, RED, "Forbidden Drive By this Server");
      SetPlayerHealth(killerid, 1);
                RemovePlayerFromVehicle(killerid);
      }[/pawn]
Title: Re: Who can give me anti-vehicle-kill script
Post by: TBS.Milko on April 30, 2013, 08:25:03 pm

if anybody kill you with vehicle he got kill automatic

I'd love a harder way . With my way you can anti both vehicle killer and drive-by killer :))
Take this :
Put it in public OnPlayerDeath

                if (IsPlayerInAnyVehicle(killerid)) {
      SendClientMessage(killerid, RED, "Fuck you ...");
      Ban(killerid);
      }
PROBLEM ?
[/quote]

LOL