Hier die errors
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(237) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(298) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(312) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(315) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(327) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(330) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(341) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(344) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(356) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(359) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(371) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(374) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(390) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(393) : error 047: array sizes do not match, or destination array is too small
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(817) : error 021: symbol already defined: "strtok"
C:\GTa an lol (Lasse)\Server\GTARP\gamemodes\login_register017.pwn(832) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
16 Errors.
Hier die Zeilen
cmd = strtok(cmdtext, idx); Zeile 237
tmp = strtok(cmdtext, idx); Zeile 298
tmp = strtok(cmdtext, idx); Zeile 312
tmp = strtok(cmdtext, idx); Zeile 315
tmp = strtok(cmdtext, idx); Zeile 327
tmp = strtok(cmdtext, idx); Zeile 330
tmp = strtok(cmdtext, idx); Zeile 341
tmp = strtok(cmdtext, idx); Zeile 344
tmp = strtok(cmdtext, idx); Zeile 356
tmp = strtok(cmdtext, idx); Zeile 359
tmp = strtok(cmdtext, idx); Zeile 371
tmp = strtok(cmdtext, idx); Zeile 374
tmp = strtok(cmdtext, idx); Zeile 390
tmp = strtok(cmdtext, idx); Zeile 393
{ Zeile 817
return result; Zeile 832
Und hier das Komplette OnPlayerCommandText
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128];
new tmp[128];
new idx;
cmd = strtok(cmdtext, idx);
if (strcmp("/alogin", cmdtext, true) == 0)
{
if(IsPlayerAnAdmin(playerid,1))
{
ShowPlayerDialog(playerid,ALogin,DIALOG_STYLE_INPUT,"Login","Bitte tippe dein Passwort in das TextFeld ein um dich als Admin einzuloggen!","Login","Abbruch");
}
return 1;
}
if (strcmp("/alogout", cmdtext, true) == 0)
{
if(IsPlayerAnAdmin(playerid,1))
{
ShowPlayerDialog(playerid,ALogout,DIALOG_STYLE_MSGBOX,"Logout","Bist du dir Sicher das du dich als Admin ausloggen möchtest ?","Logout","Abbruch");
}
return 1;
}
//---------->> Admin Befehle <<---------------------------------------------
if (strcmp("/kick", cmdtext, true) == 0)
{
if(IsPlayerAnAdmin(playerid,1))
{
ShowPlayerDialog(playerid,KickD,DIALOG_STYLE_INPUT,"Kick","Bitte tippe die ID des Spielers in das Feld ein!","Kick","Abbruch");
}
return 1;
}
if (strcmp("/goto", cmdtext, true) == 0)
{
if(IsPlayerAnAdmin(playerid,1))
{
ShowPlayerDialog(playerid,gotoD,DIALOG_STYLE_INPUT,"Gehe zu","Bitte tippe die ID des Spielers in das Feld ein!","OK","Abbruch");
}
return 1;
}
if (strcmp("/gethere", cmdtext, true) == 0)
{
if(IsPlayerAnAdmin(playerid,1))
{
ShowPlayerDialog(playerid,getD,DIALOG_STYLE_INPUT,"Spieler holen ...","Bitte tippe die ID des Spielers in das Feld ein!","OK","Abbruch");
}
return 1;
}
if (strcmp("/ban", cmdtext, true) == 0)
{
if(IsPlayerAnAdmin(playerid,2))
{
ShowPlayerDialog(playerid,banD,DIALOG_STYLE_INPUT,"Spieler Banen","Bitte tippe die ID des Spielers in das Feld ein!","BAN","Abbruch");
}
return 1;
}
if (strcmp("/gmx",cmd,true) == 0)
{
if(IsPlayerAnAdmin(playerid,5))
{
SendRconCommand("gmx");
}
}
if (strcmp("/killplayer",cmd,true) == 0)
{
if(IsPlayerAnAdmin(playerid,3))
{
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /killplayer [playerid]");
new playa = strval(tmp);
SetPlayerHealth(playerid,0);
new tbanplay[128];
format(tbanplay,sizeof(tbanplay),"ADMCMD : Der Admin %s hat den Spieler %s gekillt(CMD)",SpielerName(playerid),SpielerName(playa));
SendClientMessageToAll(Rot,tbanplay);
}
return 1;
}
if (strcmp("/timeban",cmd,true) == 0)
{
if(IsPlayerAnAdmin(playerid,3))
{
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /timeban [playerid] [Zeit]");
new playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /timeban [playerid] [Zeit]");
new timeX = strval(tmp);
BanPlayerforTime(playa,timeX);
new tbanplay[128];
format(tbanplay,sizeof(tbanplay),"ADMCMD : Der Admin %s hat den Spieler %s für eine bestimmte Zeit gebannt",SpielerName(playerid),SpielerName(playa));
SendClientMessageToAll(Rot,tbanplay);
}
return 1;
}
if(strcmp(cmd, "/givemoney", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givemoney [bin] [geld]");
new playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givemoney [bin] [geld]");
new geld_x = strval(tmp);
GivePlayerMoney(playa,geld_x);
new nachricht[128];
format(nachricht,sizeof(nachricht),"Du hast dem Spieler %s, %d$ gegeben !",SpielerName(playa),geld_x);
SendClientMessage(playerid,COLOR_GREY,nachricht);
return 1;
}
if(strcmp(cmd, "/givebank", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givemoney [bin] [geld]");
new bin = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givemoney [bin] [geld]");
new geld_x = strval(tmp);
new nachricht[128];
format(nachricht,sizeof(nachricht),"BIN %d, %d$ gegeben !",bin,geld_x);
SendClientMessage(playerid,COLOR_RED,nachricht);
SpielerInfo[playerid][bank] += geld_x;
SendClientMessage(playerid,COLOR_GREY,nachricht);
return 1;
}
if (strcmp("/setscore",cmd,true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givemoney [playerid] [geld]");
new playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givemoney [playerid] [geld]");
new punkte_x = strval(tmp);
SetPlayerScore(playa,punkte_x);
new nachricht[128];
format(nachricht,sizeof(nachricht),"Du hast dem Spieler %s, %d$ gegeben !",SpielerName(playa),punkte_x);
SendClientMessage(playerid,COLOR_GREY,nachricht);
return 1;
}
if (strcmp("/givegun",cmd,true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givegun [playerid] [waffen ID] [ammo]");
new playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givegun [playerid] [Waffen ID] [ammo]");
new gun = strval(tmp);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /givegun [playerid] [Waffen ID] [ammo]");
new ammo = strval(tmp);
if(gun < 1||gun > 46||gun==27||gun==1||gun==2||gun==9||gun==17||gun==19||gun==20||gun==21||gun==36||gun==38||gun==39||gun==40||gun==44||gun==45) return SendClientMessage(playerid,Rot,"Falsche Waffen ID");
GivePlayerWeapon(playa,gun,ammo);
new mess[128];
format(mess,sizeof(mess),"ADMCMD : Der Admin %s hat dem Spieler %s eine Waffe gegeben (ID: %d)",SpielerName(playerid),SpielerName(playa),gun);
SendClientMessageToAll(Rot,mess);
return 1;
}
if (strcmp("/madmin",cmd,true) == 0)
{
if(IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /madmin [playerid] [level]");
new playa = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid, COLOR_GRAD2, "INFO: /madmin [playerid] [level]");
new level_x = strval(tmp);
new randomp[128];
new mess[128];
format(randomp,sizeof randomp,"%s",RandomStr(12));
strmid(SpielerInfo[playerid][Apass],randomp,0,strlen(randomp),sizeof randomp);
SpielerInfo[playerid][Admin] = level_x;
SendClientMessage(playa,Rot,">_______!ACHTUNG!______________________< ");
SendClientMessage(playa,Rot,"> Bitte schreibe dir dein persönliches");
SendClientMessage(playa,Rot,"> Admin Passwort auf!");
format(mess,sizeof(mess),"> Passwort : %s",SpielerInfo[playerid][Apass]);
SendClientMessageToAll(Rot,mess);
format(mess,sizeof(mess),"ADMCMD : Der Admin %s hat dem Spieler %s zum Admin gemacht (LEVEL: %d)",SpielerName(playerid),SpielerName(playa),level_x);
SendClientMessageToAll(Rot,mess);
//SaveAdminPasswort(playerid);
SpielerSpeichern(playerid);
}
return 1;
}
return 0;
}