AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Saved ya (https://forums.alliedmods.net/showthread.php?t=319466)

HamletEagle 12-15-2019 16:52

Re: Saved ya
 
Quote:

Originally Posted by EFFx (Post 2676979)
Guess he meant inside the loop, I didn't know that get_players could return invalid players as well, that's odd. Anyway, I made some changes, it's already avaliable.

I know what he meant, but it's not the case. get_players can't return invalid players, that's the whole point of it.
He should post the actual error log.

tarsisd2 12-16-2019 08:48

Re: Saved ya
 
Quote:

Originally Posted by HamletEagle (Post 2677063)
I know what he meant, but it's not the case. get_players can't return invalid players, that's the whole point of it.
He should post the actual error log.

what do you mean the actual error log? that was the actual error log, just the same thing over and over again in 4.487 lines with the same error each log

bad_boy 12-16-2019 12:43

Re: Saved ya
 
Quote:

Originally Posted by tarsisd2 (Post 2676735)
PHP Code:

L 12/12/2019 12:51:28Start of error session.
L 12/12/2019 12:51:28Info (map "de_dust2") (file "addons/amxmodx/logs/error_20191212.log")
L 12/12/2019 12:51:28: [ENGINEInvalid player 12 (not in-game)
L 12/12/2019 12:51:28: [AMXXDisplaying debug trace (plugin "saved_ya.amxx"version "1.0")
L 12/12/2019 12:51:28: [AMXXRun time error 10native error (native "is_visible")
L 12/12/2019 12:51:28: [AMXX]    [0saved_ya.sma::client_PreThink (line 122



I think your problem might be coming from this, the teams are backwards.
Code:

(get_user_team(id) == 1) ? "CT" : "TERRORIST")
change ------>
(get_user_team(id) == 1) ? "TERRORIST" : "CT")


EFFx 12-19-2019 16:03

Re: Saved ya
 
There's nothing to do with that, with that check, i'm trying to see if there's more than one player on the enemy team, so if I try to shot one, the other teammate will be able to save him.

@tarsisd2, try the new code, this error may have been fixed.

EFFx 06-22-2022 05:17

Re: Saved ya
 
Added a little forward to detect when someone saves anybody, so people can give custom rewards ^^.

PHP Code:

/*
* @iKiller                        who saved
* @iTeammateID             who got saved
* @iVictimID                   who got killed
*/
saved_ya(iKilleriTeammateIDiVictimID



All times are GMT -4. The time now is 06:31.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.