Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Florin Calinescu on Jan 07, 2016, 12:48 PM

Title: Crash
Post by: Florin Calinescu on Jan 07, 2016, 12:48 PM
The title says it all.The server crashes when using a command.
www.youtube.com/watch?v=N8nf5HL_bK4&feature=youtu.be (http://www.youtube.com/watch?v=N8nf5HL_bK4&feature=youtu.be)
Title: Re: Crash
Post by: MacTavish on Jan 07, 2016, 01:08 PM
This problem have been explained many times that a timer couldnt pass player instance

Use player.ID instead player in timer
NewTimer("YourFun",2000,1,player.ID);
And in function
function YourFun(id)
{
local player = FindPlayer(id);
if(player) MessagePlayer("hasta la vesta, it worked",player);
else return;
}
Title: Re: Crash
Post by: Florin Calinescu on Jan 07, 2016, 02:01 PM
Alright it works now thank you