Hallo leute :),
ich habe ein Problem:
Ich möchte ein Waffenladen machen, den man überall aufrufen kann. (habe das tut benutzt)
Nun bekomme ich folgende warnings (die meisten warnings waren davor schon da, machen aber nix schlechter o.o, wie krieg ich die weg ?):
"C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(82) : warning 217: loose indentation
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(347) : warning 217: loose indentation
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(490) : warning 213: tag mismatch
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(490) : warning 213: tag mismatch
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(490) : warning 213: tag mismatch
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(491) : warning 213: tag mismatch
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(491) : warning 213: tag mismatch
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(491) : warning 213: tag mismatch
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(713) : warning 217: loose indentation
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(741) : warning 217: loose indentation
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(796) : warning 217: loose indentation
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(806) : warning 217: loose indentation
C:\Users\Lars\Desktop\SA-MP Server\gamemodes\right.pwn(834) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
13 Warnings.
"
So ich habe dieses Dialog fenster nun ingame aber:
Wenn ich es öffne werde ich gekickt o.o.
Hier der gesamte Quellcode:
... (wird sonst zu lang
#define weaponshop 1
public OnGameModeInit()
{
...
...
...
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
...
}
public OnPlayerConnect(playerid)
{
new string[256];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string, sizeof(string), "Willkommen auf unserem Server %s",playername);
SendClientMessage(playerid,0xAA3333AA,string);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SendClientMessage(playerid,0xAA3333AA,"Du wurdest gekickt!");
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SendClientMessage(killerid,0xAA3333AA,"Du hast jemanden getötet!\n");
GivePlayerMoney(killerid,500);
SendClientMessage(playerid,0xAA3333AA,"Du wurdest getötet!\n");
GivePlayerMoney(playerid,-500);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
// Teleports:
//
...
// Flughäfen
// Los Santos Flughafen
//
if(strcmp("/flughafen1",cmdtext,true)==0) {
SetPlayerPos(playerid,1740.4398,-2616.3242,13.5469);
SetPlayerInterior(playerid,0);
return 1;
}
// Waffenladen überall
//
if (strcmp("/waffen", cmdtext, true) == 0) {
ShowPlayerDialog(playerid, weaponshop, DIALOG_STYLE_LIST, "Waffenladen", "9mm \n 9mm mit Schalldämpfer \n Desert Eagle \n Schrotflinte \n Abgesägte Schrotflinte \n Vollautomatische Schrotflinte \n Micro UZI \n MP-5 \n Tec9 \n AK-47 \n M4 \n Sniper Rifle \n Country Rifle \n Normale Bazooka \n Zielerfassende Bazooka \n Flammenwerfer \n Minigun \n Paketbombe \n Granaten \n Tränengas \n Molotow-Cocktail", "Kaufen", "Abbrechen");
return 1;
}
return 0;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerUpdate(playerid)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == weaponshop)
{
if(response)
{
if(listitem == 0) // 9mm
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 22, 9999);
GivePlayerMoney(playerid, -1);
return 1;
}
}
if(listitem == 1) // 9mm mit schalldämpfer
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 23, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 2) // Desert Eagle
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 24, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 3) // Schrotflinte
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 25, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 4) // Abgesägte Schrotflinte
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 26, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 5) // Vollauto Schrotflinte
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 27, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 6) // Micro UZI
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 28, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 7) // MP5
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 29, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 8) // Tec9
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 32, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 9) // AK47
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 10) // M4
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 31, 9999);
GivePlayerMoney(playerid, -1);
return 1;
}
}
if(listitem == 11) // Sniperrifle
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 34, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 12) // Country Rifle
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 33, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 13) // Bazoka 1
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 35, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 14) // Bazoka 2
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 36, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 15) // Flammenwerfer
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 37, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 16) // Minigun
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 38, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 17) // Paketbombe
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 39, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 18) // Granate
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 16, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 19) // Tränengas
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 17, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
if(listitem == 20) // Molotow Cocktail
{
if(GetPlayerMoney(playerid) >= 1)
{
GivePlayerWeapon(playerid, 18, 9999);
GivePlayerMoney(playerid, -1);
return 1;
} }
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
Wo liegt das Problem ?
mfg