hallo
if(strcmp(strget(cmdtext,0),"/equip", true, 10) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid,5.0,217.2581,184.3392,1003.0313)|| IsPlayerInRangeOfPoint(playerid,5.0,1708.9888,-1676.4479,27.2018))
{
tmp = strget(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Hilfe : /equip [item nummer]");
SendClientMessage(playerid, COLOR_GREEN, "|_______ Ausrüstung _______|");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "| 1: Alle Waffen weglegen 2: Knüppel+Spray");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "| 3: Deagle 4: MP5");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "| 5: M4 6: Schrotflinte");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "| 7: Scharfschütztengewehr 8: Standart Ausrüstung");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "| 9: Schutzweste + Leben 10:FBI Ausrüstung");
SendClientMessage(playerid, COLOR_LIGHTGREEN, "| 11:A_Team Ausrüstung 12:Army Ausrüstung");
return 1;
}
new item = strlen(tmp);
if(item == 1)
{
if(pDaten[playerid][Team] == 1||pDaten[playerid][leader] == 1 ||pDaten[playerid][Team] == 2||pDaten[playerid][leader] == 2 ||pDaten[playerid][Team] == 3||pDaten[playerid][leader] == 3 || pDaten[playerid][Team] == 4 || pDaten[playerid][leader] == 4 || pDaten[playerid][Team] == 10 || pDaten[playerid][leader] == 10)
{
ResetPlayerWeapons(playerid);
}
}
else if(item == 2)
{
if(pDaten[playerid][Team] == 1||pDaten[playerid][leader] == 1 ||pDaten[playerid][Team] == 2||pDaten[playerid][leader] == 2 ||pDaten[playerid][Team] == 3||pDaten[playerid][leader] == 3 || pDaten[playerid][Team] == 4 || pDaten[playerid][leader] == 4 || pDaten[playerid][Team] == 10 || pDaten[playerid][leader] == 10)
{
GivePlayerWeapon(playerid, 3, 1);
GivePlayerWeapon(playerid, 41, 500);
}
}
else if(item == 3)
{
if(pDaten[playerid][Team] == 1||pDaten[playerid][leader] == 1 ||pDaten[playerid][Team] == 2||pDaten[playerid][leader] == 2 ||pDaten[playerid][Team] == 3||pDaten[playerid][leader] == 3 || pDaten[playerid][Team] == 4 || pDaten[playerid][leader] == 4 || pDaten[playerid][Team] == 10 || pDaten[playerid][leader] == 10)
{
GivePlayerWeapon(playerid, 24, 150);
}
}
else if(item == 4)
{
if(pDaten[playerid][Team] == 1||pDaten[playerid][leader] == 1 ||pDaten[playerid][Team] == 2||pDaten[playerid][leader] == 2 ||pDaten[playerid][Team] == 3||pDaten[playerid][leader] == 3 || pDaten[playerid][Team] == 4 || pDaten[playerid][leader] == 4 || pDaten[playerid][Team] == 10 || pDaten[playerid][leader] == 10)
{
GivePlayerWeapon(playerid, 29, 800);
GetPlayerName(playerid, sendername, sizeof(sendername));
}
}
else if(item == 5)
{
if(pDaten[playerid][Team] == 1||pDaten[playerid][leader] == 1 ||pDaten[playerid][Team] == 6||pDaten[playerid][leader] == 6 ||pDaten[playerid][Team] == 7||pDaten[playerid][leader] == 7 || pDaten[playerid][Team] == 9 || pDaten[playerid][leader] == 9 || pDaten[playerid][Team] == 20 || pDaten[playerid][leader] == 10)
{
GivePlayerWeapon(playerid, 31, 800);
GetPlayerName(playerid, sendername, sizeof(sendername));
}
}
else if(item == 6)
{
if(pDaten[playerid][Team] == 1||pDaten[playerid][leader] == 1 ||pDaten[playerid][Team] == 6||pDaten[playerid][leader] == 6 ||pDaten[playerid][Team] == 7||pDaten[playerid][leader] == 7 || pDaten[playerid][Team] == 9 || pDaten[playerid][leader] == 9 || pDaten[playerid][Team] == 20 || pDaten[playerid][leader] == 10)
{
GivePlayerWeapon(playerid, 25, 100);
GetPlayerName(playerid, sendername, sizeof(sendername));
}
}
else if(item == 7)
{
if(pDaten[playerid][Team] == 1||pDaten[playerid][leader] == 1 ||pDaten[playerid][Team] == 6||pDaten[playerid][leader] == 6 ||pDaten[playerid][Team] == 7||pDaten[playerid][leader] == 7 || pDaten[playerid][Team] == 9 || pDaten[playerid][leader] == 9 || pDaten[playerid][Team] == 20 || pDaten[playerid][leader] == 10)
{
GivePlayerWeapon(playerid, 34, 50);
GetPlayerName(playerid, sendername, sizeof(sendername));
}
}
else if(item == 8)
{
if(pDaten[playerid][Team] == 1||pDaten[playerid][leader] == 1 ||pDaten[playerid][Team] == 6||pDaten[playerid][leader] == 6 ||pDaten[playerid][Team] == 7||pDaten[playerid][leader] == 7 || pDaten[playerid][Team] == 9 || pDaten[playerid][leader] == 9 || pDaten[playerid][Team] == 20 || pDaten[playerid][leader] == 10)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 3, 1);//schlagstock
GivePlayerWeapon(playerid, 41, 500);//spray
GivePlayerWeapon(playerid, 25, 500);//Shotgun
GivePlayerWeapon(playerid, 31, 1500);//M4
GivePlayerWeapon(playerid, 24, 150);//Deagle
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
}
}
else if(item == 9)
{
if(pDaten[playerid][Team] == 1||pDaten[playerid][leader] == 1 ||pDaten[playerid][Team] == 6||pDaten[playerid][leader] == 6 ||pDaten[playerid][Team] == 7||pDaten[playerid][leader] == 7 || pDaten[playerid][Team] == 9 || pDaten[playerid][leader] == 9 || pDaten[playerid][Team] == 20 || pDaten[playerid][leader] == 10)
{
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
GetPlayerName(playerid, sendername, sizeof(sendername));
}
}
else if(item == 10)
{
if(pDaten[playerid][Team] == 3||pDaten[playerid][leader] == 3)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 25, 500);//Shotgun
GivePlayerWeapon(playerid, 27, 150);//shotgun
GivePlayerWeapon(playerid, 34, 150);//Sniper
GivePlayerWeapon(playerid, 31, 1500);//M4
GivePlayerWeapon(playerid, 24, 150);//Deagle
GivePlayerWeapon(playerid, 37, 150);//Flammenwerfer
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Bist kein FBI Agent");
}
}
else if(item == 11)
{
if(pDaten[playerid][Team] == 2||pDaten[playerid][leader] == 2)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 25, 500);//Shotgun
GivePlayerWeapon(playerid, 31, 1500);//M4
GivePlayerWeapon(playerid, 24, 150);//Deagle
GivePlayerWeapon(playerid, 27, 150);//shotgun
GivePlayerWeapon(playerid, 34, 150);//Sniper
GivePlayerWeapon(playerid, 32, 150);//Tec9
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Bist kein A_Team Agent");
}
}
else if(item == 12)
{
if(pDaten[playerid][Team] == 4 || pDaten[playerid][leader] == 4)
{
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 25, 500);//Shotgun
GivePlayerWeapon(playerid, 31, 1500);//M4
GivePlayerWeapon(playerid, 32, 150);//Tec9
GivePlayerWeapon(playerid, 24, 150);//Deagle
GivePlayerWeapon(playerid, 35, 150);//Raketenwerfer
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Bist kein Army Member");
}
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " Nicht Befugt/Nicht Verfügbar!");
return 1;
}
}
return 1;
}
return 1;
}
wenn man /equip 1 macht gibt derschrotflint Item 6 macht ma eine ander zahl machter gibt er imme rnoch item 6 wieso
gibt man /equip ein kommt auch die schrotflint auf item 6
das ist irgend wie ein bug
Ich verzweifel daran schon
Bitte um eure hilfe
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
Was vill. klappen würde:
Wandle den String in eine zahl um und Vergleiche hat bei mir dann zu 100% immer geklappt. -
was fürn strin bin voll verwirt wegn kolegen
wie mache ich das jetzt
so habs hingekricht danke für eure hilfe -
und wie war die lösung?
vllt hat ihrgend wan mal ein anderer dieses problem
-
xD habe jetzt anders gemahct nicht mit /equip 1 sonder nur /equip und dan kommt dialog ist einfacher
-
breadfish.de
Hat das Thema geschlossen.