Hallo Community, Ich bin am verzweifeln. -.- Hab mir mal so einiges zusammegebastelt aber iwie funktioniert des nicht mehr.
Da kommen diese Errors:
ZitatAlles anzeigen\filterscripts\myadminfs.pwn(80) : error 017: undefined symbol "strtok"\filterscripts\myadminfs.pwn(80) : error 017: undefined symbol "strtok"
\filterscripts\myadminfs.pwn(80) : error 033: array must be indexed (variable "cmd")
\filterscripts\myadminfs.pwn(84) : error 017: undefined symbol "strtok"
\filterscripts\myadminfs.pwn(84) : error 033: array must be indexed (variable "tmp")
\filterscripts\myadminfs.pwn(97) : error 017: undefined symbol "strget"
\filterscripts\myadminfs.pwn(99) : error 017: undefined symbol "strget"
\filterscripts\myadminfs.pwn(117) : error 017: undefined symbol "strget"
\filterscripts\myadminfs.pwn(121) : error 017: undefined symbol "strget"
\filterscripts\myadminfs.pwn(122) : error 017: undefined symbol "strget"
\filterscripts\myadminfs.pwn(123) : error 017: undefined symbol "strget"
\filterscripts\myadminfs.pwn(125) : error 017: undefined symbol "strget"
\filterscripts\myadminfs.pwn(79) : warning 203: symbol is never used: "idx"
\filterscripts\myadminfs.pwn 12 Errors.
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#include
#if defined FILTERSCRIPT
#define adminmenu 122
#define weaponmenu 133
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xFF0000AA
#define red 0xFF0000FF
#define rot 0xFF0000FF
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_YELLOW 0xF1FE01FF
#define COLOR_PURPLE 0x9E18E7FF
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("ADMINFS");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#endif
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/adminmenu", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
ShowPlayerDialog(playerid,122, DIALOG_STYLE_LIST, "Adminmenu", "Kick\nOmg1\nOmg2\nHydra\nAdminbase\nPlatz für ein Command\nAdmincmds\nGodmodeon\nGodmodeoff\nUndercover", "OK", "Abbord");
}else {
SendClientMessage(playerid, 0xFFFFFFAA, "SERVER: You arent an ADMIN");
}
return 1;
}
if (strcmp("/admincmds", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage (playerid,0xFFFF00AA,"/goto [playerid] /gethere [playerid] /giveweapon [ID] [gunID] [ammo] /rcon gravity [0.008]");
}else{
SendClientMessage(playerid,0xFF0000AA,"SERVER:You arent an ADMIN");
}
return 1;
}
if (strcmp("/undercover", cmdtext, true) == 0)
{
if(IsPlayerAdmin(playerid))
{
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(i, playerid, false);
SendClientMessage(playerid, COLOR_GREEN, "Du bist jetzt undercover!");
}else{
SendClientMessage(playerid, COLOR_GREEN, "Server:You arent an ADMIN");
}
return 1;
}
new tmp[128],cmd[128],idx;
cmd = strtok(cmdtext,idx);
if(!strcmp("/goto",cmd,true))
{
if(IsPlayerAdmin(playerid)) {
tmp = strtok(cmdtext,idx);
if(!tmp[0])return SendClientMessage(playerid,0xFF0000FF,"Nutze /goto [playerid]");
new pointer = strval(tmp);
if(!IsPlayerConnected(pointer) || IsPlayerNPC(pointer))return SendClientMessage(playerid,0xFF0000FF,"Dieser Spieler ist nicht Aktiv!");
new Float:pos[3];
GetPlayerPos(pointer,pos[0],pos[1],pos[2]);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid,pos[0],pos[1],pos[2]);
}else{ SendClientMessage(playerid,0xFF0000AA,"SERVER:You arent an ADMIN");
}
return 1;
}
if(!strcmp(strget(cmdtext, 0), "/gethere")) {
if(IsPlayerAdmin(playerid)) {
new opfa = strval(strget(cmdtext, 1));
if(IsPlayerConnected(opfa)) {
new Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME], string[256];
GetPlayerPos(playerid,x,y,z);
GetPlayerName(opfa,name,sizeof(name));
format(string,sizeof(string),"Du hast %s zu dir teleportiert",name);
SendClientMessage(playerid,0x33FF33AA,string);
if(IsPlayerInAnyVehicle(opfa)) {
new autoid = GetPlayerVehicleID(opfa);
SetPlayerPos(opfa,x+1,y,z); SetVehiclePos(autoid,x+1,y,z); SetPlayerInterior(opfa,GetPlayerInterior(playerid)); LinkVehicleToInterior(autoid,GetPlayerInterior(playerid)); PutPlayerInVehicle(opfa,autoid,0); } else {
ResetPlayerWeapons(playerid);
SetPlayerPos(opfa,x+1,y,z); SetPlayerInterior(opfa,GetPlayerInterior(playerid)); }}
else { SendClientMessage(playerid,0xFF0000AA,"ID nicht vergeben"); }}
else { SendClientMessage(playerid,0xFF0000AA,"SERVER:You arent an ADMIN"); }
return 1;
}
if(!strcmp(strget(cmdtext, 0),"/giveweapon"))
{
if(IsPlayerAdmin(playerid))
{
new target = strval(strget(cmdtext, 1));
new gunid = strval(strget(cmdtext, 2));
new ammo = strval(strget(cmdtext, 3));
if(gunid == 38) { return 1; }
if(!strlen(strget(cmdtext, 1))) { SendClientMessage(playerid,COLOR_GREEN,"Benutze: /giveweapon [ID] [gunID] [ammo]"); return 1; }
if(!IsPlayerConnected(target)) { SendClientMessage(playerid,COLOR_GREEN,"Diese ID ist nicht vergeben"); return 1; }
{
GivePlayerWeapon(target,gunid,ammo);
}
}else{
SendClientMessage(playerid, COLOR_GREEN, "SERVER: You arent an ADMIN");
}
return 1;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 122) //ADMINMENU
{
if(listitem == 0) //Kick
{
//Platz für noch irgendwas
}
if(listitem == 1) //Ban
{
//Platz für noch irgendwas
}
if(listitem == 2) //Weaponmenu
{
ShowPlayerDialog(playerid,133, DIALOG_STYLE_LIST, "Weaponmenu", "Uzi\nSpawn off Shotgun\nTec9\nMp5\nM4\nAK-47\nSniper Rifle\nCombat Shotgun\nShotgun\nDesert Eagle\nMinigun\nRPG\nGrenade", "OK", "Abbord");
}
if(listitem == 3) //Hydra
{
new Float:X,Float:Y,Float:Z,Float:Angle, carid;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
carid = GetPlayerVehicleID(playerid);
carid = CreateVehicle(520,X,Y,Z,Angle,-1,-1,600);
PutPlayerInVehicle(playerid,carid,0);
TogglePlayerControllable(playerid,true);
return SendClientMessage(playerid, 0x40FF40FF, "Hydra spawned!");
}
if(listitem == 4) //Adminbase
{
SetPlayerPos(playerid, 1601.0415,-1684.5365,5.8906);
}
if(listitem == 5)
{
//Platz für noch irgendwas
}
if(listitem == 6) //adminCMDS
{
SendClientMessage (playerid,0xFFFF00AA,"/goto [playerid] /gethere [playerid] /jail [playerid] /unjail [playerid]");
}
if(listitem == 7) //Godmode on
{
if(IsPlayerAdmin(playerid))
{
new playrname[MAX_PLAYER_NAME];
new pname[MAX_PLAYER_NAME];
new string[100];
SetPlayerHealth(playerid, 0x7F800000);
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s Godmode: ON!", pname);
SendClientMessageToAll(0xFFFF00AA, string);
GetPlayerName(playerid, playrname, sizeof(playrname));
}else{
SendClientMessage(playerid, 0xAA3333AA, "Server: You arent an ADMIN");
}
}
if(listitem == 8) //Godmode off
{
if(IsPlayerAdmin(playerid))
{
new playrname[MAX_PLAYER_NAME];
new pname[MAX_PLAYER_NAME];
new string[100];
SetPlayerHealth(playerid, 100);
GetPlayerName(playerid, pname, sizeof(pname));
format(string, sizeof(string), "%s Godmode: OFF!", pname);
SendClientMessageToAll(0xFFFF00AA, string);
GetPlayerName(playerid, playrname, sizeof(playrname));
}else{
SendClientMessage(playerid, 0xAA3333AA, "Server: You arent an ADMIN");
}
}
if(listitem == 9) //Undercover
{
if(IsPlayerAdmin(playerid))
{
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(i, playerid, false);
SendClientMessage(playerid, COLOR_GREEN, "Du bist jetzt undercover!");
}else{
SendClientMessage(playerid, COLOR_GREEN, "Server:You arent an ADMIN");
}
}
}
if(dialogid == 133) //Weaponmenu
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 28, 99999);
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 26, 99999);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 32, 99999);
}
if(listitem == 3)
{
GivePlayerWeapon(playerid, 29, 99999);
}
if(listitem == 4)
{
GivePlayerWeapon(playerid, 31, 99999);
}
if(listitem == 5)
{
GivePlayerWeapon(playerid, 30, 99999);
}
if(listitem == 6)
{
GivePlayerWeapon(playerid, 34, 99999);
}
if(listitem == 7)
{
GivePlayerWeapon(playerid, 27, 99999);
}
if(listitem == 8)
{
GivePlayerWeapon(playerid, 25, 99999);
}
if(listitem == 9)
{
GivePlayerWeapon(playerid, 24, 99999);
}
if(listitem == 10)
{
GivePlayerWeapon(playerid, 38, 99999);
}
if(listitem == 11)
{
GivePlayerWeapon(playerid, 35, 99999);
}
if(listitem == 12)
{
GivePlayerWeapon(playerid, 16, 99999);
}
return 1;
}
</a_samp>