'LinKin Posted October 4, 2014 Posted October 4, 2014 Hello, I have this: addEventHandler("onClientPlayerWasted", root, function() setTimer(function(thePlayer) if isPedDead(thePlayer) then outputChatBox(getPlayerName(thePlayer).." isDead") else outputChatBox(getPlayerName(thePlayer).." isNotDead") end end, 2000, 1, source) end) When I'm alone in the server (Destruction Derby game-mode) and I die, it shows that I'm dead. So it's right. But when I'm not alone in the server and I die, it says that I am NOT dead.. If other player dies, it works OK, it shows that he's dead, but it seems it just doesn't work with me, why? Thanks. EDIT: I have tried by changing the timer's execution time. It seems that anything >= 2000 won't work. While anything < 2000 would work flawlessly. But I still wonder; Why with other players it works no matter what? (I tried setting the timer to 4000 ms and it still worked for other players). This script is client-side (obviously), do you think that the Laptop that I'm currently using is causing the trouble? because I don't really see any other reason. Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
darhal Posted October 4, 2014 Posted October 4, 2014 Use this code server side better ! #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
'LinKin Posted October 4, 2014 Author Posted October 4, 2014 It wouldn't work for what I'm scripting it for. Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
Anubhav Posted October 4, 2014 Posted October 4, 2014 Oh god how would it work even? You have a extra end, addEventHandler("onClientPlayerWasted", root, function() setTimer(function(thePlayer) if isPedDead(thePlayer) then outputChatBox(getPlayerName(thePlayer).." isDead") else outputChatBox(getPlayerName(thePlayer).." isNotDead") end end, 2000, 1, source) ) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
darhal Posted October 4, 2014 Posted October 4, 2014 Omg anubhav why you give him wrong information where is the end of the line 4 function ! His code is correct #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
Anubhav Posted October 4, 2014 Posted October 4, 2014 Whoops din't see the function, sorry! See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
darhal Posted October 4, 2014 Posted October 4, 2014 Nope but becareful next time ! #include <iostream> int main() { std::cout << "C++ is amazing <3" << std::endl; return 0; } I left MTA !... I m doing some tuts about (servers and scripting here) subscribe please
Anubhav Posted October 4, 2014 Posted October 4, 2014 Try using this addEventHandler("onClientPlayerWasted", localPlayer, function() setTimer(function(thePlayer) if isPedDead(thePlayer) then outputChatBox(getPlayerName(thePlayer).." isDead") else outputChatBox(getPlayerName(thePlayer).." isNotDead") end end, 2000, 1, source) ) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now