prevent NPCs from continuing with OnPlayerSpawn
This commit is contained in:
parent
98941bbc7f
commit
a64c916637
@ -246,6 +246,11 @@ hook OnScriptInit( )
|
|||||||
|
|
||||||
hook OnPlayerSpawn( playerid )
|
hook OnPlayerSpawn( playerid )
|
||||||
{
|
{
|
||||||
|
// prevent npcs from being treated like players
|
||||||
|
if ( IsPlayerNPC( playerid ) ) {
|
||||||
|
return Y_HOOKS_BREAK_RETURN_1; // add a callback otherwise OnNpcSpawn
|
||||||
|
}
|
||||||
|
|
||||||
// check if this spawn is even approved
|
// check if this spawn is even approved
|
||||||
if ( ! IsPlayerClassApproved( playerid ) )
|
if ( ! IsPlayerClassApproved( playerid ) )
|
||||||
{
|
{
|
||||||
|
@ -205,13 +205,13 @@ hook OnPlayerUpdate( playerid )
|
|||||||
return Y_HOOKS_CONTINUE_RETURN_1;
|
return Y_HOOKS_CONTINUE_RETURN_1;
|
||||||
}
|
}
|
||||||
|
|
||||||
hook OnPlayerSpawn( playerid )
|
/*hook OnPlayerSpawn( playerid )
|
||||||
{
|
{
|
||||||
if ( IsPlayerSecurityDriver( playerid ) ) {
|
if ( IsPlayerSecurityDriver( playerid ) ) {
|
||||||
return Y_HOOKS_BREAK_RETURN_1;
|
return Y_HOOKS_BREAK_RETURN_1;
|
||||||
}
|
}
|
||||||
return Y_HOOKS_CONTINUE_RETURN_1;
|
return Y_HOOKS_CONTINUE_RETURN_1;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
hook OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float: fX, Float: fY, Float: fZ )
|
hook OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float: fX, Float: fY, Float: fZ )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user