hey ich habe grade ein kleines /duty für FBI's gemacht und wollte fragen was daran falsch ist weil der Pawn Compiler einfach abstürtzt:
if(strcmp(cmd, "/fbiduty", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 21||PlayerInfo[playerid][pLeader] == 21)
{
if (PlayerToPoint(3.0,playerid,254.4851,76.6072,1003.6406))
{
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);
SetPlayerColor(playerid, NAMECOLOR_FBI);
GivePlayerWeapon(playerid, 41, 500); //spray
GivePlayerWeapon(playerid, 3, 0); //Nightstick
GivePlayerWeapon(playerid, 27, 100); //Combat Shotgun
GivePlayerWeapon(playerid, 23, 500); //Silenced
GivePlayerWeapon(playerid, 29, 500); //MP5
GivePlayerWeapon(playerid, 34, 50); //Sniper Rifle
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);
SetPlayerColor(playerid, COLOR_WHITE);
ResetPlayerWeapons(giveplayerid);
OnDuty[playerid] = 0;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Du bist in keiner Umkleide !");
return 1;
}
}
Lg