Jump to content

Deathspawn script


Hogan1996

Recommended Posts

Keep getting these errors I've looked over the script but I can't seem to fix the problem, any help?

Screenshot of MTA Server: http://prntscr.com/p40hk0

Script
 

local spawnX, spawnY, spawnZ = 1769.55469, -1862.20325, 13.57658

function spawnThePlayer(player)
    spawnThePlayer(source)
    fadeCamera(source, true) 
    setCameraTarget(source) 
    outputChatBox("You have been Murdered.", source)
end
addEventHandler ("onPlayerWasted", getRootElement()     

You can add me on Discord or reply here on the post.
Discord:FrankHogan#2619

Thank you.

Link to comment
  • Scripting Moderators

Issue:

addEventHandler ("onPlayerWasted", getRootElement()

Fixed:

addEventHandler("onPlayerWasted", getRootElement(), spawnThePlayer)

You should start reading what debug says.

Edit: Besides, this event doesn't have such parameter as player.

Read carefully - https://wiki.multitheftauto.com/wiki/OnPlayerWasted

Edited by majqq
Link to comment
  • 3 weeks later...
local spawnX, spawnY, spawnZ = 1769.55469, -1862.20325, 13.57658

function spawnThePlayer(player)
    spawnPlayer(player, spawnX, spawnY, spawnZ)
    fadeCamera(player, true) 
    setCameraTarget(player) 
    outputChatBox("You have been Murdered.", player)
end
addEventHandler ("onPlayerWasted", getRootElement(), spawnThePlayer)    

 

Link to comment

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...