17.02.2013, 18:58
Aight so I wanted to give cop a sight, so if someone does a crime inside the sight, their wanted level will increment.
I did it likes this, but I don't think this is very efficient since I can't really make different kinds of areas.
Using Incognito's streamer btw.
I did it likes this, but I don't think this is very efficient since I can't really make different kinds of areas.
Using Incognito's streamer btw.
pawn Код:
new Copsight[MAX_PLAYERS];
public OnPlayerDisconnect(playerid, reason)
{
DestroyDynamicArea(Copsight[playerid]);
return 1;
}
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,1);
if(playerTeam[playerid] == TEAM_POLICE)
{
SetPlayerTeam(playerid,0);
SetPlayerColor(playerid,COLOR_BLUE);
Copsight[playerid] = CreateDynamicCircle(2495.5669, -1687.1925, 40,-1, -1, -1);
AttachDynamicAreaToPlayer(Copsight[playerid], playerid);
}
if(playerTeam[playerid] == TEAM_CIVILIAN)
{
SetPlayerTeam(playerid,1);
SetPlayerColor(playerid,COLOR_WHITE);
}
}
and the increase
if(IsPlayerInAnyDynamicArea(playerid) == 1){SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 1);}