Guten Tag liebe Community,
ich habe mal versucht den /wcheck Befehl vom MVD Script auf meins umzuschreiben, jedoch ohne erfolg. Wenn ich einen User checke dann zeigt er keine Waffen an, auch wenn er welche hat. Ich hoffe ihr könnnt mir helfen.
Code:
dcmd_wcheck(playerid,params[])
{
new pID;
new string[128];
if(!isAdmin(playerid,2))return SendClientMessage(playerid,Rot,"Du hast nicht das nötige Adminlevel!");
if(sscanf(params,"u",pID))
{
SendClientMessage(playerid,Rot,"INFO: /wcheck [playerid]");
}
if(pID == INVALID_PLAYER_ID)
{
SendClientMessage(playerid,Rot,"Diesen Spieler gibt es nicht.");
}
new giveplayer[MAX_PLAYER_NAME];
new sweapon, sammo, weaponname[64];
GetPlayerName(pID, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "%s hat folgende Waffen:", giveplayer);
SendClientMessage(playerid, Blau, string);
for (new i=0; i<9; i++)
{
GetPlayerWeaponData(pID, i, sweapon, sammo);
if(sweapon != 0)
{
switch(sweapon)
{
case 1: weaponname = "Schlagring";
case 2: weaponname = "Golfschläger";
case 3: weaponname = "Schlagstock";
case 4: weaponname = "Messer";
case 6: weaponname = "Schaufel";
case 7: weaponname = "Baseballschläger";
case 8: weaponname = "Billiardstock";
case 9: weaponname = "Katana";
case 10: weaponname = "Kettensäge";
case 11: weaponname = "Lila Dildo";
case 12: weaponname = "Kleiner Vibrator";
case 13: weaponname = "Weißes Dildo";
case 14: weaponname = "Blumen";
case 15: weaponname = "Gehstock";
case 16: weaponname = "Granate";
case 17: weaponname = "Rauchgranate";
case 18: weaponname = "Molotov";
case 19: weaponname = "";
case 20: weaponname = "";
case 21: weaponname = "Jetpack";
case 22: weaponname = "9mm Pistole";
case 23: weaponname = "Schallgedämpfte Pistole";
case 24: weaponname = "Deagle";
case 25: weaponname = "Shotgun";
case 26: weaponname = "Spawn-off Shotgun";
case 27: weaponname = "Combat Shotgun";
case 28: weaponname = "Micro Uzi";
case 29: weaponname = "Mp5";
case 30: weaponname = "AK47";
case 31: weaponname = "M4";
case 32: weaponname = "Tec9";
case 33: weaponname = "Country Rifle";
case 34: weaponname = "Sniper";
case 35: weaponname = "Racketenwerfer";
case 36: weaponname = "Racketenwerfer";
case 37: weaponname = "Flammenwerfer";
case 38: weaponname = "Mingun";
case 39: weaponname = "Fernzünd bomben";
case 40: weaponname = "Detonator";
case 41: weaponname = "Spray";
case 42: weaponname = "Feuerlöscher";
case 43: weaponname = "Camera";
case 44: weaponname = "Nachtsicht";
case 45: weaponname = "Thermal sicht";
case 46: weaponname = "Fallschirm";
}
format(string, sizeof(string), "%d: %s (%d|%d)", i, weaponname, sweapon, sammo);
if(sweapon == 44 || sweapon == 40 || (sweapon <= 39 && sweapon >= 35) || sweapon == 32 || sweapon == 28 || sweapon == 27 || sweapon == 26 || sweapon == 21 || sweapon == 18 || sweapon == 16)
{
SendClientMessage(playerid, Rot, string);
}
else SendClientMessage(playerid, Gelb, string);
}
return 1;
}
return 1;
}
Mit freundlichen Grüßen,
DexterA1