Guten Abend Community,
ich habe Teams erstellt:
#define TEAM_Zivi 0
#define TEAM_Ballas 1
#define TEAM_Grove 2
//player
AddPlayerClassEx(0,0,-2027.6523,169.5038,28.8359,272.0175,24,35,18,35,33,55);//Team Zivi
AddPlayerClassEx(0,101,-2027.6523,169.5038,28.8359,272.0175,32,400,28,350,26,55);//Team Zivi
AddPlayerClassEx(0,12,-2027.6523,169.5038,28.8359,272.0175,23,30,16,32,32,400);//Team Zivi
AddPlayerClassEx(0,13,-2027.6523,169.5038,28.8359,272.0175,29,400,18,30,33,55);//Team Zivi
AddPlayerClassEx(0,14,-2027.6523,169.5038,28.8359,272.0175,42,760,39,55,40,1);//Team Zivi
AddPlayerClassEx(0,15,-2027.6523,169.5038,28.8359,272.0175,22,55,25,35,33,55);//Team Zivi
AddPlayerClassEx(0,17,-2027.6523,169.5038,28.8359,272.0175,32,400,33,32,6,1);//Team Zivi
AddPlayerClassEx(0,188,-2027.6523,169.5038,28.8359,272.0175,4,1,18,35,27,35);//Team Zivi
AddPlayerClassEx(0,185,-2027.6523,169.5038,28.8359,272.0175,42,500,16,35,32,420);//Team Zivi
AddPlayerClassEx(0,20,-2027.6523,169.5038,28.8359,272.0175,23,30,22,40,24,30);//Team Zivi
AddPlayerClassEx(1,102,-2187.6216,961.4089,80.0000,358.3237,16,40,26,40,28,450);//Team Ballas
AddPlayerClassEx(1,103,-2187.6216,961.4089,80.0000,358.3237,18,40,27,25,30,450);//Team Ballas
AddPlayerClassEx(1,104,-2187.6216,961.4089,80.0000,358.3237,30,400,28,400,22,40);//Team Ballas
AddPlayerClassEx(2,105,-2135.5815,-247.7491,36.0811,270.0839,16,40,26,40,28,450);//Team Grove
AddPlayerClassEx(2,106,-2135.5815,-247.7491,36.0811,270.0839,18,40,27,25,30,450);//Team Grove
AddPlayerClassEx(2,107,-2135.5815,-247.7491,36.0811,270.0839,30,400,28,400,22,40);//Team Grove
switch(classid)
{
case 0: gTeam[playerid] = TEAM_Zivi;
case 101: gTeam[playerid] = TEAM_Zivi;
case 12: gTeam[playerid] = TEAM_Zivi;
case 13: gTeam[playerid] = TEAM_Zivi;
case 14: gTeam[playerid] = TEAM_Zivi;
case 15: gTeam[playerid] = TEAM_Zivi;
case 17: gTeam[playerid] = TEAM_Zivi;
case 188: gTeam[playerid] = TEAM_Zivi;
case 185: gTeam[playerid] = TEAM_Zivi;
case 20: gTeam[playerid] = TEAM_Zivi;
case 102: gTeam[playerid] = TEAM_Ballas;
case 103: gTeam[playerid] = TEAM_Ballas;
case 104: gTeam[playerid] = TEAM_Ballas;
case 105: gTeam[playerid] = TEAM_Grove;
case 106: gTeam[playerid] = TEAM_Grove;
case 107: gTeam[playerid] = TEAM_Grove;
}
//Team Color
if(gTeam[playerid] == TEAM_Zivi)
{
SetPlayerColor(playerid, BLAU);
}
if(gTeam[playerid] == TEAM_Ballas)
{
SetPlayerColor(playerid, GRAU);
}
if(gTeam[playerid] == TEAM_Grove)
{
SetPlayerColor(playerid, GRUEN);
}
nun habe ich befehle erstellt, für das team ballas, grove und zivi:
if(strcmp("/teamzivi", cmdtext, true, 10) == 0)
{
if(gTeam[playerid] == TEAM_Zivi)
{
SendClientMessage(playerid, ROT, "---------------ZIVI-Help--------------");
SendClientMessage(playerid, BLAU, "Mit /zivinitro bekommst du kostenlos Nitro.");
SendClientMessage(playerid, ROT, "---------------ZIVI-Help--------------");
return 1;
}
else
{
SendClientMessage(playerid,ROT,"Dies kann nur das Team Zivi!");
}
return 1;
}
if(strcmp("/teamgrove", cmdtext, true, 10) == 0)
{
if(gTeam[playerid] == TEAM_Grove)
{
SendClientMessage(playerid, ROT, "---------------GROVE-Help--------------");
SendClientMessage(playerid, BLAU, "Mit /grovenitro bekommst du kostenlos Nitro.");
SendClientMessage(playerid, ROT, "---------------GROVE-Help--------------");
return 1;
}
else
{
SendClientMessage(playerid,ROT,"Dies kann nur das Team Grove!");
}
return 1;
}
if(strcmp("/teamballas", cmdtext, true, 10) == 0)
{
if(gTeam[playerid] == TEAM_Ballas)
{
SendClientMessage(playerid, ROT, "---------------BALLAS-Help--------------");
SendClientMessage(playerid, BLAU, "Mit /ballasnitro bekommst du kostenlos Nitro.");
SendClientMessage(playerid, ROT, "---------------BALLAS-Help--------------");
return 1;
}
else
{
SendClientMessage(playerid,ROT,"Dies kann nur das Team Ballas!");
}
return 1;
}
mein Problem:
wenn ich als zivi oder als ballas oder grove usw. den befehl /teamzivi (der eig. nur fürs team ZIVI ist) eingebe, kommt er trotzdem, obwohl er eigentlich auch nur beim team zivi kommen soll.
>Aber das macht er nicht.
Bitte helft mir.
Danke im vorraus
Scripter4.0