Hallo leuts ich hab seid Tagen naja ok seid wochen ein problem mit meinem anticheat. das problem ist das
ich ihn aushaben will wenn jemand dem minigun dm joint, doch das tut er nicht
ich habe 2 abfragen ein mal für 0 also da soll er dann anspringen und einmal im minigun die 1
da soll er halt aus sein naja aber wie gesagt er will es halt nicht hmm binn ich blind oder hab
ich irgentwas vergessen schaut ihr bitte mal drüber
new minigun[MAX_PLAYERS];
forward waffen(playerid);
SetTimer("waffen",500,1);
public waffen(playerid)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(minigun[playerid] == 0 && GetPlayerWeapon(i) == 35 || GetPlayerWeapon(i) == 36 ||GetPlayerWeapon(i) == 43||GetPlayerWeapon(i) == 44 ||GetPlayerWeapon(i) == 45 || GetPlayerWeapon(i) == 37 || GetPlayerWeapon(i) == 38 || GetPlayerWeapon(i) == 4 || GetPlayerWeapon(i) == 17 || GetPlayerWeapon(i) == 16 || GetPlayerWeapon(i) == 18 ) )
{
RemovePlayerWeapon(i,35 || 36 || 43 || 44 || 45|| 37 || 38 || 4 || 17 || 16 || 18);
}
}
}
RemovePlayerWeapon(playerid, weaponid)
{
if(!IsPlayerConnected(playerid) || weaponid < 0 || weaponid > 50)
return;
new
saveweapon[13],
saveammo[13];
for(new slot = 0; slot < 13; slot++)
GetPlayerWeaponData(playerid, slot, saveweapon[slot], saveammo[slot]);
ResetPlayerWeapons(playerid);
for(new slot; slot < 13; slot++)
{
if(saveweapon[slot] == weaponid || saveammo[slot] == 0)
continue;
GivePlayerWeapon(playerid, saveweapon[slot], saveammo[slot]);
}
GivePlayerWeapon(playerid, 0, 1);
}
die abfrage fängt an mit
if(minigun[playerid] == 0 && GetPlayerWeapon(i) == 35...
also wenn 0 dann ist der anticheat an
wenn 1 dann ist er aus also 1 wäre dann im /minigun command
minigun[playerid] = 1;
if(strcmp(cmdtext, "/minigun", true) == 0)
{
if(derbygodupfuck[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, "Du bist im Derby zum verlassen tippe /derbyex");
minigun[playerid] = 1;
udm[playerid] = 1;
DMZone[playerid] = 1;
Act[playerid] = 0;
new cmdname[MAX_PLAYER_NAME];
new string[100],string1[100];
GetPlayerName(playerid, cmdname, sizeof(cmdname));
format(string, sizeof(string), ">>> %s ist im Minigun deathmatch /udm <<<", cmdname);
format(string1, sizeof(string1), ">>> %s is at Minigun deathmatch /udm <<<", cmdname);
LSendClientMessageToAll(0xF100C8FF, string,string1);
LSendClientMessage(playerid, COLOR_GREEN, "Um das DM zuverlassen tippe /dmex.","To leave the deathmatch type /dmex.");
GivePlayerWeapon(playerid, 38, 9999999);
SetPlayerInterior(playerid,0);
new spawns = random(5);
switch(spawns)
{
case 0: SetPlayerPos(playerid,1.6183,-3527.8508,47.4799);
case 1: SetPlayerPos(playerid,69.0028,-3521.6167,45.4624);
case 2: SetPlayerPos(playerid,0.8512,-3401.5830,45.4624);
case 3: SetPlayerPos(playerid,72.4575,-3392.5244,17.0459);
case 4: SetPlayerPos(playerid,23.7303,-3485.9155,29.1244);
}
return 1;
}
//Edit: Verschoben.