Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: killvn1 on May 02, 2013, 10:22:56 am

Title: Disable Weapon Damage ? Need Help
Post by: killvn1 on May 02, 2013, 10:22:56 am
I see in some vc-mp server they can disable weapon damage in Bank's Area .

Wow ... can i do this ?  :) You guy have any idea ?  :-*
Title: Re: Disable Weapon Damage ? Need Help
Post by: stormeus on May 02, 2013, 10:43:01 am
This is possible to implement in Squirrel, but not in Pawn.

http://vcmp.liberty-unleashed.co.uk
Title: Re: Disable Weapon Damage ? Need Help
Post by: aledark24 on May 02, 2013, 02:45:12 pm
i hate you pawn..... xD
so many bugs.... or
so many missing function
Title: Re: Disable Weapon Damage ? Need Help
Post by: dynavolt71 on May 04, 2013, 05:04:47 pm
i hate you pawn..... xD
so many bugs.... or
so many missing function
Why you learn pawn ?
Title: Re: Disable Weapon Damage ? Need Help
Post by: [AoD]NC on May 04, 2013, 05:08:01 pm
Or

You can remove every weapon from a player when entering the bank and give it back when he leaves it :).
Title: Re: Disable Weapon Damage ? Need Help
Post by: dynavolt71 on May 04, 2013, 05:11:41 pm
By pickup ?
Title: Re: Disable Weapon Damage ? Need Help
Post by: stormeus on May 04, 2013, 05:32:57 pm
Or

You can remove every weapon from a player when entering the bank and give it back when he leaves it :).
By pickup ?

You could use pickups, but if too many people are entering and exiting the bank at the same time, and the pickup does not respawn quickly enough, players will be able to enter the bank with their weapons. For example, someone is chasing another person who runs into the bank. The player running into the bank loses their weapons because they ran into the pickup. However, the pickup takes 15 or 30 seconds to respawn. The player chasing them can run after them and start shooting this defenseless player.
Title: Re: Disable Weapon Damage ? Need Help
Post by: aledark24 on May 04, 2013, 07:00:40 pm
i hate you pawn..... xD
so many bugs.... or
so many missing function
Why you learn pawn ?
because is easy for me....
sq dont like so much...
so i choose pawn
Title: Re: Disable Weapon Damage ? Need Help
Post by: [AoD]NC on May 04, 2013, 11:34:53 pm
Or another concept: the script checks every few seconds if the player is carrying a weapon in El Corupto Bank and if he got a weapon then throw him outside the bank + send a pm "remove your weapon to enter" (switch to "fist").

Guys, more creativity :D. If disabling sync is not possible in PAWN then let's find something that fits to our need ;).
Title: Re: Disable Weapon Damage ? Need Help
Post by: killvn1 on May 05, 2013, 06:29:16 am
[pawn]public OnGameModeInit()
{

   SetTimer("Disable Bank Weapon",100, 1);

}
[/pawn]



it's a simplest way.But i hate use settime  :-[ . Cause server become lag :(
Title: Re: Disable Weapon Damage ? Need Help
Post by: dynavolt71 on May 05, 2013, 09:25:46 am
You want set what lol ?
Title: Re: Disable Weapon Damage ? Need Help
Post by: [AoD]NC on May 05, 2013, 02:27:15 pm
Well, you must be crazy to set a 100 ms timer. If VCMP would have client-side scripting then 100 ms is okay, but for server-side scripting 100 ms is not a good solution. A timer set to 1 or more seconds is the best solution.
Title: Re: Disable Weapon Damage ? Need Help
Post by: dynavolt71 on May 05, 2013, 03:07:12 pm
1000 ms = 1 sec
Title: Re: Disable Weapon Damage ? Need Help
Post by: killvn1 on May 05, 2013, 03:19:22 pm
Well, you must be crazy to set a 100 ms timer. If VCMP would have client-side scripting then 100 ms is okay, but for server-side scripting 100 ms is not a good solution. A timer set to 1 or more seconds is the best solution.

But back in my server , it's already use alot of settime :( . I didn't want to use more Settime so I have an idea :

[pawn]On player Death
{
if(strcmp(GetPlayerLocation(killerid), "Bank Area", true) == 0)
{
SendClientMessage(playerid, RED, "Congratulation ... I have a BIG Surprise for you");
Ban(killerid);
}
}[/pawn]

Tough guy huh ?
Title: Re: Disable Weapon Damage ? Need Help
Post by: dynavolt71 on May 05, 2013, 03:37:28 pm
:o wat ?!!!
Title: Re: Disable Weapon Damage ? Need Help
Post by: [AoD]NC on May 05, 2013, 04:25:58 pm
Don;t understand that too :).

Well, instead of making 10 different timers and each of them just for 1 function, think about making 1 timer for 10 functions ;).
Title: Re: Disable Weapon Damage ? Need Help
Post by: MatheuS on May 07, 2013, 03:55:32 am
[pawn]public OnPlayerKillEx(playerid, killerid, reason, bodypart)
{
 if (IsPlayerInArea(playerid, -955.8472,-897.2318,-362.1332,-304.5426))
 {
  MessageAllFormat(COLOR_NEUTRAL,"%s Has Been Kicked For Killing At Bank",gPlayers[killerid]);
  Kick(killerid);
  }
return 1;
}[/pawn]

[pawn]stock NeedPlayerInArea(playerid,Float:MinX,Float:MaxX,Float:MinY,Float:MaxY)
{
      new Float:x,Float:y,Float:z;
       GetPlayerPos(playerid, x, y, z);
       if(x >= MinX && x <= MaxX && y >= MinY && y <= MaxY) return 1;
       else return 0;
      return 1;
}
[/pawn]

 ;)
Title: Re: Disable Weapon Damage ? Need Help
Post by: aledark24 on May 07, 2013, 03:04:07 pm
[pawn]public OnPlayerKillEx(playerid, killerid, reason, bodypart)
{
 if (IsPlayerInArea(playerid, -955.8472,-897.2318,-362.1332,-304.5426))
 {
  MessageAllFormat(COLOR_NEUTRAL,"%s Has Been Kicked For Killing At Bank",gPlayers[killerid]);
  Kick(killerid);
  }
return 1;
}[/pawn]

[pawn]stock NeedPlayerInArea(playerid,Float:MinX,Float:MaxX,Float:MinY,Float:MaxY)
{
      new Float:x,Float:y,Float:z;
       GetPlayerPos(playerid, x, y, z);
       if(x >= MinX && x <= MaxX && y >= MinY && y <= MaxY) return 1;
       else return 0;
      return 1;
}
[/pawn]

 ;)
messageallformat??
not all users use warchief matheus....
public onplayerkillex?? warchief...
is better use playertopoint...
and put in the normal onplayerdeath...
and messageallformat translate for szmsg..
think and change the command...

Color_neutral wtf¿?

My server

201.241.73.137:5192
Title: Re: Disable Weapon Damage ? Need Help
Post by: dynavolt71 on May 07, 2013, 03:27:23 pm
+1 alejandro