Jump to content
  • 0

RACE "Enter/Exit - Kill player" dosent work


acp___(PL)

Question

6 answers to this question

Recommended Posts

  • 0
Posted
"Enter/Exit - Kill player" doesnt work

enterexit.jpg

Assuming you have created that event, you need to add true as the second argument in the addEvent call.

Do NOT PM ME for help unless invited. - New MTA Script Editor

Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.

  • 0
Posted

thought that after uploading the new files (mainly the resource RACE) function will work

I was wrong ...

race.zip/race_client.lua

---------------------------------------------------------------------------
--
-- Commands and binds
--
--
--
---------------------------------------------------------------------------
 
 
function kill()
if Spectate.active then
	if Spectate.savePos then
		triggerServerEvent('onClientRequestSpectate', g_Me, false )
	end
   else
	triggerServerEvent('onRequestKillPlayer', g_Me)
end
end
addCommandHandler('kill',kill)
addCommandHandler('Commit suicide',kill)
bindKey ( next(getBoundKeys"enter_exit"), "down", "Commit suicide" )
 
--[[bindKey('enter_exit', 'down',
   function()
	if Spectate.active then
   		if Spectate.savePos then
			triggerServerEvent('onClientRequestSpectate', g_Me, false )
   		end
       else
        triggerServerEvent('onRequestKillPlayer', g_Me)
	end
   end
)]]
 
 
--[[bindKey('b', 'down',
   function()
    if not g_PlayerInfo.testing and not g_PlayerInfo.admin then
	    return
    end
    if Spectate.active then
   		if Spectate.savePos then
			triggerServerEvent('onClientRequestSpectate', g_Me, false )
   		end
    else
		triggerServerEvent('onClientRequestSpectate', g_Me, true )
    end
   end
)]]
 
 
 
function spectate()
if not g_PlayerInfo.testing and not g_PlayerInfo.admin then
	return
end
   if Spectate.active then
	if Spectate.savePos then
		triggerServerEvent('onClientRequestSpectate', g_Me, false )
	end
   else
	triggerServerEvent('onClientRequestSpectate', g_Me, true )
   end
end
addCommandHandler('spectate',spectate)
addCommandHandler('Toggle spectator',spectate)
bindKey("b","down","Toggle spectator")
 
function setPipeDebug(bOn)
   g_bPipeDebug = bOn
   outputConsole( 'bPipeDebug set to ' .. tostring(g_bPipeDebug) )
end

Server logs:

[22:06:56] ERROR: Client triggered serverside event onRequestKillPlayer, but event is not marked as remotly triggerable

Edit: 2009.09.16 22:40

"Enter/Exit - Kill player" doesnt work

enterexit.jpg

Assuming you have created that event, you need to add true as the second argument in the addEvent call.

line 16 my previous post

triggerServerEvent('onRequestKillPlayer', g_Me, true)

nothing changes

2paq MTA:SA Race Serwer PL [http://www.2paq.ugu.pl]

YouTube HD - advertisement my server: [

]

Polski wątek mojego serwera na forum.mtasa.com [http://forum.mtasa.com/viewtopic.php?f=124&t=31657]

acp___3.gif

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...