Fighting & Interior Manager -
Yaa - 15.01.2017
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(playerid, cmdtext[])
{
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
Re: Fighting & Interior Manager -
Pottus - 15.01.2017
https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange what is wrong with this? Why would anyone need your include that does that same thing? 1-star.
Re: Fighting & Interior Manager -
Yaa - 15.01.2017
Quote:
Originally Posted by Pottus
|
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
Re: Fighting & Interior Manager -
BiosMarcel - 15.01.2017
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 == 0 && newinteriorid != 0)
{
IsInterior[playerid] = true;
CallLocalFunction("OnPlayerEnterInterior", "i", i);
return 1;
}
Variable
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
Re: Fighting & Interior Manager -
Yaa - 15.01.2017
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 == 0 && newinteriorid != 0)
{
IsInterior[playerid] = true;
CallLocalFunction("OnPlayerEnterInterior", "i", i);
return 1;
}
Variable 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
Re: Fighting & Interior Manager - iLearner - 15.01.2017
Both useless callbacks, i mean, they can be done with SA:MP's functions / callbacks.
Re: Fighting & Interior Manager -
Private200 - 15.01.2017
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.
Re: Fighting & Interior Manager -
Yaa - 15.01.2017
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 ?
Re: Fighting & Interior Manager -
Yaa - 16.01.2017
Quote:
Originally Posted by iLearner
SetPlayerPos & SetPlayerInterior.
|
SetPlayerInterior can't set god mode on switching from int to another one
Re: Fighting & Interior Manager -
Dignity - 16.01.2017
Quote:
Originally Posted by Yaa
SetPlayerInterior can't set god mode on switching from int to another one
|
SetPlayerInterior( playerid, interior ) ;
SetPlayerHealth ( playerid, FLOAT_INFINITY ) ;
Re: Fighting & Interior Manager -
MiiSha - 18.01.2017
Useless
https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange
Re: Fighting & Interior Manager -
Private200 - 18.01.2017
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.
Re: Fighting & Interior Manager -
Yaa - 19.01.2017
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
Re: Fighting & Interior Manager -
iLearner - 19.01.2017
He just wants to have a Include release in his signature guys... let him feel happy
Re: Fighting & Interior Manager -
Yaa - 19.01.2017
Quote:
Originally Posted by iLearner
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
Re: Fighting & Interior Manager -
BiosMarcel - 19.01.2017
Quote:
Originally Posted by Yaa
well im not who copying ffs scripts and post it here as his own filterscripts
|
What a stupid reaction
Re: Fighting & Interior Manager -
JustMe.77 - 19.01.2017
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
Re: Fighting & Interior Manager -
iLearner - 20.01.2017
Can I know what did I copy from ffs ( I script ffs
) and claimed as mine?
Re: Fighting & Interior Manager -
GhostHacker9 - 20.01.2017
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...
Re: Fighting & Interior Manager -
JaKe Elite - 20.01.2017
You will realize how cringy this is Yaa once you learned scripting