First steps in Sp
Posted: Mon Feb 11, 2013 12:33 pm
Hay,
I want start to learn SP. But the first problem is to send an message o an player.
If a player joins, the whole server crashes with with the error "MESSAGE_END called with no active message".
A secound Question is, whats up with the wiki? Is there a way to restore it?
I want start to learn SP. But the first problem is to send an message o an player.
Syntax: Select all
from Source import Player
from Source import Engine
from messages import chat
from events import Event
@Event
def player_spawn(GameEvent):
# Chat Messages
userid = GameEvent.GetInt('userid')
player = Player.EdictOfUserid(userid)
index = Engine.IndexOfEdict(player)
chat(index, 'Test')
If a player joins, the whole server crashes with with the error "MESSAGE_END called with no active message".
A secound Question is, whats up with the wiki? Is there a way to restore it?