Posts: 599
Threads: 48
Joined: May 2016
15.01.2017, 17:28
(
Последний раз редактировалось Yaa; 15.01.2017 в 19:12.
)
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
Posts: 599
Threads: 48
Joined: May 2016
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
Posts: 1,219
Threads: 51
Joined: Jul 2012
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
Posts: 599
Threads: 48
Joined: May 2016
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
Both useless callbacks, i mean, they can be done with SA:MP's functions / callbacks.
Posts: 1,176
Threads: 114
Joined: May 2012
Reputation:
0
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.
Posts: 599
Threads: 48
Joined: May 2016
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 ?
Posts: 599
Threads: 48
Joined: May 2016
Quote:
Originally Posted by iLearner
SetPlayerPos & SetPlayerInterior.
|
SetPlayerInterior can't set god mode on switching from int to another one
Posts: 599
Threads: 48
Joined: May 2016
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
He just wants to have a Include release in his signature guys... let him feel happy
Posts: 599
Threads: 48
Joined: May 2016
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
Posts: 1,219
Threads: 51
Joined: Jul 2012
Quote:
Originally Posted by Yaa
well im not who copying ffs scripts and post it here as his own filterscripts
|
What a stupid reaction
Posts: 107
Threads: 0
Joined: Jan 2017
Reputation:
0
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...