/* #define bitC4Detector 4 #define bitAdrenaline 8 #define bitParachute 16 #define bitCellphone 32 #define bitDiveTicket 64 #define bitWeed 128 #define bitAmphetamine 256 #define bitEcstasy 512 #define bitLSD 1024 #define bitCocaine 2048 #define bitHeroin 4096 */ // cop side #define psSentPoCmd 1 // suspect/criminal side #define psGotPoCmd 2 enum enum_po { poOtherID, // id of the cop if we're in susp. array or of susp. if we're in the cops array poState, // state 0 is no state. see consts prefixed with ps* poLastTick, // tick when state changed last Float:poSpeed } new po[MAX_PLAYERS][enum_po]; OnCopPullOverCmd(pid, nick[]) { #if incl_debug printf(" OnCopPullOverCmd(pid:%d nick:'%s') (%s)", pid, nick, names[pid]); #endif new i, criminal = INVALID_PLAYER_ID, Float:pos, Float:dis, Float:p[6], custommax, msg[MAX_STR]; if (nick[0] != 0) { if (GetPlayerID(pid, nick, criminal) != 1) return 1; custommax = criminal+1; } else { custommax = maxplayers; } dis = 9999.9; // pos from who we calculate GetPos(pid, p[0], p[1], p[2]); for (i=criminal; i VisualDistance) return withmsg(pid, C_RED, "No valid suspect close enough or invalid nick."); if (GetPlayerState(criminal) == PLAYER_STATE_DRIVER) { po[criminal][poSpeed] = pp[i][3]; // remember speed of criminal in criminal array msg = "bla bla pull over car"; } else { msg = "Stop, or res arr...onfoot"; } po[pid][poOtherID] = criminal; po[criminal][poOtherID] = pid; po[pid][poState] = psSentPoCmd; po[criminal][poState] = psGotPoCmd; /* po[pid][*. *. msg fillstruct timer */ return 1; }