For destroyed variable get killed
#1

Sup
i have question how i should make a system like protection. I have variable called "Boxes" this variable create box and i want make if someone destroyed box (variable) he got killed for destroying it, bat its one important think if you destroyed you self you're not killed cuz its you're box like you own can destroy it bat someone next cant. And other think like variable called "TEAM_RED" can kill these box also with you.
Reply
#2

So have some ideas guys?
Reply
#3

Look at this callback: https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot

There you can check which objectid the player hit...

And now u have to check if the if(hitid == object[0]) and if object[0] for example is a object that he shouldnt destroyed you call SetPlayerHealth(playerid,0); and important use there DestroyObject(object[0]);

Good Luck
Reply
#4

Quote:
Originally Posted by Kaliber
Посмотреть сообщение
Look at this callback: https://sampwiki.blast.hk/wiki/OnPlayerWeaponShot

There you can check which objectid the player hit...

And now u have to check if the if(hitid == object[0]) and if object[0] for example is a object that he shouldnt destroyed you call SetPlayerHealth(playerid,0); and important use there DestroyObject(object[0]);

Good Luck
Can you give me example?
Reply
#5

Can someone give me example cuz i'm not so smart at this.
Reply
#6

up up up up
Reply
#7

Someone?
Reply
#8

You said this
PHP код:
Can someone give me example cuz i'm not so smart at this. 
Why don't you start from something simpler?? You should try making your GM from scratch. I suggest DM/FR gamemode because you can practise there and you have fully freedom there. It is not very hard. Start with login/register system ( https://sampforum.blast.hk/showthread.php?tid=273088 ). Then make Admin system then few Commands and expand your knowledge.

This is my suggestion.
Best whishes
Reply
#9

Quote:
Originally Posted by Micko123
Посмотреть сообщение
You said this
PHP код:
Can someone give me example cuz i'm not so smart at this. 
Why don't you start from something simpler?? You should try making your GM from scratch. I suggest DM/FR gamemode because you can practise there and you have fully freedom there. It is not very hard. Start with login/register system ( https://sampforum.blast.hk/showthread.php?tid=273088 ). Then make Admin system then few Commands and expand your knowledge.

This is my suggestion.
Best whishes
I have done this simple steps like register/login and other stuffs cuz i can find a lot tutorial about it. Bat i need just this think and its be over.
Reply
#10

up up up up
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)