Hallo,
wenn ich /duty als Cop (1) mache dann geht es...
wenn ich /duty als FBI (2) oder Army (3) mache geht es nicht -.-
Vlt ´kann mir ja jemand helfen.
COMMAND:duty(playerid,params[])
{
if(IsPlayerInFrakt(playerid,1))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_LSPD))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"LSPD-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"LSPD-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
if(IsPlayerInFrakt(playerid,2))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_FBI))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"ARMY-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"ARMY-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
if(IsPlayerInFrakt(playerid,3))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_ARMY))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"FBI-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"FBI-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
return 1;
}
{
if(IsPlayerInFrakt(playerid,1))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_LSPD))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"LSPD-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"LSPD-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
if(IsPlayerInFrakt(playerid,2))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_FBI))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"ARMY-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"ARMY-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
if(IsPlayerInFrakt(playerid,3))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_ARMY))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"FBI-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"FBI-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
return 1;
}
Und so hatte ich es auch schon:
COMMAND:duty(playerid,params[])
{
if(IsPlayerInFrakt(playerid,1))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_LSPD))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"LSPD-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"LSPD-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
else if(IsPlayerInFrakt(playerid,2))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_FBI))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"ARMY-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"ARMY-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
else if(IsPlayerInFrakt(playerid,3))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_ARMY))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"FBI-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"FBI-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
return 1;
}
{
if(IsPlayerInFrakt(playerid,1))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_LSPD))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"LSPD-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"LSPD-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
else if(IsPlayerInFrakt(playerid,2))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_FBI))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"ARMY-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"ARMY-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
else if(IsPlayerInFrakt(playerid,3))
{
if(IsPlayerInRangeOfPoint(playerid,1,DUTY_POINT_ARMY))
{
if(duty[playerid] == false)
{
new string[128];
format(string,sizeof(string),"FBI-Officer %s ist jetzt im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,100);
GivePlayerWeapon(playerid,24,300);
GivePlayerWeapon(playerid,29,300);
GivePlayerWeapon(playerid,31,300);
duty[playerid] = true;
}
else
{
new string[128];
format(string,sizeof(string),"FBI-Officer %s ist jetzt nicht mehr im Dienst",Spielername(playerid));
SendClientMessageToAll(FARBE_LSPD,string);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid,24,100);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
duty[playerid] = false;
}
}
}
return 1;
}
Beim LSPD gehts...
Bei den anderen meint er:
Er meint das ich nicht am Punkt bin -.-
MfG Freestyyler