[Include] Fighting & Interior Manager
#1

Fighting & Interior Manager


Introduction:

This is another include can detect a player while fighting and also can detect player enter the interior

Functions:

Callbacks:

PHP код:
public OnPlayerStartFighting(playerid)
public 
OnPlayerEnterInterior(playerid
Functions:

PHP код:
IsPlayerFighting(playerid);
IsPlayerInInterior(playerid); 
Exemple:

PHP код:
public OnPlayerCommandReceived(playeridcmdtext[])
{
    if(
IsPlayerFighting(playerid) == 1)
    {
        
SendClientMessage(playerid, -1"Error: You can't use this command while fighting")
        return 
0;
    }
    if(
IsPlayerInInterior(playerid) == 1)
    {
        
SendClientMessage(playerid, -1"Error: Please get out interior to use this command")
        return 
0;
    }
    return 
1;

Download:

Github: Click on me !

Have fun !!

Yaa
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange what is wrong with this? Why would anyone need your include that does that same thing? 1-star.
Reply
#3

Quote:
Originally Posted by Pottus
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange what is wrong with this? Why would anyone need your include that does that same thing? 1-star.
some guys have OnPlayerInteriorChange so much complied like roleplayers etc does they perefer use function like this on the include or add lines on OnPlayerInteriorChange and make it so much complied ?

EDIT: same thing to fighting manager
Reply
#4

I agree to Pottus, that new Callback is completly useless.
Also, did u even test that thing? There are even missing variable declarations ^^

PHP код:
    if(oldinteriorid == && newinteriorid != 0)
    {
        
IsInterior[playerid] = true;
        
CallLocalFunction("OnPlayerEnterInterior""i"i);
        return 
1;
    } 
Variable
PHP код:

doesn't exist. You did that multiple times.

And OnPlayerShotWeapon lacks a copuple things, use this isntead https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage and set both players states to fighting, because when i just shoot a weapon it doesn't mean i am fighting, also you should make the "fighting is over" cooldown customizeable (15*1000). And kill the timer everytime and recreate it.

Overall i would't call that a release
Reply
#5

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
I agree to Pottu, that new Callback is completly useless.
Also, did u even test that thing? There are even missing variable declarations ^^

PHP код:
    if(oldinteriorid == && newinteriorid != 0)
    {
        
IsInterior[playerid] = true;
        
CallLocalFunction("OnPlayerEnterInterior""i"i);
        return 
1;
    } 
Variable
PHP код:

doesn't exist. You did that multiple times.

And OnPlayerShotWeapon lacks a copuple things, use this isntead https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage and set both players states to fighting, because when i just shoot a weapon it doesn't mean i am fighting, also you should make the "fighting is over" cooldown customizeable (15*1000). And kill the timer everytime and recreate it.

Overall i would't call that a release
well fixed
Reply
#6

Both useless callbacks, i mean, they can be done with SA:MP's functions / callbacks.
Reply
#7

Wait a second. So you are using an interior change function to create a new interior change function? I do not get the logic. OnPlayerEnterInterior is the same as OnPlayerInteriorChange, they both get called when a player interior changes, no matter what the old ID is. Plus, using the default interior ID's as 0 is wrong. If the player changes from interior 1 to 2, I'm pretty sure the script won't work. I hope there would be a zero star rating.
Reply
#8

Quote:
Originally Posted by Private200
Посмотреть сообщение
Wait a second. So you are using an interior change function to create a new interior change function? I do not get the logic. OnPlayerEnterInterior is the same as OnPlayerInteriorChange, they both get called when a player interior changes, no matter what the old ID is. Plus, using the default interior ID's as 0 is wrong. If the player changes from interior 1 to 2, I'm pretty sure the script won't work. I hope there would be a zero star rating.
the origine is 0 so how the hell he will change interior from 1 to 2 without passing on 0 ?
Reply
#9

Quote:
Originally Posted by iLearner
View Post
SetPlayerPos & SetPlayerInterior.
SetPlayerInterior can't set god mode on switching from int to another one
Reply
#10

Quote:
Originally Posted by Yaa
View Post
SetPlayerInterior can't set god mode on switching from int to another one
SetPlayerInterior( playerid, interior ) ;
SetPlayerHealth ( playerid, FLOAT_INFINITY ) ;

Reply
#11

Useless
https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange
Reply
#12

Quote:
Originally Posted by Yaa
Посмотреть сообщение
the origine is 0 so how the hell he will change interior from 1 to 2 without passing on 0 ?
You should not worry about "how", but what comes after that. Yes, it is possible to pass from 1 to 2 without passing to 0 as there are MULTIPLE interior ID's. One of the examples is going from one house interior to another. Get your facts straight before you post.
Reply
#13

Quote:
Originally Posted by Private200
Посмотреть сообщение
You should not worry about "how", but what comes after that. Yes, it is possible to pass from 1 to 2 without passing to 0 as there are MULTIPLE interior ID's. One of the examples is going from one house interior to another. Get your facts straight before you post.
that doesn't matter,

the include detect u are still in interior
Reply
#14

He just wants to have a Include release in his signature guys... let him feel happy
Reply
#15

Quote:
Originally Posted by iLearner
View Post
He just wants to have a Include release in his signature guys... let him feel happy
well im not who copying ffs scripts and post it here as his own filterscripts
Reply
#16

Quote:
Originally Posted by Yaa
View Post
well im not who copying ffs scripts and post it here as his own filterscripts
What a stupid reaction
Reply
#17

Well, you can't deny the fact that this include is pretty useless, @Yaa.
But don't give up, just try something else, it doesn't have to be unique, but it also shouldn't be possible already with default SA:MP Callbacks
Reply
#18

Can I know what did I copy from ffs ( I script ffs ) and claimed as mine?
Reply
#19

Stop crapping if you can't accept your own silliness then you will be get treated by others like this Yaa.Think twice before releasing something and compare yours with others releases.And stop calling yourself a lead scripter you are just a beginner and need to get more basics on scripting.You will think it as a joke but its not. Keep trying...
Reply
#20

You will realize how cringy this is Yaa once you learned scripting
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)