31.03.2010, 12:53
Hey guys!
(I am a newby)
I have got a nasty problem: tk'ers.
Players in the same team can kill each other on my server.
Here my idea:
I set the team of the player when he select the Class X.
And set the team directly when he spawns
But sometimes, they can kill each other..
why ??![Sad](images/smilies/sad.gif)
PS: I solved the problem with a kick(playerid); in OnPlayerDeath(playerid,killerid,reason): if(teamid[..]==teamid[..]) kick(..);
But .. thats not very nice =/
(I am a newby)
I have got a nasty problem: tk'ers.
Players in the same team can kill each other on my server.
Here my idea:
I set the team of the player when he select the Class X.
Код:
public OnPlayerRequestClass(playerid,classid) { switch(classid) { // ..... case 0: // Army { //... teamid[playerid]=0; } } }
Код:
public OnPlayerSpawn(playerid) { switch(teamid[playerid]) { // ..... case 0: // Army { //... SetPlayerTeam(playerid, 0); } } }
why ??
![Sad](images/smilies/sad.gif)
PS: I solved the problem with a kick(playerid); in OnPlayerDeath(playerid,killerid,reason): if(teamid[..]==teamid[..]) kick(..);
But .. thats not very nice =/