acrobite
Участник
- Сообщения
- 182
- Реакции
- 33
Можете исправить?PHP:#include <sourcemod> #include <cstrike> #pragma semicolon 1 #pragma newdecls required public void OnPluginStart() { HookEvent("player_death",Event_Death, EventHookMode_Post); } public Action Event_Death(Event hEvent, const char[] name, bool dontBroadcast){ int iClient = GetClientOfUserId(hEvent.GetInt("userid")); if(iClient) CreateTimer(0.5, Timer_Respawn, GetClientUserId(iClient), TIMER_FLAG_NO_MAPCHANGE); //Вместо 0.5 ваше время return Plugin_Continue; } public Action Timer_Respawn(Handle hT, int client) { int iClient = GetClientOfUserId(client); if(IsClientInGame(iClient) && GetClientTeam(iClient) != 0) CS_RespawnPlayer(iClient); KillTimer(hT); return Plugin_Handled; }
L 05/09/2018 - 21:29:58: [SM] Exception reported: Client index 0 is invalid
L 05/09/2018 - 21:29:58: [SM] Blaming: autoresp_dm.smx
L 05/09/2018 - 21:29:58: [SM] Call stack trace:
L 05/09/2018 - 21:29:58: [SM] [0] IsClientInGame
L 05/09/2018 - 21:29:58: [SM] [1] Line 22, C:\addons\sourcemod\scripting\autoresp_dm.sp::Timer_Respawn
L 05/09/2018 - 21:29:58: [SM] Blaming: autoresp_dm.smx
L 05/09/2018 - 21:29:58: [SM] Call stack trace:
L 05/09/2018 - 21:29:58: [SM] [0] IsClientInGame
L 05/09/2018 - 21:29:58: [SM] [1] Line 22, C:\addons\sourcemod\scripting\autoresp_dm.sp::Timer_Respawn