Hi, ich bins nochmal, nur diesmal mit nem anderen Problem.
Mit meinem /fbiduty Befehl bekomme ich 26 Errors (Klammerfehler -.-)
Der Befehl:
if(strcmp(cmd, "/fbiduty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsAbf(playerid))
{
if (IsPlayerInRangeOfPoint(playerid,3.0,227.6519,111.8072,1003.2188) ||IsPlayerInRangeOfPoint(playerid,3.0,255.3,77.4,1003.6)
|| IsPlayerInRangeOfPoint(playerid,3.0,-1616.1294,681.1594,7.1875) || IsPlayerInRangeOfPoint(playerid,3.0, 217.5230,184.4352,1003.0313)
|| IsPlayerInRangeOfPoint(playerid,3.0, 217.8921,78.9727,1005.0391)
|| PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "* FBI-Agent %s nimmt seine Marke aus dem Schrank und meldet sich zum Dienst.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 41, 100000); //spray
GivePlayerWeapon(playerid, 3, 0); //Nightstick
GivePlayerWeapon(playerid, 27, 100000); //Shotgun
GivePlayerWeapon(playerid, 24, 100000); //Desert Eagle
GivePlayerWeapon(playerid, 29, 100000); //MP5
GivePlayerWeapon(playerid, 34, 100000); //County Rifle
GivePlayerWeapon(playerid, 31, 100000); //M4
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "* FBI-Agent %s legt seine Marke in den Schrank und macht Feierabend.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(giveplayerid);
PlayerInfo[giveplayerid][pGun1] = 0; PlayerInfo[giveplayerid][pAmmo1] = 0;
PlayerInfo[giveplayerid][pGun2] = 0; PlayerInfo[giveplayerid][pAmmo2] = 0;
PlayerInfo[giveplayerid][pGun3] = 0; PlayerInfo[giveplayerid][pAmmo3] = 0;
PlayerInfo[giveplayerid][pGun4] = 0; PlayerInfo[giveplayerid][pAmmo4] = 0;
OnDuty[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keiner Umkleide !");
return 1;
}
}
Ich hoffe, dass ihr mir das mal richtig machen könnt.
Problem mit Duty Befehl
- 5335Chris
- Geschlossen
- Erledigt
-
-
if(strcmp(cmd, "/fbiduty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(IsAbf(playerid))
{
if (IsPlayerInRangeOfPoint(playerid,3.0,227.6519,111.8072,1003.2188) ||IsPlayerInRangeOfPoint(playerid,3.0,255.3,77.4,1003.6)
|| IsPlayerInRangeOfPoint(playerid,3.0,-1616.1294,681.1594,7.1875) || IsPlayerInRangeOfPoint(playerid,3.0, 217.5230,184.4352,1003.0313)
|| IsPlayerInRangeOfPoint(playerid,3.0, 217.8921,78.9727,1005.0391)
|| PlayerInfo[playerid][pLocal] != 255)
{
if(OnDuty[playerid]==0)
{
format(string, sizeof(string), "* FBI-Agent %s nimmt seine Marke aus dem Schrank und meldet sich zum Dienst.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GivePlayerWeapon(playerid, 41, 100000); //spray
GivePlayerWeapon(playerid, 3, 0); //Nightstick
GivePlayerWeapon(playerid, 27, 100000); //Shotgun
GivePlayerWeapon(playerid, 24, 100000); //Desert Eagle
GivePlayerWeapon(playerid, 29, 100000); //MP5
GivePlayerWeapon(playerid, 34, 100000); //County Rifle
GivePlayerWeapon(playerid, 31, 100000); //M4
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100.0);
OnDuty[playerid] = 1;
}
else if(OnDuty[playerid]==1)
{
format(string, sizeof(string), "* FBI-Agent %s legt seine Marke in den Schrank und macht Feierabend.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
ResetPlayerWeapons(giveplayerid);
PlayerInfo[giveplayerid][pGun1] = 0; PlayerInfo[giveplayerid][pAmmo1] = 0;
PlayerInfo[giveplayerid][pGun2] = 0; PlayerInfo[giveplayerid][pAmmo2] = 0;
PlayerInfo[giveplayerid][pGun3] = 0; PlayerInfo[giveplayerid][pAmmo3] = 0;
PlayerInfo[giveplayerid][pGun4] = 0; PlayerInfo[giveplayerid][pAmmo4] = 0;
OnDuty[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keiner Umkleide !");
return 1;
}
}
}
} -
Dankeschön. hat geklappt war nur i-wie zu blöd dafür O.o