16.02.2014, 15:16
Hello,
I'm working on a gamemode, but there are some problems.
This is one of them, i hope you can help me fixing this .
When a player is logged in he has to choose a team, and if we clicks the spawn it works fine.
But I want to send a message to all players to tell them he joined a class.
My code:
Butt it gives messages while switching to see with kind of classes there are..
Can someone help?
Thankyou!
I'm working on a gamemode, but there are some problems.
This is one of them, i hope you can help me fixing this .
When a player is logged in he has to choose a team, and if we clicks the spawn it works fine.
But I want to send a message to all players to tell them he joined a class.
My code:
Код:
public OnPlayerRequestClass(playerid, classid) { SetPlayerPos(playerid, 180.892608, 1830.717895, 23.242187); SetPlayerFacingAngle(playerid, 255.810241); SetPlayerCameraLookAt(playerid, 180.892608, 1830.717895, 23.242187); SetPlayerCameraPos(playerid, 180.892608 + (5 * floatsin(-255.810241, degrees)), 1830.717895 + (5 * floatcos(-255.810241, degrees)), 23.242187); switch(classid) { case 0: { SetPlayerTeam(playerid, TEAMRed); SendClientMessageToAll(COLOR_RED, "I will write a message here"); GameTextForPlayer(playerid, "~r~Red", 1000, 3); } case 1: { SetPlayerTeam(playerid, TEAMBlue); SendClientMessageToAll(COLOR_BLUE, "I will write a message here"); GameTextForPlayer(playerid, "~b~Blue", 1000, 3); } } return 1; }
Can someone help?
Thankyou!