if(PlayerInfo[playerid][pLocal] == 102)
Die ist schuld, ersetzt die durch das hier:
if(!IsPlayerInRangeOfPoint(playerid,3.0,2316.6189,-7.3298,26.7422))
bzw. das hier
if(IsPlayerInRangeOfPoint(playerid,3.0,2316.6189,-7.3298,26.7422))
also müsste so aussehen:
public Rob_Reset()
{
rob = 0;
return 1;
}
forward Rob_Cop(playerid);
public Rob_Cop(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,2316.6189,-7.3298,26.7422))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
new sendername[MAX_PLAYER_NAME],string[123];
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Achtung! Das Bank Security System Konnte den Täter identifizieren!");
format(string,sizeof(string),"HQ: Der Täter heißt %s",sendername);
SendClientMessage(i,TEAM_BLUE_COLOR,string);
}
}
}
}
else if(!IsPlayerInRangeOfPoint(playerid,3.0,2316.6189,-7.3298,26.7422))
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
new sendername[MAX_PLAYER_NAME],string[123];
GetPlayerName(playerid,sendername,sizeof(sendername));
SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Achtung! Das Bank Security System Konnte den Täter identifizieren!");
format(string,sizeof(string),"HQ: Der Täter heißt %s",sendername);
SendClientMessage(i,TEAM_BLUE_COLOR,string);
}
}
}
}
return 1;
}
public Rob_UnFreeze(playerid)
{
if(IsPlayerInRangeOfPoint(playerid,3.0,2316.6189,-7.3298,26.7422))
{
//UnFreezePlayer(playerid);
new randmoney = 10000 + random(100000 - 400000);
GivePlayerMoney(playerid,randmoney);
new string[128];
format(string,sizeof(string),"Du hast $%d gezählt",randmoney);
SendClientMessage(playerid,COLOR_GREEN,string);
SetTimerEx("Rob_Cop",60000+random(18000),0,"i",playerid); // Nach 3 minute
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, ".:Bist zum nächsten Raub musst du 30min warten:.");
WantedPoints[playerid] += 2;
WantedPoints[playerid] += 2;
WantedPoints[playerid] += 2;
WantedPoints[playerid] += 2;
SetPlayerCriminal(playerid,255, "Bankraub!");
SetPlayerCriminal(playerid,255, "Bankraub!");
SetPlayerCriminal(playerid,255, "Bankraub!");
SetPlayerCriminal(playerid,255, "Bankraub!");
GivePlayerMoney(playerid,100000);
SelfStatus = 8;
SendClientMessage(playerid,0xAA3333AA,"Du hast 100000 bekommen");
return 1;
}
return 1;
}
mfg
//edit: pwn code hinzugefüg