I had this line
Code: [Select] in VcmpPluginInit.
But my OnPlayerConnect was not calling. I was also confused, since i had a problem with OnPlayerJoin
Code: [Select] When i join, i saw two messagesQuote Finally, i came to the conclusion that the squirrel gamemode which i am using may also have OnPlayerConnect function and my plugin (which i am making) is calling squirrel's OnPlayerConnect instead of mine.
I was able to solve the problem by renaming my OnPlayerConnect to OnPlayerConnect2 and
Code: [Select]
This happened in linux only.(i.e. i was making a .so plugin)
pluginCalls->OnPlayerConnect = OnPlayerConnect;
But my OnPlayerConnect was not calling. I was also confused, since i had a problem with OnPlayerJoin
function onPlayerJoin(player)
{
if(player.IP=="127.0.0.1")
{
player.IsAdmin=true;
MessagePlayer("Admin status granted to 127.0.0.1 "+player.Name,player);
}
}
Admin status granted to 127.0.0.1
Admin status granted to 127.0.0.1
I was able to solve the problem by renaming my OnPlayerConnect to OnPlayerConnect2 and
pluginCalls->OnPlayerConnect = OnPlayerConnect2;
This happened in linux only.(i.e. i was making a .so plugin)