AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set_speak wrong player id problem (https://forums.alliedmods.net/showthread.php?t=95113)

Owyn 06-19-2009 15:56

set_speak wrong player id problem
 
hi, have some weird problem:

PHP Code:

L 06/19/2009 23:50:27: [ENGINEInvalid player 1
L 06
/19/2009 23:50:27: [AMXXDisplaying debug trace (plugin "my_plugin.amxx")
L 06/19/2009 23:50:27: [AMXXRun time error 10native error (native "set_speak")
L 06/19/2009 23:50:27: [AMXX]    [0my_plugin.sma::client_authorized (line 485

PHP Code:

public client_authorized(client)
{
      
client_cmd(client"-voicerecord");
      
set_speak(clientSPEAK_MUTED);


and client_cmd works fine but set_speak says wrong player id, and same code works fine for client_putinserver :crab:

Arkshine 06-19-2009 16:04

Re: set_speak wrong player id problem
 
Since '1' is a valid player's index, it means that player is not in the game yet.

Exolent[jNr] 06-19-2009 16:12

Re: set_speak wrong player id problem
 
http://www.amxmodx.org/funcwiki.php?...ized&go=search

Quote:

Quoting am26647, bail said:

"client_putinserver and client_authorized are not guaranteed to happen in any particular order."

Owyn 06-19-2009 16:29

Re: set_speak wrong player id problem
 
but in admin super gag plugin set_speak is executed in the client_connected and it is before client_athrozed isn't it? or client is in game then he's not then he is again during connecting?

Arkshine 06-19-2009 16:39

Re: set_speak wrong player id problem
 
In AdminSuper, it is executed in client_putinserver()


All times are GMT -4. The time now is 15:29.

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