Hallo,
Ich sitz immoment voll auf der Leitung xD.
Vielleicht erkennt jemand die Fehler.
Fehler Nr. 1
Ab Zeile 34 !
Da funktioniert das mit
dem Teamkill nicht, der Message ect, also alles :(.
Ich denke es liegt am String?!
Habe vorsichtsalber alles im
"OnplayerDeath" mitbeigefügt.
*
new TeamKills[MAX_PLAYERS] = 0;
public OnPlayerDeath(playerid, killerid, reason)
public OnPlayerDeath(playerid, killerid, reason)
{
new string[128],name[MAX_PLAYER_NAME];
GetPlayerName(killerid,name,sizeof(name));
SendDeathMessage(killerid, playerid, reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
GivePlayerMoney(playerid, -300);
GivePlayerMoney(killerid, 1000);
DropPlayerWeapons(playerid);
killss[playerid] = 0;
killss[killerid] ++;
if(killss[killerid] == 3)
{
format(string,sizeof(string),"~g~%s~n~~y~Multikill!",name);
GameTextForAll(string,3000,6);
}
if(killss[killerid] == 4)
{
format(string,sizeof(string),"~g~%s~n~~b~Ultrakill!",name);
GameTextForAll(string,3000,6);
}
if(killss[killerid] == 5)
{
format(string,sizeof(string),"~g~%s~n~~p~Fantastickill!",name);
GameTextForAll(string,3000,6);
}
if(killss[killerid] == 6)
{
format(string,sizeof(string),"~g~%s~n~~r~Unbelievablekill!",name);
GameTextForAll(string,3000,6);
}
if(killerid != INVALID_PLAYER_ID)
{
if(Team[playerid] == Team[killerid])
{
TeamKills[killerid]++;
if(TeamKills[killerid] == 1)
{
GameTextForPlayer(playerid, "~y~Teamkill ~r~not allowed!~n~~r~1/3 Warnings!", 6000, 1);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 1);
SetPlayerScore(playerid, -2);
SetPlayerPos(playerid, 1551.7120, -1675.3322, 15.9687);
SetPlayerFacingAngle(playerid, 91.0272);
}
if(TeamKills[killerid] == 2)
{
GameTextForPlayer(playerid, "~y~Teamkill ~r~not allowed!~n~~r~2/3 Warnings!", 6000, 1);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 1);
SetPlayerScore(playerid, -10);
SetPlayerPos(playerid, 1551.7120, -1675.3322, 15.9687);
SetPlayerFacingAngle(playerid, 91.0272);
}
if(TeamKills[killerid] == 3)
{
GameTextForPlayer(playerid, "~y~Teamkill ~r~not allowed!~n~~r~3/3 Warnings!", 6000, 1);
ResetPlayerWeapons(playerid);
SetPlayerHealth(playerid, 1);
SetPlayerScore(playerid, -10);
SetPlayerPos(playerid, 1551.7120, -1675.3322, 15.9687);
SetPlayerFacingAngle(playerid, 91.0272);
new
name[MAX_PLAYER_NAME],
string[16];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"[AUTO-KICK] has kicked [%s]with Reason: Teamkill",name);
SendClientMessageToAll(ROT,string);
Kick(playerid);
return 1;
}
}
}
return 1;
}
__________________________________________
Fehler Nr. 2
Es funktioniert einfach nicht dass wenn
ich ingame eingebe: /dshop (deaktiviert den SHOP)
bzw. /eshop (aktiviert ihn) passiert garnichts
bzw. kommt nur eine Meldung:
"SERVER: Unknown Command."
Also hier die Teile:
new bool:WShop;
dcmd_edshop(playerid, params[])
{
if(!strcmp("eshop", params))
{
if(Player[playerid][admin] < 1) return SendClientMessage(playerid, WEIS,"SERVER: Unknown Command.");
if(WShop == false) return SendClientMessage(playerid, WEIS,"Shop is enabled!");
WShop = true;
}
if(!strcmp("dshop",params))
{
if(Player[playerid][admin] < 1) return SendClientMessage(playerid, WEIS,"SERVER: Unknown Command.");
if(WShop == true) return SendClientMessage(playerid, WEIS,"Shop is disabled!");
WShop = false;
}
return 1;
}
dcmd_shop(playerid,params[])
{
#pragma unused params
if(WShop == false) return 0;
if(WShop == true) return 1;
ShowPlayerDialog(playerid,DIALOG_SHOP,DIALOG_STYLE_LIST, "Weapon Shop", "1. Assault Rifles\n2. Sniper Rifles\n3. Shotguns\n4. Pistols\n5. Throwing Weapons\n6. Melee Weapons\n7. Other Stuff", "Ok", "Cancel");
return 1;
}
__________________________
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
if(listitem == 1)
{
if(WShop == false) return 0;
if(WShop == true) return 1;
ShowPlayerDialog(playerid,DIALOG_SHOP,DIALOG_STYLE_LIST, "Weapon Shop", "Assault Rifles\nSniper Rifles\nShotguns\nPistols\nThrowing Weapons\nMelee Weapons\nOther Stuff", "Ok", "Cancel");
return 1;
}
...........
//edit: Rechtschreibung nochmal überprüft + eine Info hinzugefügt*
//edit2: Rechtschreibung & aktuelles dabeigefügt!
MFG.