Hey leute
habe ein Frak. Chat geschrieben. Wenn die im script sind können viele teleports von mir nicht ausgeführt werden
wie z.b. /aa oder sonst was ..?!
SCRIPT:
if(strcmp(cmdtext,"/g",true,7) == 0)
{
new string[128],name[24];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"TEAM GROVE %s: %s",name,cmdtext[3]);
if(!strlen(cmdtext[2]))
{
SendClientMessage(playerid,COLOR_RED," /g [text]");
return 1;
}
if(gTeam[playerid] == TEAM_GROVE || gTeam[playerid] == TEAM_GROVE)
{
for(new i=0 ; i <GetMaxPlayers() ; i++)
{
if(gTeam[i] == TEAM_GROVE || gTeam[i] == TEAM_GROVE)
{
SendClientMessage(i,COLOR_GREEN,string);
}
}
}
return 1;
}
if(strcmp(cmdtext,"/b",true,1) == 0)
{
new string[128],name[24];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"TEAM BALLAS %s: %s",name,cmdtext[3]);
if(!strlen(cmdtext[2]))
{
SendClientMessage(playerid,COLOR_RED," /b [text]");
return 1;
}
if(gTeam[playerid] == TEAM_BALLAS || gTeam[playerid] == TEAM_BALLAS)
{
for(new i=0 ; i <GetMaxPlayers() ; i++)
{
if(gTeam[i] == TEAM_BALLAS || gTeam[i] == TEAM_BALLAS)
{
SendClientMessage(i,COLOR_PINK,string);
}
}
}
return 1;
}
if(strcmp(cmdtext,"/c",true,2) == 0)
{
new string[128],name[24];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"TEAM FBI %s: %s, over",name,cmdtext[3]);
if(!strlen(cmdtext[2]))
{
SendClientMessage(playerid,COLOR_RED," /c [text]");
return 1;
}
if(gTeam[playerid] == TEAM_COPS || gTeam[playerid] == TEAM_COPS)
{
for(new i=0 ; i <GetMaxPlayers() ; i++)
{
if(gTeam[i] == TEAM_COPS || gTeam[i] == TEAM_COPS)
{
SendClientMessage(i,COLOR_MEDIUMAQUA,string);
}
}
}
return 1;
}
if(strcmp(cmdtext,"/az",true,3) == 0)
{
new string[128],name[24];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"TEAM AZTEC %s: %s",name,cmdtext[3]);
if(!strlen(cmdtext[2]))
{
SendClientMessage(playerid,COLOR_RED," /az [text]");
return 1;
}
if(gTeam[playerid] == TEAM_AZTEC || gTeam[playerid] == TEAM_AZTEC)
{
for(new i=0 ; i <GetMaxPlayers() ; i++)
{
if(gTeam[i] == TEAM_AZTEC || gTeam[i] == TEAM_AZTEC)
{
SendClientMessage(i,COLOR_BLUE,string);
}
}
}
return 1;
}
if(strcmp(cmdtext,"/va",true,4) == 0)
{
new string[128],name[24];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"TEAM VAGOS %s: %s",name,cmdtext[3]);
if(!strlen(cmdtext[2]))
{
SendClientMessage(playerid,COLOR_RED," /va [text]");
return 1;
}
if(gTeam[playerid] == TEAM_VAGOS || gTeam[playerid] == TEAM_VAGOS)
{
for(new i=0 ; i <GetMaxPlayers() ; i++)
{
if(gTeam[i] == TEAM_VAGOS || gTeam[i] == TEAM_VAGOS)
{
SendClientMessage(i,COLOR_YELLOW,string);
}
}
}
return 1;
}
if(strcmp(cmdtext,"/t",true,5) == 0)
{
new string[128],name[24];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"TEAM TRIAD %s: %s",name,cmdtext[3]);
if(!strlen(cmdtext[2]))
{
SendClientMessage(playerid,COLOR_RED," /t [text]");
return 1;
}
if(gTeam[playerid] == TEAM_TRIAD || gTeam[playerid] == TEAM_TRIAD)
{
for(new i=0 ; i <GetMaxPlayers() ; i++)
{
if(gTeam[i] == TEAM_TRIAD || gTeam[i] == TEAM_TRIAD)
{
SendClientMessage(i,COLOR_WHITE,string);
}
}
}
return 1;
}
if(strcmp(cmdtext,"/s",true,6) == 0)
{
new string[128],name[24];
GetPlayerName(playerid,name,sizeof name);
format(string,sizeof string,"TEAM STUNTERS %s: %s",name,cmdtext[3]);
if(!strlen(cmdtext[2]))
{
SendClientMessage(playerid,COLOR_RED," /s [text]");
return 1;
}
if(gTeam[playerid] == TEAM_ADMIN || gTeam[playerid] == TEAM_ADMIN)
{
for(new i=0 ; i <GetMaxPlayers() ; i++)
{
if(gTeam[i] == TEAM_ADMIN || gTeam[i] == TEAM_ADMIN)
{
SendClientMessage(i,COLOR_ORANGE,string);
}
}
}
return 1;
}
beispiel teleport script:
if(!strcmp(cmdtext, "/aa", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), 284.668945, 2470.728515, 16.474884);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 59.486660);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
}
else
{
SetPlayerPos(playerid, 284.668945, 2470.728515, 16.474884);
SetPlayerFacingAngle(playerid, 59.486660);
}
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Old Airport!");
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "TELE: %s portet sich zu Old Airport (/aa)", pName);
SendClientMessageToAll(COLOR_YELLOW, string);
return 1;
}
Wo ist das Probl.?