habe probleme bei den commands undzwar bei dem hier
public OnPlayerText(playerid, text[])
{
ocmd:navi(playerid,params[])
{
if(GetPVarInt(playerid,"Navik")==1)
{
ShowPlayerDialog(playerid,DIALOG_NAVI, DIALOG_STYLE_LIST, "Orte", "Fahrschule\nBSN\nJobcenter\nAusschalten", "Weiter", "Schließen");
}
if(GetPVarInt(playerid,"Navik")==0)
{
SendClientMessage(playerid,ROT,"Du hast dir noch kein Navi gekauft gehe in einen 24/7 Shop um dir ein Navi zu kaufen.");
}
return 1;
}
ocmd:mp3(playerid,params[])
{
if(GetPVarInt(playerid,"MP3K")==1)
{
ShowPlayerDialog(playerid, DIALOG_MP3K, DIALOG_STYLE_LIST, "Mp3-Player", "{66FF00}ClubTime.FM\n{66FF00}TechnoBase.FM\n{66FF00}HouseTime.FM\n{66FF00}HardBase.FM\n{66FF00}TranceBase.FM\n{66FF00}CoreTime.FM\n{66FF00}BlackBeats.FM\n{66FF00}Techno4Ever.main\n{66FF00}Techno4Ever.club\n{66FF00}Techno4Ever.hard\n{66FF00}YouFm\n{66FF00}YouFm.rock\n{66FF00}YouFm.club\n{66FF00}YouFm.black\n{FF334D}Mp3-Player ausschalten", "Einschalten", "Abbrechen");
}
if(GetPVarInt(playerid,"MP3K")==0)
{
SendClientMessage(playerid,ROT,"Du hast dir noch kein Mp3-Player gekauft gehe in einen 24/7 Shop um dir ein Mp3-Player zu kaufen.");
}
return 1;
}
ocmd:shop(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,1,-29.0376,-184.3537,1003.5469))
{
ShowPlayerDialog(playerid,DIALOG_SHOP, DIALOG_STYLE_LIST, "27/7 Shop", "Navi 250$\nMp3-Player 50$", "Kaufen", "Schließen");
}
else
{SendClientMessage(playerid,ROT,"Du bist in keinem 24/7 Shop.");}
return 1;
}
ocmd:f(playerid,params[])
{
new text[128];
if(sscanf(params,"s",text))return SendClientMessage(playerid,ROT,"/f [text]");
format(text,sizeof(text),"Member %s: %s",SpielerName(playerid),text);
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(isPlayerInFrakt(i,pInfo[playerid][Fraktion]))
{
SendClientMessage(i,BLAU,text);
}
}
}
return 1;
}
ocmd:setadmin(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,ROT,"Du bist kein Admin oder dein Rang ist nicht hoch genug.");
new pID, rank;
if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,ROT,"/setadmin [spieler] [level]");
if(rank<1||rank>3)return SendClientMessage(playerid,ROT,"Bitte gültigen Rang angeben.");
SetPVarInt(pID,"Adminlevel",rank);
SpielerSpeichern(pID);
SendClientMessageToAll(BLAU,"Es wurde jemand zu Admin gemacht.");
return 1;
}
ocmd:veh(playerid,params[])
{
new ModelID, color[2],Float:VehPos[4], vehicleid;
if(GetPlayerState(playerid)!=PLAYER_STATE_ONFOOT) return SendClientMessage(playerid,ROT,"Du bist nicht zu Fuss");
if(sscanf(params, "ddd",ModelID,color[0],color[1])) return SendClientMessage(playerid,BLAU, "/veh [vehicleid] [color1] [color2]");
if(ModelID < 400 || ModelID > 611) return SendClientMessage(playerid,ROT, "Die Fahrzeug Id muss von 400 bis 611 sein");
if(color[0] < 0 || color[0] > 126 || color[1] < 0 || color[1] > 126) return SendClientMessage(playerid,ROT, "Die Farbid muss zwischen 0 und 126 liegen.");
if(isPlayerAnAdmin(playerid,2) || CallRemoteFunction("PlayerIsAnAdmin","i",playerid))
{
GetPlayerPos(playerid, VehPos[0],VehPos[1],VehPos[2]);
GetPlayerFacingAngle(playerid, VehPos[3]);
vehicleid = CreateVehicle(ModelID,VehPos[0],VehPos[1],VehPos[2],VehPos[3],color[0],color[1],-1);
LinkVehicleToInterior(vehicleid,GetPlayerInterior(playerid));
SetVehicleVirtualWorld(vehicleid,GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid, vehicleid, 0);
}
else return SendClientMessage(playerid, ROT, "Du bist kein Admin!");
return 1;
}
ocmd:desveh(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,2))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
new v;
if(sscanf(params,"i",v))return SendClientMessage(playerid,BLAU,"/desveh [Vehicle ID]");
DestroyVehicle (v);
return 1;
}
ocmd:ban(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
new pID, reason[128],string[128];
if(sscanf(params,"us",pID,reason))return SendClientMessage(playerid,BLAU,"/ban [id] [grund]");
format(string,sizeof(string),"Admin: %s wurde von %s gebannt. Grund: %s",SpielerName(pID),SpielerName(playerid),reason);
SendClientMessageToAll(ROT,string);
pInfo[pID][Bann] = 1;
Ban(pID);
return 1;
}
ocmd:atm(playerid,params[])
{
ShowPlayerDialog(playerid,Bankmenu,DIALOG_STYLE_LIST,"Transaktionen","Einzahlen\nAuszahlen\nKontostand\nÜberweisung","Wählen","Beenden");
return 1;
}
ocmd:suchen(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
new pID, str[128], Float:X,Float:Y,Float:Z;
if(sscanf(params, "d",pID))return SendClientMessage(playerid,BLAU,"/suchen [id]");
if(!IsPlayerConnected(pID))return SendClientMessage(playerid,BLAU,"Dieser Spieler ist nicht online!");
{
GetPlayerPos(pID, X,Y,Z);
SetPlayerCheckpoint(playerid, X,Y,Z, 6);
format(str,sizeof(str),"Du hast die Position von %s geortet!",SpielerName(pID));
SendClientMessage(playerid,0x00A8FFFF,str);
}
return 1;
}
ocmd:tp(playerid,params[])
{
new pID;
if(sscanf(params,"u",pID))return SendClientMessage(playerid,BLAU,"/tp [ID]");
if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
new Float:x,Float:y,Float:z;
GetPlayerPos(pID,x,y,z);
SetPlayerPos(playerid,x,y,z);
return 1;
}
ocmd:tphere(playerid,params[])
{
new pID;
if(sscanf(params,"u",pID))return SendClientMessage(playerid,BLAU,"/tphere [ID]");
if(!isPlayerAnAdmin(playerid,2))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(pID,x,y,z);
return 1;
}
ocmd:a(playerid,params[])
{
new Text[50];
if(sscanf(params,"s",Text))return SendClientMessage(playerid,BLAU,"/a [Text]");
if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
new name[16];
GetPlayerName(playerid,name,16);
new string[128];
format(string,128,"[Admin-Chat] %s : %s",name,Text);
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerAdmin(i))
{
SendClientMessage(playerid,COLOR_YELLOW,string);
}
return 1;
}
return 1;
}
ocmd:freeze(playerid,params[])
{
new pID;
if(sscanf(params,"u",pID))return SendClientMessage(playerid,BLAU,"/freeze [ID]");
if(!isPlayerAnAdmin(playerid,2))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
TogglePlayerControllable(pID,0);
SendClientMessage(pID,ROT,"Ein Admin hat dich eingefroren!");
SendClientMessage(playerid,BLAU,"Erfolgreich eingefroren!");
return 1;
}
ocmd:unfreeze(playerid,params[])
{
new pID;
if(sscanf(params,"u",pID))return SendClientMessage(playerid,BLAU,"/unfreeze [ID]");
if(!isPlayerAnAdmin(playerid,2))return SendClientMessage(playerid,ROT,"Du bist kein Admin!");
TogglePlayerControllable(pID,1);
SendClientMessage(pID,BLAU,"Ein Admin hat dich ausgefroren!");
SendClientMessage(playerid,BLAU,"Erfolgreich ausgefroren!");
return 1;
}
ocmd:admhelp(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,ROT,"Du bist kein Admin oder dein Rang ist nicht hoch genug.");
SendClientMessage(playerid,BLAU,"(---------------------------------------------)");
SendClientMessage(playerid,BLAU,"|Rang 1:/suchen,/kick,/tp,/a------------------|");
SendClientMessage(playerid,BLAU,"|Rang 2:/veh,/desveh,/tphere,/freeze,/unfreeze|");
SendClientMessage(playerid,BLAU,"|Rang 3:/ban,/setfrak,/setadmin---------------|");
SendClientMessage(playerid,BLAU,"(---------------------------------------------)");
return 1;
}
ocmd:kick(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Du bist kein Admin oder dein Rang ist nicht hoch genug.");
new pID, reason[128],string[128];
if(sscanf(params,"us",pID,reason))return SendClientMessage(playerid,BLAU,"/kick [id] [grund]");
format(string,sizeof(string),"AdmCmd: %s wurde von %s gekickt. Grund: %s",SpielerName(pID),SpielerName(playerid),reason);
SendClientMessageToAll(ROT,string);
Kick(pID);
return 1;
}
ocmd:setwanted(playerid,params[])
{
if(pInfo[playerid][Fraktion] != 1 && pInfo[playerid][Fraktion] != 5 && pInfo[playerid][Fraktion] != 4)return SendClientMessage(playerid,ROT,"Du bist kein FBI/Cop");
if(GetPVarInt(playerid,"Duty")==0)return SendClientMessage(playerid,ROT,"Du bist nicht im Dienst!");
new pID,grund[128],string[128];
if(sscanf(params,"is",pID,grund))return SendClientMessage(playerid,BLAU,"/setwanted [id] [grund]");
format(string,sizeof(string),"Du hast ein Wanted von ID:%d bekommen! Grund: %s",playerid,grund);
SendClientMessage(pID,ROT,string);
format(string,sizeof(string),"Du hast ID:%d ein Wanted gegeben! Grund: %s",pID,grund);
SendClientMessage(playerid,ROT,string);
SetPlayerWantedLevel(pID,GetPlayerWantedLevel(pID) + 1);
SetPlayerColor(pID,BLAU);
return 1;
}
ocmd:wanteds(playerid,params[])
{
if(!IsPlayerInRangeOfPoint(playerid,5,253.4271,68.8258,1003.6406))return SendClientMessage(playerid,ROT,"Du bist nicht an der richtigen Stelle!");
{
new msg[128],suche=0;
for (new i; i < MAX_PLAYERS; i++)
{
new spieler[MAX_PLAYER_NAME];
new Wanted = GetPlayerWantedLevel(i);
GetPlayerName(i, spieler, sizeof(spieler));
if (GetPlayerWantedLevel(i) > 0)
{
format(msg, sizeof(msg), "%s[%d]: %d Fahngungslevel", spieler,i,Wanted);
SendClientMessage(playerid,BLAU, msg);
suche++;
}
}
if(suche==0)
return SendClientMessage(playerid, ROT, "Zurzeit ist kein Spieler Wanted!");
return 1;
}
}
ocmd:cc(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Du bist kein Admin oder dein Rang ist nicht hoch genug.");
new pID, zeile, string[128];
if(sscanf(params,"ui",pID,zeile))return SendClientMessage(playerid,BLAU,"/cc [spieler] [Weiviele Zeilen]");
Clearchat(pID,zeile);
return 1;
}
ocmd:delwanted(playerid,params[])
{
if(!isPlayerInFrakt(playerid,1))return SendClientMessage(playerid,ROT,"Du bist kein Polizist!");
if(GetPVarInt(playerid,"Duty")==0)return SendClientMessage(playerid,ROT,"Du bist nicht im Dienst!");
new pID,string[128];
if(sscanf(params,"i",pID))return SendClientMessage(playerid,BLAU,"/delwanted [id]");
format(string,sizeof(string),"Deine Akte wurde von ID:%d gereinigt!",playerid);
SendClientMessage(pID,ROT,string);
format(string,sizeof(string),"Du hast die Akte von ID:%d gereinigt!",pID);
SendClientMessage(playerid,BLAU,string);
SetPlayerWantedLevel(pID,0);
return 1;
}
ocmd:setfrak(playerid,params[])
{
if(!isPlayerAnAdmin(playerid,3))return SendClientMessage(playerid,ROT,"Du bist kein Admin oder dein Rang ist nicht hoch genug.");
new pID, rank, string[128];
if(sscanf(params,"ui",pID,rank))return SendClientMessage(playerid,BLAU,"/setfrak [spieler] [Fraktionid]");
if(rank<0||rank>6)return SendClientMessage(playerid,BLAU,"Bitte gültige Fraktion angeben.");
pInfo[pID][Fraktion] = rank;
format(string,sizeof(string),"AdmCmd: %s wurde von %s geleadert! Fraktion: %d",SpielerName(pID),SpielerName(playerid),rank);
SendClientMessageToAll(ROT,string);
SpawnPlayer(pID);
SpielerSpeichern(pID);
return 1;
}
}
und da kommen diese errors
error 029: invalid expression, assumed zero
error 017: undefined symbol "ocmd_navi"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
diese errors sind alle ganz oben in der zeile
ocmd:navi(playerid,params[])