hallo leute!
ich habe teams mit gteam erstellt. unzwar hab ich folgendes gemacht:
new gTeam[MAX_PLAYERS];
#define TEAM_GROVE 0
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0,1,2: gTeam[playerid] = TEAM_GROVE;
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(gTeam[playerid] == TEAM_GROVE)
if(IsPlayerInRangeOfPoint(playerid,1,2495.3301,-1690.2500,14.7656))
{
SetPlayerPos(playerid,2496.0500,-1692.9301,1014.7422);
SetPlayerInterior(playerid, 3);
}
return 1;
}
if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(gTeam[playerid] == TEAM_GROVE)
if(IsPlayerInRangeOfPoint(playerid,1,2496.0500,-1692.9301,1014.7422))
{
SetPlayerPos(playerid,2495.3301,-1690.2500,14.7656);
SetPlayerInterior(playerid, 0);
}
return 1;
}
return 0;
}
aber trotzdem kann jedes team diesen command! wo ist der fehler?
bitte helft mir!