Need Help On Script
#1

hi guys . i cant find some thing like what i want , so i posted this topic .
i want a script that dont allow none wanted levels cant dmg the other none wanted level player no text just dont decrease the players health

and the other one , if a player with wanted level killed some other guy who doesent have wanted lvl this chat appear in chat for him : You Should Not Kill None Wanted Players !
**** but if the the player with 0 wanted level gave dmg to that player who has wanted level its ok and should not show anything in chat

srry for my bad english . if you can help me please !
Reply
#2

? /: +up
Reply
#3

1) Play with GetPlayerWantedLevel, SetPlayerWantedLevel, OnPlayerWeaponShot and SetPlayerTeam.
Random idea I have now, is setting every player with the "no wanted level" in the same team, so they can't damage theirselves.

2)Use SetPlayerWantedLeven and GetPlayerWantedLevel
Reply
#4

i do this : if player was on this teams : team1 team2 team3 cant give dmg to no wanted players , but how should i set his gun dmg on 0 when he shot to no wanted players ? just havr problem this part
Reply
#5

Try this :
PHP код:
OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
 if(
GetPlayerWantedLevel(issuerid) == )
 {
   new 
healtharmour;
   
GetPlayerHealth(issueridhealth);
   
SetPlayerHealth(issueridhealth);
   
GetPlayerArmour(issueridarmour);
   
SetPlayerArmour(issueridarmour);
 }
 return 
1;

Reply
#6

Quote:
Originally Posted by Orbit21
Посмотреть сообщение
Try this :
PHP код:
OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
 if(
GetPlayerWantedLevel(issuerid) == )
 {
   new 
healtharmour;
   
GetPlayerHealth(issueridhealth);
   
SetPlayerHealth(issueridhealth);
   
GetPlayerArmour(issueridarmour);
   
SetPlayerArmour(issueridarmour);
 }
 return 
1;

Your code wont work till you make those variables float lol
PHP код:
OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
 if(
GetPlayerWantedLevel(issuerid) == )
 {
   static 
Float:healthFloat:armour;
   
GetPlayerHealth(issueridhealth);
   
GetPlayerArmour(issueridarmour);
   
SetPlayerHealth(issueridhealth);
   
SetPlayerArmour(issueridarmour);
 }
 return 
1;

Reply
#7

Quote:
Originally Posted by CaptainBoi
Посмотреть сообщение
Your code wont work till you make those variables float lol
PHP код:
OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
{
 if(
GetPlayerWantedLevel(issuerid) == )
 {
   static 
Float:healthFloat:armour;
   
GetPlayerHealth(issueridhealth);
   
GetPlayerArmour(issueridarmour);
   
SetPlayerHealth(issueridhealth);
   
SetPlayerArmour(issueridarmour);
 }
 return 
1;

Thanks for the correction, appreciate it.
Reply
#8

https://sampforum.blast.hk/showthread.php?tid=606430
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)